How do I find my webcam's DPI ?

  • Thread starter Thread starter btb4198
  • Start date Start date
Click For Summary
SUMMARY

The discussion centers on the misconception of using DPI (Dots Per Inch) for measuring webcam output, particularly in a C# application utilizing AForge for live video. Participants clarify that DPI is a printer specification and not applicable to cameras. Instead, they emphasize the importance of resolution in pixels and suggest using a graticule for accurate measurements in microscopic setups. The conversation highlights the need for a physical reference when converting pixel dimensions to real-world measurements.

PREREQUISITES
  • Understanding of webcam specifications and resolutions
  • Familiarity with C# programming and AForge library
  • Knowledge of optical measurement techniques, specifically graticules
  • Basic principles of converting pixel dimensions to physical measurements
NEXT STEPS
  • Research how to implement a graticule in microscopy for accurate measurements
  • Learn about the AForge library for advanced image processing in C#
  • Explore methods for converting pixel dimensions to micrometres using known references
  • Investigate optical principles related to magnification and measurement accuracy
USEFUL FOR

This discussion is beneficial for software developers working with image processing, optical engineers, and anyone involved in microscopy or precise measurement techniques.

btb4198
Messages
570
Reaction score
10
TL;DR
How do I find my webcam's pdi ? Is there a way to do this in C# ?
How do I find my webcam's DPI ? Is there a way to do this in C# ?
 
Last edited:
Computer science news on Phys.org
What's a pdi? My Google-fu is failing me...
 
berkeman said:
What's a pdi? My Google-fu is failing me...

DPI stands for Dots Per Inch which technically means printer dots per inch.
 
btb4198 said:
DPI stands for Dots Per Inch which technically means printer dots per inch.
Oh, LOL. No wonder Google couldn't figure it out either. DPI is a printer spec, not a camera spec. Just look for the resolution spec for your webcam. It will be ___ x ___ (fill in the number of pixels in x and y). :smile:
 
For example, look up HD 1080p from this webcam datasheet...

1574037997625.png
 
I need to convert pixel to Micrometre.
so I have a C# program that displays a live video using Aforge and I can draw a blue box inside the image and I can get the dimensions in pixel but I need them in Micrometre.

I read online that I need the dpi to convert it into mm then from there I can convert it into Micrometre.
 
btb4198 said:
I need to convert pixel to Micrometre.
so I have a C# program that displays a live video using Aforge and I can draw a blue box inside the image and I can get the dimensions in pixel but I need them in Micrometre.

I read online that I need the dpi to convert it into mm then from there I can convert it into Micrometre.
That doesn't sound good enough. Think of a zoom lens. Having a constant number of pixels, the lens can zoom in or zoom out, covering very different areas.
 
btb4198 said:
I need to convert pixel to Micrometre.
A meaningless task. You are trying to convert to a unit of distance something which is not a measure of distance.
 
  • Like
Likes   Reactions: berkeman
phinds said:
A meaningless task. You are trying to convert to a unit of distance something which is not a measure of distance.
phinds can you explain what you mean by a meaningless task ?

I have a camera set up as a microscope to view something really small that is in the Micrometre scale.
if I draw a box around an area in the video player and convert it to Micrometres would that not give me the Exact dimensions on the object I am looking at.
 
  • #10
btb4198 said:
phinds can you explain what you mean by a meaningless task ?

I have a camera set up as a microscope to view something really small that is in the Micrometre scale.
if I draw a box around an area in the video player and convert it to Micrometres would that not give me the Exact dimensions on the object I am looking at.
So you are trying to use your camera to measure things in your microscope setup? It would have helped if you said that from the beginning, IMO.

Does your microscope's optics have a graticule option?
 
  • #11
berkeman said:
So you are trying to use your camera to measure things in your microscope setup? It would have helped if you said that from the beginning, IMO.

Does your microscope's optics have a graticule option?
What is a graticule option?
 
  • #12
btb4198 said:
phinds can you explain what you mean by a meaningless task ?

I have a camera set up as a microscope to view something really small that is in the Micrometre scale.
if I draw a box around an area in the video player and convert it to Micrometres would that not give me the Exact dimensions on the object I am looking at.
Convert WHAT to mm? Pixels in the video player? No way.

If you put a small rule next to it that you know is measured in mm, fine, but if you are expecting the camera to tell the physical size of an object photographed, forget it.

EDIT: you don't seem to be listening to what people are telling you. I will try to be more specific. Take a picture of the moon such that it fills half the image. Take a picture of a tiny bug through a microscope such that it fills up half of the image. Each will have the same number of pixels. Do you think they are therefor the same size?
 
  • #13
btb4198 said:
What is a graticule option?
Google Images search on microscope graticule... :smile:

1574043882711.png
 
  • Like
Likes   Reactions: phinds
  • #14
berkeman said:
Google Images search on microscope graticule... :smile:

View attachment 252971
no it does not have that.
would that help ?
 
  • #15
Yes. What model is your microscope?

Also, another option would be to get some slides for your microscope that have graticules on them. You can image the slide first, and then put your object under the microscope at the same magnification and image it. That will give you a ruler to measure your object by.
 
  • #16
phinds said:
Convert WHAT to mm? Pixels in the video player? No way.

If you put a small rule next to it that you know is measured in mm, fine, but if you are expecting the camera to tell the physical size of an object photographed, forget it.

EDIT: you don't seem to be listening to what people are telling you. I will try to be more specific. Take a picture of the moon such that it fills half the image. Take a picture of a tiny bug through a microscope such that it fills up half of the image. Each will have the same number of pixels. Do you think they are therefor the same size?
lol that makes complete sense. no they would not be the same size.
 
  • Like
Likes   Reactions: berkeman
  • #17
berkeman said:
Also, another option would be to get some slides for your microscope that have graticules on them. You can image the slide first, and then put your object under the microscope at the same magnification and image it. That will give you a ruler to measure your object by.
Like these:

1574045023614.png
 
  • #18
berkeman said:
Also, another option would be to get some slides for your microscope that have graticules on them. You can image the slide first, and then put your object under the microscope at the same magnification and image it. That will give you a ruler to measure your object by.
Yep. That is exactly what I do for wood micrographs with both my camera (up to 12X) and a cheap microscope (up to about 400X). You can see some of the results on my profile page
 
  • Informative
Likes   Reactions: berkeman
  • #19
berkeman said:
Yes. What model is your microscope?

Also, another option would be to get some slides for your microscope that have graticules on them. You can image the slide first, and then put your object under the microscope at the same magnification and image it. That will give you a ruler to measure your object by.
Hi thanks for all the help! so I do not know the information of the microscope, there are other people that are handling the Optical side of this project, so I will have them look into that.

but question, how do people get speed of a moving car from video cam?
 
  • #20
btb4198 said:
but question, how do people get speed of a moving car from video cam?
You aim your camera at the speedometer. Please do this hands-free, so you don't get into trouble with law enforcement...

1574046486692.png
 
  • Haha
Likes   Reactions: anorlunda
  • #21
lol that is funny
 
  • Like
Likes   Reactions: berkeman

Similar threads

  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 16 ·
Replies
16
Views
8K
Replies
1
Views
5K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 24 ·
Replies
24
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K