Go to Post "The secret to success is to acknowledge that you have limits, but to never acknowledge that you have reached those limits." - lady_raidan [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 24-01-2012, 18:55
Jmoo Jmoo is offline
Registered User
AKA: Jay Meldrum
None #0067
Team Role: Engineer
 
Join Date: Jun 2003
Rookie Year: 2012
Location: Michigan
Posts: 16
Jmoo is an unknown quantity at this point
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);
Reply With Quote
  #2   Spotlight this post!  
Unread 25-01-2012, 13:58
Jmoo Jmoo is offline
Registered User
AKA: Jay Meldrum
None #0067
Team Role: Engineer
 
Join Date: Jun 2003
Rookie Year: 2012
Location: Michigan
Posts: 16
Jmoo is an unknown quantity at this point
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?
Reply With Quote
  #3   Spotlight this post!  
Unread 25-01-2012, 14:38
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
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?
Reply With Quote
  #4   Spotlight this post!  
Unread 25-01-2012, 14:39
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
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)
Reply With Quote
  #5   Spotlight this post!  
Unread 25-01-2012, 19:55
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 157
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
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
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
Reply With Quote
  #6   Spotlight this post!  
Unread 25-01-2012, 23:50
Tommy.Brown's Avatar
Tommy.Brown Tommy.Brown is offline
Lead Programmer
FRC #1477 (Texas Torque)
Team Role: Programmer
 
Join Date: Jul 2011
Rookie Year: 2011
Location: The Woodlands
Posts: 27
Tommy.Brown is an unknown quantity at this point
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?
__________________
FRC Team 1477 - Texas Torque
The Woodlands, Texas
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:02.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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