LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data extraction from image

Solved!
Go to solution

How to get the data of a row drawn using cursor from an .jpg picture and plot it into a graph display?

I have a .jpg picture saved on computer. Now from that picture I need to extract data of a particular row which can be chose from the display only. Then I have to plot that extract data in graph display so that I can do analysis as per requirement, e.g. Get the peaks or valleys.

How to get the data of chosen row from .jpg picture and display it?

0 Kudos
Message 1 of 19
(4,146 Views)

You can use Read JPEG File to get the jpg data, then use Unflatten Pixmap to convert the data into a 2D array.

Then it's easy to extract a row, it's just indexing the array data.

 

Hope this helps,

Daniel

 

0 Kudos
Message 2 of 19
(4,132 Views)

thank you dan_u.

i have tried following you advice. but there is a problem in reading file . error at read jpeg file is "LabVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
=========================
NI-488:  Command requires GPIB Controller to be Controller-In-Charge.
". the file required to read is attached  here. 

 

 

0 Kudos
Message 3 of 19
(4,112 Views)
You did not attach a file and the problem is how YOU specified the path and file and you should have attached your VI.
0 Kudos
Message 4 of 19
(4,110 Views)
Smiley Surprised opss! i am extremly sorry. I attached that here..
0 Kudos
Message 5 of 19
(4,089 Views)

So you want to extract one of the curves in the jpg file? Good luck with that... Smiley Happy

You should try to get the raw data instead of just a jpg.

 

0 Kudos
Message 6 of 19
(4,085 Views)
Well, my suggestion is: build an event structure, add mouse-hold event, save the mouse locations to an array or file.  You have to trace every curve in your image.  It is gonna be an interesting program.
------- LabVIEW 2009, So Easy, Even a Therapist Can Do It -------
0 Kudos
Message 7 of 19
(4,074 Views)

Weiyuan wrote:
Well, my suggestion is: build an event structure, add mouse-hold event, save the mouse locations to an array or file.  You have to trace every curve in your image.  It is gonna be an interesting program.

It will still be difficult to calibrate the data.... Howdo you translate the x,y mouse coordinates to physical units?

Not to talk about accuracy...

 

 

0 Kudos
Message 8 of 19
(4,063 Views)
i am not going to trace each graph visible there. I need data of a particular row, say for example, the data of co-ordinate y=5. is it possible to draw a line on the graph and save the data lies on the line?
0 Kudos
Message 9 of 19
(4,053 Views)
Can you attach your labview code here, the one you said has errors.  If you just have one image, you can try ImageJ, it is free.  Draw a line and goto analyze->plot profile.
------- LabVIEW 2009, So Easy, Even a Therapist Can Do It -------
0 Kudos
Message 10 of 19
(4,042 Views)