in

Support Portal

How does dpi or dpm get calculated?

Last post 10-24-2007 1:36 PM by Ben Hejl. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-23-2007 6:59 PM

    • bShe
    • Top 25 Contributor
    • Joined on 08-22-2007
    • Patch Code
    • Points 16

    How does dpi or dpm get calculated?

    Hi, I just wondering how are we going to calculate the dot per inch or dot per meter on a image?

    does dots per inch = sample per inch = pixels per inch?

    In other words if I have a bar code that is 1 inch x 0.25 inch with it print on a 80x24 pixels image, then it would be (80x24)/(1x0.25) = 7680 dpi?

     Thanks.

    • Post Points: 4
  • 10-24-2007 8:33 AM In reply to

    • Ben Hejl
    • Top 10 Contributor
    • Joined on 05-11-2007
    • Cherry Hill, New Jersey
    • Interleaved 2 of 5
    • Points 167

    Re: How does dpi or dpm get calculated?

    The image sample density is independant of how the bar code is printed.  The sample density for a bar code can be determined by measuring the distance in pixels for an object and dividing by the actual width of an object.  For example, if you take an image of the bar code that is 1 inch wide and in the image the width of the bar code is 200 pixels, the sample density of the image is 200 dpi.

    • Post Points: 4
  • 10-24-2007 12:50 PM In reply to

    • bShe
    • Top 25 Contributor
    • Joined on 08-22-2007
    • Patch Code
    • Points 16

    Re: How does dpi or dpm get calculated?

    If that is the case, then cropping the image should not affect my decoding performance. But, that is not what I am seeing.  Could you give me some pointer on this?

     Thanks.

    • Post Points: 4
  • 10-24-2007 1:36 PM In reply to

    • Ben Hejl
    • Top 10 Contributor
    • Joined on 05-11-2007
    • Cherry Hill, New Jersey
    • Interleaved 2 of 5
    • Points 167

    Re: How does dpi or dpm get calculated?

    Decoding performance can vary based on sample density.  For example, if you take an image of a 13 mil UPC-A, the symbol is approximately 1.25 inches wide at 200 dpi the symbol will be approximately 250 pixels across.   A UPC-A symbol has 95 modules, so a narrow module will be about 2.5 pixels wide.  SwiftDecoder will decode this image assuming the bar code is not damaged.  If you now move the camera away from the bar code so you are now at 95 dpi, a narrow module will be approximately 1 pixel wide.  It is very unlikely that SwiftDecoder will decode an image at 1 pixel per module unless you have created a perfect binary representation of the symbol. 

    Cropping an image does not alter the sample density of the image.  Cropping an image will removes pixels, as long as you do not remove pixels containing the bar code, cropping the image will decrease the amount of time it takes to process an image.

    Filed under:
    • Post Points: 1
Page 1 of 1 (4 items)
Copyright Omniplanar, Inc. 2007
Powered by Community Server (Commercial Edition), by Telligent Systems