LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Light Meter

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?

Download All
0 Kudos
Message 1 of 8
(7,034 Views)

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

Message Edited by Hornless.Rhino on 03-05-2010 12:13 PM
Message 2 of 8
(7,021 Views)

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

0 Kudos
Message 3 of 8
(7,003 Views)
Sorry, forgot the attachments..
0 Kudos
Message 4 of 8
(7,002 Views)

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?

Message Edited by Hornless.Rhino on 03-05-2010 02:31 PM
0 Kudos
Message 5 of 8
(6,988 Views)

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.

0 Kudos
Message 6 of 8
(6,983 Views)

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.

0 Kudos
Message 7 of 8
(6,967 Views)

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

0 Kudos
Message 8 of 8
(6,925 Views)