LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save a binary image

Solved!
Go to solution

Hello,

I am new here so I hope it is the right way to post a question.

 

I would like to safe the binary image I created into a new folder. I tried a way already but it just saves a black image.

 

My sencond question is how can I display the histogram of my image?

 

I attached a photo of my block diagram.

Thank you!

 

Unbenannt 3.PNG

0 Kudos
Message 1 of 8
(4,231 Views)
Right Click Image indicator->Palette->Binary to see binary images.
-Use unbundle by name from histogram report and select histogram and connect to waveform graph.
Thanks
uday
0 Kudos
Message 2 of 8
(4,201 Views)

To save the binary image, you need to wire the output image of the Threshold VI to the input of the save image VI. Currently, you save the image before it is being thresholded.

Marc Dubois
0 Kudos
Message 3 of 8
(4,194 Views)

Thank you for your quick reply and help!

 

Do you mean it like this?

This creates two problems. First it saves a complete black image and second I have to preselect where I want to save the image. Moreover, I cannot select just a folder to save it, I have to select an image which is going to be overridden. If I do not select a path there is an error message.

 

 

Unbenannt 4.PNG

0 Kudos
Message 4 of 8
(4,169 Views)

Attach your actual VI.

 

Perhaps the right click options for your path controls or the options in the File Dialog aren't set properly.

0 Kudos
Message 5 of 8
(4,159 Views)

Sorry, I thought that you could properly see the image and simply could not save it. When thresholding an image, the default replace value is 1. Since you start with a black image, all 0s, then the resulting image appears completely black. Set a replace value of 200 instead of the default of 1 and you should see something (as long as your range corresponds to something in the source image).

 

Concerning the file path, this is basic LabVIEW programming. You can simply check if the file already exists and add an increment to the filename to prevent overwriting it.

Marc Dubois
0 Kudos
Message 6 of 8
(4,156 Views)
Solution
Accepted by topic author Christinaa

Here is an example of what I think you try to do.

Thresholding and s.png

 

Marc Dubois
0 Kudos
Message 7 of 8
(4,145 Views)

Thank you so much! That is what I wanted to do. Thanks a lot for your help!!

0 Kudos
Message 8 of 8
(4,143 Views)