IMAQ Vision: The image is not large enough for the operation

Anyone run into this error before?

Error from the cRIO:

<CODE>-1074396154 ERROR: status = -1074396154 (0xBFF60406)ImaqThreshold error: …in ComputeThreshold() in C:/WindRiver/workspace/WPILib/Vision/ColorImage.cpp at line 37
IMAQ Vision: The image is not large enough for the operation

Here is a sample of the code:


m_robotDrive->SetSafetyEnabled(false);
AxisCamera &camera = AxisCamera::GetInstance();
camera.WriteBrightness(0);
camera.WriteResolution(AxisCamera::kResolution_320x240);
Wait(3.0); 	

ColorImage img(IMAQ_IMAGE_HSL);
camera.GetImage(&img);
BinaryImage* binImg = img.ThresholdHSL(121, 165, 2, 250, 109, 255);

Any suggestions? Am I not acquiring an image properly? Something simple I’m missing?

I think I saw that error once when the camera switched to black and white images because the ambient light (in the room) was too low.

Then later a working project I had started giving this error and i couldn’t get it to go away so i just re-implemented the project from scratch and it wen’t away…

I am doing my image processing in labview on the classmate pc so I can’t really tell you if there is something wrong with your c++ code. Maybe check that the camera is sending color images?

actually i took a look at your code and i have a suggestion…try camera.WriteBrightness(30)

Another sanity check is to check:

image.GetWidth()

to see if you’ve got an image with ‘size’

bob

First of all increase the brightness to 30, the brightness of 0 will always return a black image. Also, is your camera plugged in via Ethernet to the cRIO or to the wireless bridge? Because the IP address will change depending on its location. Did you configure your camera using the tool that was with the LabView utilities? When I was programming all of this 2 weeks ago I never ran into that issue. Did you make sure that you can actually get a video/picture from the camera?