04-27-2011 06:26 PM
Hello, I have an image as a hexadecimal representation in a text file ( which was extracted from the serial port).
I need to convert this hex respresentation to jpeg files.. How I can do it using Labview?
Here is the file txt:
04-28-2011 03:44 AM
Hi WSalas,
what have you done so far? Do you have your data as byte array or as text data as in your file?
Attached you will find a part of an example which shows how you can solve it with the data from the given file. The black parts are to make it more interesting for you.
Hope it helps.
Mike
01-22-2018 01:55 AM
If its in byte array how do we convert to image? Thank you in advance
01-22-2018 02:46 AM - edited 01-22-2018 02:47 AM
01-22-2018 02:54 AM
what is in your "byte array"?
The byte array consists of equivalent decimal value. attached.PNG file
The VI just read the data from the serial port.
I am using Grove serial camera.
01-22-2018 03:03 AM - edited 01-22-2018 03:04 AM
01-22-2018 03:09 AM
Dear GerdW,
Save the data to a file and give it a filename with a JPG suffix (or whatever fits to your files)…
Is it? Do i need to change to binary or not?
I guess the algorithm is described in the manual of your camera!?
Not really. (The data sheet is attached) I am using sec 4.1 to get the data. (4.1 JPEG Snapshot Picture)
Thank you.
-praveen
01-22-2018 03:09 AM
Dear GerdW,
Save the data to a file and give it a filename with a JPG suffix (or whatever fits to your files)…
Is it? Do i need to change to binary or not?
I guess the algorithm is described in the manual of your camera!?
Not really. (The data sheet is attached) I am using sec 4.1 to get the data. (4.1 JPEG Snapshot Picture)
Thank you.
-praveen
01-22-2018 03:13 AM - edited 01-22-2018 03:13 AM
Save the data to a file and give it a filename with a JPG suffix (or whatever fits to your files)…
Do i need to save in hex or binary while saving the data? Anyway i will the both.
I guess the algorithm is described in the manual of your camera!?
Not really. I attached the camera user manual for your reference. I am using section 4.1 to get the data. (data size 512 byte).
I am confused that how do i arrange the 512 byte to get an image.
01-22-2018 03:14 AM - edited 01-22-2018 03:15 AM
Hi praveen,
Is it? Do i need to change to binary or not?
When you request JPEG data you will get JPEG data!
No need to convert to "binary" or something else - just save the data to a file!
I am using sec 4.1 to get the data
I am confused that how do i arrange the 512 byte to get an image.
Then just follow the descriptions: set the block/packet size and request as many packets as needed. Save their content to a file…