I am developing an Android application in 2.2, which uses Camera. Now Can anyone tell me that "Is it possible to programmatically determine the Camera Resolution in Megapixels in Android"
Checking megapixel count on an Android phone Just open the camera app, click the settings icon (the small cog) and you should find the megapixel information listed under the heading "Photo size".
You need to multiply the width by the height and then divide by 1,000,000. For instance, if you wanted to calculate the megapixels in a 1920x1080 screen, you would multiply 1920 by 1080 to get 2,073,600. When you divide that by 1,000,000, you get 2.07 megapixels.
Measuring the Resolution Resolution can be identified by the measurement of pixels in dimensions of height and width. For example, a camera manufacturer can describe the resolution of the camera as 3904×2598 (W x H) pixels, which again can be termed as 3904×2598=10,142,592 pixels.
Image sizes There are two main resolutions for the HD specification, 720p (1280×720, just less than 1-megapixel) and 1080p (1920×1080, 2.1-megapixel).
if you've got the camera object, try:
android.hardware.Camera.Parameters parameters = camera.getParameters(); android.hardware.Camera.Size size = parameters.getPictureSize(); int height = size.height; int width = size.width;
What does image resolution mean?
Resolution refers to the number of pixels in an image. Resolution is sometimes identified by the width and height of the image as well as the total number of pixels in the image. For example, an image that is 2048 pixels wide and 1536 pixels high (2048X1536) contains (multiply) 3,145,728 pixels (or 3.1 Megapixels). You could call it a 2048X1536 or a 3.1 Megapixel image. As the megapixels in the pickup device in your camera increase so does the possible maximum size image you can produce. This means that a 5 megapixel camera is capable of capturing a larger image than a 3 megapixel camera.
Example: 1936 x 1552 / 1024000 = 3 Mega Pixels
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With