Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   IMAQ Vision: The image is not large enough for the operation (http://www.chiefdelphi.com/forums/showthread.php?t=101063)

Jmoo 24-01-2012 18:55

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:

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);


Jmoo 25-01-2012 13:58

Re: IMAQ Vision: The image is not large enough for the operation
 
Any suggestions? Am I not acquiring an image properly? Something simple I'm missing?

jwakeman 25-01-2012 14:38

Re: IMAQ Vision: The image is not large enough for the operation
 
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?

jwakeman 25-01-2012 14:39

Re: IMAQ Vision: The image is not large enough for the operation
 
actually i took a look at your code and i have a suggestion..try camera.WriteBrightness(30)

bob.wolff68 25-01-2012 19:55

Re: IMAQ Vision: The image is not large enough for the operation
 
Another sanity check is to check:
Code:

image.GetWidth()
to see if you've got an image with 'size'

bob

Tommy.Brown 25-01-2012 23:50

Re: IMAQ Vision: The image is not large enough for the operation
 
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?


All times are GMT -5. The time now is 13:22.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi