LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert pixel size to mm

Hi all!
 
I create an interface with two objects. I measured the range between them in according to y axis ia equal to 100. I think it means that 100 pixels? Is it right?
 
How can I convert it to mm (millimeter)? Because I want to take the data with real measurement unit.  
 
Thank you for your advise!
 
Best regards,
0 Kudos
Message 1 of 18
(27,790 Views)
You need co calibrate your imaging device.

I presume you're working with a camera?

You take a picture of something with known dimensions, find the size in pixels and voilá.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 2 of 18
(27,793 Views)
Hi Shane,

voilà, not voilá !

Smiley Very Happy Smiley Very Happy Smiley Very Happy



We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 3 of 18
(27,789 Views)
Oops,

Thanks for the correction.  Voilà it is then.  That's even easier on my keyboard.  Why did I go for the difficult version?

>ahem<.  This was my blatant attempt to be not so left out with all the french-speaking members here.

I shall try to not make the same mistake again, although totally NEW mistakes may be expected Smiley Happy

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 4 of 18
(27,787 Views)
Thank you for your answer!
 
I just put 3 images on the front panel, without using camera. I let one image run, one was fixed, and one was background. From that, I measured range between two images (except the background). For example, the background have size of 780x450 pixels, the first image was 450x300 pixels, the last one was 700x250 pixels.
 
How could I convert the range from pixels to mm with them? I try to find the rationale to convert it.
 
Thanks for you reply so soon. It's so important for me now.
 
Best regards, 
0 Kudos
Message 5 of 18
(27,786 Views)
I'm sorry,

I simply don't understand what it is you are trying to do.

The answer as far as I can tell remains the same.  The pixels from which the pictures are composed need to be calibrated to real-world distances.

If your pictures are generated (not taken by a camera) then you are asking how large a pixel is on your monitor, no?

Please expand on your application or post some example code or pictures of it (NO BMPs please)

Trying to help,

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 6 of 18
(27,779 Views)

Thanks.

I'm also sorry. Maybe my explanation made you confuse.

I attached my pictures with having all of images below. Do you see the back of leading car? I would like to measure the range between the dashboard and the leading car.

My pictures have the resolution about 74 dpi.

I hope to be replied from you! Thanks a lot.

Sincere,

 

 

0 Kudos
Message 7 of 18
(27,778 Views)
Sorry, I forgot to attach file.
0 Kudos
Message 8 of 18
(27,775 Views)
Hi Tuong

you're 74 DPI gives all the information you need, it is a simple unit conversion:

Distance[mm]=distance[pixel]*resolution[DPI]*conversion[inch/mm]

or:
Dist=100*74/25,4=291 mm.

I'm not really sure what you want to do with this info... but i hope you can fish now.Smiley Happy

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 9 of 18
(27,775 Views)

Hi!

I also think like that but not sure. Thanks for your help. It helps me a lot.

Regards, 

0 Kudos
Message 10 of 18
(27,771 Views)