Go Back   Steve's Digicams Forums > Digicam Help > Newbie Help

Reply
 
Thread Tools Search this Thread
Old Apr 29, 2011, 11:59 PM   #1
Junior Member
 
Join Date: Apr 2011
Posts: 2
Default I really need help to convert megapixel to resolution

Hi guys, normally we calculate the resolution to mega pixel.

As an example: 1024x1024 pixel sensor will be equal to 1048576 bytes. Therefore the file size of 1MP image will be 1.05MB

But now..the question was given in Mega pixel only without the resolution..

1) Calculate size required for file where each pixel is represented by RGB components, provided each component takes 8 bytes for the following cameras

b) 2 mega pixel camera ( ? x ? pixel sensor)
c) 5 mega pixel camera ( ? x ? pixel sensor)
d) 12 mega pixel camera ( ? x ? pixel sensor)

so guys....please HELP ME..how convert these mega pixel to resolution ?x? ...please guys... and how to deal with that " provided each component takes 8 bytes for the following cameras"

please guys..I'm so stuck
aspirin is offline   Reply With Quote
Sponsored Links
Old Apr 30, 2011, 6:11 AM   #2
Senior Member
 
MartinSykes's Avatar
 
Join Date: Feb 2010
Location: Cheshire, UK
Posts: 854
Default

Homework problem?

w*h = resolution (pixels)
pixels * bytes per pixel = file size

(assuming no compression or header information etc)

(Also check your question - 8 BITS (1 BYTE) per component is more likely than 8 BYTES per component)

2 million pixels * 3 components * 1 byte per component = 6 million bytes (6 MB)

Note it doesn't matter what the (? x ?) of the sensor is, just the total pixels.

If you want to estimate the width and height, you need to know the aspect ratio which is probably 3:2 or 16:9 for widescreen.

If 3:2 then w=h*3/2
So the pixels = w*h = h*3/2*h = h^2 * 3/2
So h=sqrt(pixels/ (3/2))

So for a 2MP image, the height is about 1150 and the width is about 1150*3/2=1725
So a 2MP sensor is probably about 1725 x 1150

Unless you've been told otherwise, I'd assume 1MP is 1 million pixels, not 1048576 pixels. You're introducing spurious accuracy to your calculation.
__________________
AutoHDR - Free HDR software for Windows at http://www.autohdr.co.uk on Facebook at http://www.facebook.com/home.php?sk=...36045126467361
My Flickr stream: http://www.flickr.com/photos/martinsykes
Panasonic DMC-FZ38, Sony ­α580

Last edited by MartinSykes; Apr 30, 2011 at 6:14 AM.
MartinSykes is offline   Reply With Quote
Old Apr 30, 2011, 11:06 AM   #3
Junior Member
 
Join Date: Apr 2011
Posts: 2
Default

thanks Martin for your explanation!! phew!! you are my hero!! LOL..thanks again.
aspirin is offline   Reply With Quote
Old Apr 30, 2011, 8:42 PM   #4
Senior Member
 
BillDrew's Avatar
 
Join Date: Jun 2002
Location: Hay River Township, WI
Posts: 2,512
Default

Martin is right.

A simpler (but excesively bracketed) statement is: Megapixels is/are resolution (all else equal (it never is)).
BillDrew is offline   Reply With Quote
Old May 1, 2011, 11:02 AM   #5
Senior Member
 
TCav's Avatar
 
Join Date: Sep 2005
Location: Washington, DC, Metro Area, Maryland
Posts: 13,572
Default

Quote:
Originally Posted by MartinSykes View Post
If you want to estimate the width and height, you need to know the aspect ratio which is probably 3:2 or 16:9 for widescreen.
The 3:2 aspect ratio is common for dSLRs, but for P&S digicams the aspect ratio is usually 4:3.
__________________
  • The lens is the thing.
  • 'Full Frame' is the new 'Medium Format'.
  • "One good test is worth a thousand expert opinions." - Tex Johnston, Boeing 707 test pilot.
TCav is offline   Reply With Quote
Old May 7, 2011, 1:14 PM   #6
Member
 
Join Date: Oct 2010
Posts: 49
Default

@MartinSykes

Can you explain a bit further how to get WxH? Can't seem to understand with the given solution

i.e.,
5MP = WxH?

