I have Raspberry Pi Zero 2 W with RPi cam v2 (64-bit BullsEye)
The image was taken with libcamera-jpeg -o test.jpg -t 2000 --width 640 --height 480
The video was taken with libcamera-vid -o test.h264 -t 2000 --width 640 --height 480
Why is the video zoomed in?
Update: I noticed when I do use libcamera-hello --list-cameras
the output is:
Available cameras
-----------------
0 : imx219 [3280x2464] (/base/soc/i2c0mux/i2c#1/imx219#10)
Modes: 'SRGGB10_CSI2P' : 640x480 [206.65 fps - (1000, 752)/1280x960 crop]
1640x1232 [41.85 fps - (0, 0)/3280x2464 crop]
1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]
3280x2464 [21.19 fps - (0, 0)/3280x2464 crop]
'SRGGB8' : 640x480 [206.65 fps - (1000, 752)/1280x960 crop]
1640x1232 [41.85 fps - (0, 0)/3280x2464 crop]
1920x1080 [47.57 fps - (680, 692)/1920x1080 crop]
3280x2464 [21.19 fps - (0, 0)/3280x2464 crop]
Why is it saying 1280x960 crop next to 640x480?
Related
In android we define text size as dp but in flutter text size is in pixel then how to match same in flutter.
How to achieve same in flutter.
Any help is appreciated!
From the Android Developer Documentation:
px
> Pixels - corresponds to actual pixels on the screen.
in
> Inches - based on the physical size of the screen.
> 1 Inch = 2.54 centimeters
mm
> Millimeters - based on the physical size of the screen.
pt
> Points - 1/72 of an inch based on the physical size of the screen.
dp or dip
> Density-independent Pixels - an abstract unit that is based on the physical density of the screen. These units are relative to a 160
dpi screen, so one dp is one pixel on a 160 dpi screen. The ratio of dp-to-pixel will change with the screen density, but not necessarily in direct proportion. Note: The compiler accepts both "dip" and "dp", though "dp" is more consistent with "sp".
sp
> Scaleable Pixels OR scale-independent pixels - this is like the dp unit, but it is also scaled by the user's font size preference. It is recommended you
use this unit when specifying font sizes, so they will be adjusted
for both the screen density and the user's preference. Note, the Android documentation is inconsistent on what sp actually stands for, one doc says "scale-independent pixels", the other says "scaleable pixels".
From Understanding Density Independence In Android:
Density Bucket
Screen Density
Physical Size
Pixel Size
ldpi
120 dpi
0.5 x 0.5 in
0.5 in * 120 dpi = 60x60 px
mdpi
160 dpi
0.5 x 0.5 in
0.5 in * 160 dpi = 80x80 px
hdpi
240 dpi
0.5 x 0.5 in
0.5 in * 240 dpi = 120x120 px
xhdpi
320 dpi
0.5 x 0.5 in
0.5 in * 320 dpi = 160x160 px
xxhdpi
480 dpi
0.5 x 0.5 in
0.5 in * 480 dpi = 240x240 px
xxxhdpi
640 dpi
0.5 x 0.5 in
0.5 in * 640 dpi = 320x320 px
Unit
Description
Units Per Physical Inch
Density Independent?
Same Physical Size On Every Screen?
px
Pixels
Varies
No
No
in
Inches
1
Yes
Yes
mm
Millimeters
25.4
Yes
Yes
pt
Points
72
Yes
Yes
dp
Density Independent Pixels
~160
Yes
No
sp
Scale Independent Pixels
~160
Yes
No
More info can be also be found in the Google Design Documentation.
What is the size (in pixels or points) of the notch of the iPhone Xr and the iPhone Xs Max? I know them for the iPhone X, see "iPhone X Cutout" on https://www.paintcodeapp.com/news/iphone-x-screen-demystified
I believe the iPhone Xs has the same dimensions.
I'm trying to make a game that hugs the space right up to the pixel.
Via #prabhat-kasera
It's 30 X 209 Pt
I see now what my error was: I was using 30/2436 % of the screen for both phones.
I should use 30/1624 for iPhone Xr and 30/2688 for iPhone Xs Max.
Device-agnostic code:
// Landscape
float screenRatio = 30 * ((float)UIScreen.mainScreen.scale) /
UIScreen.mainScreen.currentMode.size.width;
// Portrait
float screenRatio = 30 * ((float)UIScreen.mainScreen.scale) /
UIScreen.mainScreen.currentMode.size.height;
I have an issue 2 days ago as the title above.
I tried Screen.width, Screen.currentResolution.width, Display.main.systemWidth but it was returned unexpected result.
tested on note8, s7, s7+, s6, s5, moto x gen 1
some device run android 6, and some run android 7
tried with DisplayMetrics class via AndroidJavaClass Unity.
Example: I want get note resolution: the expected result: 1440w x 2960h, but it give me 810w x 1440h
with AndroidJavaClass:
- Density: 1.96875
- Density dpi: 315
- Width px: 810
- Height px: 1440
- Scaled density: 1.96875
- xDpi: 290
- yDpi: 292
Any help pls?
I am using UIImagePickerController to record videos and I always want the output video to be 1280 x 720 (small enough for other purposes), but in iphone 4s/iphone 5, the output video will be 1920 x 1280. I cannot find a proper configuration that helps me to make the video exactly 1280 x 720.
UIImagePickerControllerQualityTypeHigh = 0,
UIImagePickerControllerQualityTypeMedium = 1, // default value
UIImagePickerControllerQualityTypeLow = 2,
UIImagePickerControllerQualityType640x480 = 3,
High will be 1920 x 1280 in iPhone 4s/iPhone 5
Maybe this thread could help!
You should use google before asking questions like this. :D
Link to thread on stackoverf.
In specs,
iPhone 4 screen resolution & pixel
density
* iPhone 4 has a screen resolution of 960×640 pixels, which is twice that of
the prior iPhone models
As we know, when we code like this,
CGImageRef screenImage = UIGetScreenImage();
CGRect fullRect = [[UIScreen mainScreen] applicationFrame];
CGImageRef saveCGImage = CGImageCreateWithImageInRect(screenImage, fullRect);
the saveCGImage will have size (320,480), my question is how about iPhone 4 ? Is that (640,960) ?
Another question is about black image in thumb view when you open Photo.app if coding like this,
CGImageRef screenImage =
UIGetScreenImage();
CGImageRef saveCGImage = CGImageCreateWithImageInRect(screenImage, CGRectMake(0,0,320,460)); // please note, I used 460 instead of 480
The problem is that when open "Photo.app", in the thumb view, those images are view as black, when clicking it to see details, that is okay.
Any solution for this issue now ?
Thanks for your time.
update questions:
When you invoke UIGetScreenImage() to capture screen in iPhone 4, is that also 320x480 ?
From Falk Lumo:
iPhone 4 main camera:
5.0 Mpixels (2592 x 1936)
1/3.2" back-illuminated CMOS sensor
4:3 aspect ratio
35 mm film camera crop factor: 7.64
Low ISO 80 (or better)
3.85 mm lens focal length
f/2.8 lens aperture
Autofocus: tap to focus
Equivalent 35mm film camera and lens:
30 mm f/22
Photo resolution taken by iOS devices,
iPhone 6/6+, iPhone 5/5S, iPhone 4S(8 MP) - 3264 x
2448 pixels
iPhone 4, iPad 3, iPodTouch(5 MP) - 2592 x 1936 pixels
iPhone 3GS(3.2 MP) - 2048 x 1536 pixels
iPhone 2G/3G(2 MP) - 1600 x 1200 pixels