05-02-2010 06:19 PM
Hi guys,
I'm desparing of trying to get the pixel intensities in a rectangle of an image. I'm pretty sure I tryied everything possible.
The problem: Everytime I try to run the VI an error occures: Error -1074396080 occured at IMAQ Histograph - Invalid image type. Possible reason(s): IMAQ Vision: (Hex 0xBFF60450) Invalid image type.
The goal of this VI is to recognize the bricks: which ones are black, which one are white?
As attachment a sample image and my VI.
THANKS IN ADVANCE 🙂
PS: Is it possible, that it doesn't work because I'm using a Evaluation Version?
05-02-2010 07:11 PM - edited 05-02-2010 07:13 PM
I can't open it because it's a newer version of labview than what I'm running so I can't see if you've already done this, but try extracting the luminance plane (IMAQ extract single plane - luminance), and run the IMAQ light meter VI on the output of that.
edit: spelling
05-02-2010 08:32 PM
WOW, you've already helped me A LOT HORNLESS.RHINO - thanks a lot! 🙂
Now it works, but while running I still get an error message (this time another one) for every brick I'm analysing... and I have to click "continue" every time the error occures 😞
How can I ignore these error messages?
Because you can't see my VI I made a screenshot for you - would be very grateful if you could help me again 🙂
Thanks
hardcoder
05-02-2010 08:34 PM
05-02-2010 09:30 PM - edited 05-02-2010 09:31 PM
Ok, looking at the VI it appears as though you're already using a greyscale image so you don't need the extract single color plane block (and it will cause that error) so you can remove those.
MIght have to think a bit with this...
As an aside, are you just reading single images in at a time, or are there multiple images in the folder you are reading with the vision express VI?
05-02-2010 09:55 PM
No, I'm using a color image - since I placed the "extract single color plane blocks" (as you suggested) it computes the pixel intensities in the rectangles, before it stopped with another error message but without this calculation --> so it's better now, but the error messages stops the programm if I don't press "continue" again and again.. that's not what I want.
If I understood you correctly, you asked for the output of the block named "Vision Acquisition" - when I ask the context help for the wire I get:
"Data type of wire:
Image Out(typedef 'IMAQ Image.ctl' [non strict])
Image Out(typedef 'IMAQ Image.ctl' [non strict])(IMAQImage [IMAQImage] )"
I'm reading a single image - when it workes I'll chance it a little bit so it will take one picture from an USB-cam and does what it did before, still one file.
05-03-2010 12:03 AM
If you want to get it to ignore all the errors (which may be a bad idea), you can try wiring the errors from the image extraction blocks to the "merge errors" block, and wire that to the "clear errors" block. (not sure if this will work, don't have time to try right now).
A slightly different thing to try, use a single extract image plane block, and brach out after that rather than using multiple extract image plane blocks.
05-03-2010 09:07 AM
Hey Hardcoder,
another way will be to use the vision assistant.
Open the vision assistant and read in the color image.
In the next step you choose histogram in the first tap.
Finally you export the code to labview (under tools).
You are able to use the express vi for the image acquisition.
And the low level code from the vision assistant.
To set different ROIs for the histogram it will be better to use a state machine.
Kind regards,
Elmar