Thanks in advance!
__________________
Nikon D7000 | Nikkor 18-105mm | SB-700 | Nikkor 70-300 VR

Last edited by LGWGM; May 7, 2011 at 1:32 PM.
LGWGM is offline   Reply With Quote
Old May 7, 2011, 1:51 PM   #7
Senior Member
 
MartinSykes's Avatar
 
Join Date: Feb 2010
Location: Cheshire, UK
Posts: 854
Default

5MP = WxH

You have one equation with two unknowns so you need a second equation. We can make an assumption about the aspect ratio and use that. Let's guess at 3:2. So...

W=H*3/2

Putting the second equation into the first gives us

5MP= (H*3/2) * H

Rearranging it gives us

5=H*H * 3/2
so H*H = 5/ (3/2)
H*H = 3.33

Therefore H = sqrt(3.33) = 1.82

And putting that back into the second equation gives us:

W=H*3/2
W=1.82*3/2
W=2.73

So for a 5MP sensor with an aspect ratio of 3:2, it's 2730x1820 (approximately)

Basically 5MP is the area of the sensor and there are any number of rectangles that can have a 5MP area so you have to choose one an aspect ratio.

2580x1940 = 5MP with a 4:3 aspect ratio
2730x1820 = 5MP with a 3:2 aspect ratio
2980x1680 = 5MP with a 16:9 aspect ratio
__________________
AutoHDR - Free HDR software for Windows at http://www.autohdr.co.uk on Facebook at http://www.facebook.com/home.php?sk=...36045126467361
My Flickr stream: http://www.flickr.com/photos/martinsykes
Panasonic DMC-FZ38, Sony ­α580

Last edited by MartinSykes; May 7, 2011 at 1:53 PM.
MartinSykes is offline   Reply With Quote
Old May 10, 2011, 11:30 PM   #8
Senior Member
 
Join Date: Mar 2006
Posts: 163
Default

To double res you need to 4x not 2x. 8mp is not double of 4mp; 16mp is. both width&height have to be doubled. However, size of sensor determines quality more than MPs. ex: 6mp SLR will have 4x res of a 6mp P&S.
romphotog is offline   Reply With Quote
Old May 16, 2011, 6:13 PM   #9
Senior Member
 
TCav's Avatar
 
Join Date: Sep 2005
Location: Washington, DC, Metro Area, Maryland
Posts: 13,572
Default

Suppose you have a 12MP image sensor with an aspect ratio of 3:2. The 3:2 aspect ratio means that for every three wide, it's 2 high. Imagine that there are six squares on the image sensor, arranged 2 high and 3 wide. If you divide the 12,000,000 pixels by six, that means each square has 2,000,000 pixels in it. To find the dimentions of that square, take the square root of 2,000,000. That means the square has 1414.2 pixels on each side. Since the sensor is 2 squares by 3 squares, that means the sensor has a resolution of 2828.4 by 4242.6 (or thereabouts.)

You can do the same thing with a 12MP sensor with an aspect ratio of 4:3. That sensor has 12 squares arranged 3 high and 4 wide. Divide the 12MP by the 12 squares (1,000,000) and take the square root (1,000). So a 12MP sensor with a 4:3 aspect ratio would have a resolution of 3000 by 4000.

The same is true for a 16:9 aspect ratio sensor, or any other aspect ratio.
__________________
  • The lens is the thing.
  • 'Full Frame' is the new 'Medium Format'.
  • "One good test is worth a thousand expert opinions." - Tex Johnston, Boeing 707 test pilot.
TCav is offline   Reply With Quote
Old May 17, 2011, 12:10 PM   #10
Senior Member
 
BillDrew's Avatar
 
Join Date: Jun 2002
Location: Hay River Township, WI
Posts: 2,512
Default

Two equations in two unknowns: h (height in pixels) and w (width in pixels). Known are the total pixels which is hxw and aspect ration which is w/h.

As an example:
Aspect ratio = 16/9 = w/h or w=hx16/9
Total Pixels = 12,000,000 = hxw or substituting from above
Total Pixels = 12,000,000 = hxhx16/9 so
hxh = 6,750,000 taking the square root
h=2,598 and w = 2,598x16/9 = 4618.

Just to check,
hxw = 11,997,564 close enough to 12Mp
BillDrew is offline   Reply With Quote
 
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -5. The time now is 10:44 PM.