How to calculate appropriate compression factor?

If I have an image size 3 inches x 4 inches stored in my computer with the resolution of 1200 dpi.
What is the appropriate compression factor, if this image has to be displayed on a screen of size 6 inches by 8 inches having a resolution of 200 lines per inch and 200 dots per line.

Answers (2)

Image Analyst
Image Analyst on 22 Mar 2014
Edited: Image Analyst on 22 Mar 2014
Calculate how many dots are in the original image, and how many can be displayed on the screen. You don't need more than you can display. Compression factor uses the ratio of those numbers of dots. You should be able to figure it out!

6 Comments

(3 inches x 1200 dpi) x (4 inches x 1200 dpi) = 3600 x 4800 pixels.
(6 inches x 600 dpi) x (8 inches x 600 dpi) = 3600 x 4800 pixels.
1200/600=2X size We need to compress the image 2X size (double size or 200% size)
Or:
600/1200=1/2 size We need to compress the image 1/2 size (have size or 50% size)
but I think it is way more than 1:2
No. You're confusing compression, which is the number of bytes to save something to a disk file, with magnification, which is the number of pixels required to display an image. Your image is 3600 by 4800 pixels. You would be displaying that on a screen with the same number of pixels. It is displayed pixel for pixel. The display software will take 1 pixel and instead of displaying it in 1/1200th of an inch display it in a larger patch of 1/600 of an inch. It's the same number of pixels just being displayed over a larger area. The compression is none, the pixel magnification is 1 (same number of pixels), and the physical magnification is 2 (displayed 6 inches tall instead of 3 inches tall).
So how to convert 200 lines per inch and 200 dots per line into dpi to calculate the compression ratio??
I found that (Dpi = 2 X Lpi) but I don't know if that correct or not.
I did not find any thing about dots per line. Any suggestions.
In the context you have, when it is written as "1200 dpi" then that is the same thing as "1200 pixels per inch".
It would technically be different if you were talking about an inkjet print with microdots as microdots are often not physically printed in a square matrix: there is instead often a a bit of offset in some rows in order to prevent moire patterns on the output.
I think to calculate the compression factor it should be both the same unit.
So, I want to convert all the units to Dpi.
The lines per inch and dots per line to Dpi.
What does DPI have to do with compression? Magnification yet, but compression? What if I have a 3600 x 4800 pixel image and I display it at 1 dpi on the jumbotron at a stadium? If my image compressed by 1200 to 1? No.
A line pair requires one line to be bright and one line to be dark. Two rows (lines) - that's a line pair . So you need two rows to get a single line pair. That's where your factor of 2 comes from. But it has nothing to do with what we're talking about.

Sign in to comment.

You should be treating the display as one vertical pixel per line.
You should be able to calculate the resizing easily enough. You are doubling the horizontal and vertical sizes, which would stretch the 1200 dpi out to 600 dpi. The display is only capable of 200 dpi so you need to subsample by a factor of 3.

3 Comments

That mean the answer will be:
(DPI)2 = pixels
1200 x 1200 = 1,440,000 pixels
LPI x 2 = DPI.
400 x 400 = 160,000 pixels
compression ratio = size of original image / size of compressed image
= 1,440,000 / 160,000= 9:1
No, subsampling and compression are not the same thing. To do the required display you need to subsample, not to compress.
If you were to take the image and put it through lossy JPEG you could likely get 9:1 compression without much difficulty, but the result would still be a 3600 x 4800 image, which you would not be able to display on a 1200 x 1600 display.
"Compression" is a reduced-memory representation of the same data. What you need is less data, not the same data stored in less computer memory.
I agree. Like I said above, you're talking more about magnification (replicating/interpolating pixels, or in your particular case subsampling), rather than compression. Why do you keep wanting to use the term compression? Is there someone who is telling you that compression is the proper term, even though Walter and I are telling you it's not?

Sign in to comment.

Categories

Find more on Images in Help Center and File Exchange

Tags

Asked:

on 21 Mar 2014

Commented:

on 25 Mar 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!