LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

binary

hello i have to convert a 1D-array of bmp image data to binary and i dont know how to do that

 

grtz

0 Kudos
Message 1 of 13
(3,848 Views)

Unless you are still using an old analog computer everything in a computer is already binary.

 

Please explain exactly want you want to see and we may be able to help.

 

But while we are waiting for clarification... the is a Picture palette that contains picture related functions including being able to read from file and others that you may find useful.

 

An please post images of your code (no VI's please) if you try them out and get stuck.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 13
(3,845 Views)

I have to covert a greyscale image to binary values, this is my implementation but i don't know if its correct

grtz

 

0 Kudos
Message 3 of 13
(3,841 Views)

This seems to be similar/same as this post. What you want to do by converting to 0s and 1s in that way? Any specific reason?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 13
(3,836 Views)

i have to convert image data to this type because we need to take the negative of a picture

0 Kudos
Message 5 of 13
(3,830 Views)

You can also look into the vision modules there you have lot of advanced options that might be very helpful.

 

Good luck.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 13
(3,826 Views)

Maybe you can help me with converting an image to grayscale because i dont really think that i have done it right

0 Kudos
Message 7 of 13
(3,823 Views)

I am not allowed to write the code but will outline something that may work.

 

The images are composed of pixels where each pixel is 4 bytes that represent the RGB (Red Green Blue) value of the pixel. The MSB is not used unless you are dealing with transparency or what-not so leeve the MSB as zero.

 

All colors that are grey have the property R=G=B.

 

So the challeng invloves mapping the RGB to valid grey-scale values.

 

An approach I have used takes the length of the vector RGB as if it is XYZ in 3-space. The length is simply the square root of the sum of the squares of the R, G, and B values. The vector lenght is then normalized to a max of 255 since the max bvalue a byte can have is 255.

 

TO get the negative you simply subtract the mapped value (0-255) from "255" and use that value for the RGB values.

 

Done.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 13
(3,812 Views)

The top right image in shown in this FP was derived from the top middle image using the method I outlined above.

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 9 of 13
(3,807 Views)

@Ben wrote:

The top right image in shown in this FP was derived from the top middle image using the method I outlined above.

 

 

Ben


I remember my HOD who took DIP for us with this kind of very same explanation. 🙂

 

-----

The best solution is the one you find it by yourself
Message 10 of 13
(3,794 Views)