LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change 8-bit binary image back to 8-bit grayscale

Can some one help me please in NI vision how to convert the image back to grayscale after I did my thresholding by using 'IMAQ Local threshold' from a 8-bit grayscale to a binary image but the problem now I don't know how to convert it back. I need someone help thank you.

0 Kudos
Message 1 of 10
(4,158 Views)

I'm afraid I haven't got the toolkit installed on my machine at the moment

 

If I remember correctly you don't need to convert the image at all. On the last vision project I worked on we did a colour capture with a camera, converted it colour to greyscale for certain part of the anaylsis, (other parts we just did on the colour image), and then when we had found the ROI, we drew rectangles and circles etc on the colour image so the operator could see in colour! (just make sure to open a image reference to work on if you do this...

 

If you really want help, I would advise making a simple VI containing the basic principles of what you want to do - work from an image constant on the BD, then post it in this thread and people will be able to see where you have got to and give you a quick pointer much faster! (fewer files = easier to work with)

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 2 of 10
(4,142 Views)

Below is the VI shown that I using an grayscale(U8) at the beginning as input after doing the process of tresholding the output Image was change from a grayscale image to a binary Image but then the problem now I don't know how to convert it back to grayscale. Thank you

WS Tan

0 Kudos
Message 3 of 10
(4,126 Views)

Dont have labview up right now but image processing is a little different than typical wires in labview.  If you want to preserve the original image, create a new image for the destination of the binary threshold (Imaq create) and the original image will be untouched.  If you do not do it this way your original image will be lost.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 10
(4,085 Views)

I do create a new image for the destination of the binary threshold (Imaq create) and also the original image. Now the original image was remain untouched as shown figure below. But then after I do all those image processing stuff now I want to convert the processed image from binary  back to grayscale for further usage.

 

Thank You.
WS Tan 

0 Kudos
Message 5 of 10
(4,079 Views)

Untitled.png

0 Kudos
Message 6 of 10
(4,077 Views)

What we mean is create a new Image reference (purple wire) to do the processing on, then put info back onto the original image wire on the display if you want using the other reference (purple wire) if you want to highlight a rectangle, text, show a line or something else.

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 7 of 10
(4,050 Views)

Thanks Guys finally I got the idea and what to do next. Thank for your help I am appreciate on it.

WS Tan
Thank you

0 Kudos
Message 8 of 10
(4,047 Views)

the imaq image is a different type than the typical wire in labview.  Takes a little time to get used to.  If you dont want to loose the data on the wire, you need a new image for your results (you will find you need an IMAQ copy where you used to beable to split a wire).  Once you grasp this difference it will be smooth sailing.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 9 of 10
(4,038 Views)

Dear WSTan

I have your problem. Is it possible explain!

 

Thank you 

best regard

0 Kudos
Message 10 of 10
(3,795 Views)