LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract the gray value of gray image and represent it with two-dimensional array?

Solved!
Go to solution

Hello!

I am new to Labview and would like some help. I want to extract the pixel value of a gray image for subsequent defect detection. How should I write the program?

Like this picture:3.jpg

Please tell me more details,thank you very much!

0 Kudos
Message 1 of 7
(1,967 Views)

Step 1) Make a vi that opens the image file.

 

Step 2) Report back to this thread with progress on the open image file vi. 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 2 of 7
(1,917 Views)
Solution
Accepted by topic author Alert77

Assume you do not want to use NI Vision, just want to develop based on LabVIEW basic functions, then

1) use "read JPEG File.vi" read your image;

2) unbundle the image data from the step1 result, if you want to have flatten data;

3) use "Unflatten Pixmap.vi" if you want to unflatten data.

 

 

0 Kudos
Message 3 of 7
(1,901 Views)

Thank you very much for your reply, but I just started to study, so I don't understand your reply very well. But I received a more detailed answer. Thank you in the end!

0 Kudos
Message 4 of 7
(1,873 Views)

Thank you very much for your answer, but I would also like to take the liberty to ask, what should I do if I need to use Ni vision?

0 Kudos
Message 5 of 7
(1,870 Views)
Solution
Accepted by topic author Alert77

if you have NI Vision, then you can use "IMAQ GetPixelValue" to obtain the pixel value in you image directly.

0 Kudos
Message 6 of 7
(1,841 Views)

Thank you very much! I got the data.

0 Kudos
Message 7 of 7
(1,836 Views)