Hi everyone,
I am trying to use the Axis Camera to locate green and pink flags. However, it fails when actually finding the colors. Here's the relevant portion of my code so far:
Code:
int i = StartCameraTask();
StartImageAcquisition();
while (IsOperatorControl())
{
double timestamp;
Image *img = frcCreateImage(IMAQ_IMAGE_HSL);
int getImage = GetImage(img,×tamp);
TrackingThreshold tdata = GetTrackingData(GREEN, PASSIVE_LIGHT);
ParticleAnalysisReport par;
int findcolor = FindColor(IMAQ_HSL, &tdata.hue, &tdata.saturation,&tdata.luminance, &par);
}
StopImageAcquisition();
StopCameraTask();
I find the values of par, tdata, getImage, and findcolor using the debugger. It succeeds up to the call to FindColor. I am using the stock green flag. I've tried positioning it differently in front of the camera, but it still doesn't recognize it!
I've tried it with PINK as well with the pink flag, and I've tried changing PASSIVE_LIGHT to FLORESCENT (neither work).
Has anyone had any success with getting the camera to recognize the flags/know what I'm doing wrong?
Thanks,
Kevin