On my Lumia 920 GetAvailablePreviewResolutions() returns that the following 4 resolutions are available for the target device:
1280x720
1024x768
800x448
640x480
but SetPreviewResolutionAsync() accepts only 1024x768. For the other three (supported) resolutions it throws an exception
System.ArgumentException: Value does not fall within the expected range.
I have restarted my phone but it doesn't seem to help either.
==========================================================================
For future developers who face the same problem, below are my findings.
Nokia Lumia 920 supports the following 6 capture resolutions (with their corresponding aspect ratio):
3264X2448 4:3;
3552X2000 16:9;
2592X1936 4:3;
2592X1456 16:9 ;
2048X1536 4:3 ;
640X480 4:3 ;
and following 4 preview resolutions (with their corresponding aspect ratio):
1280X720 16:9;
1024X768 4:3 ;
800X448 16:9 ;
640X480 4:3;
for 16:9 aspect ratio capture_resolutions use only the 16:9 preview_resolutions.
Ref: http://www.developer.nokia.com/Resources/Library/Lumia/#!advanced-photo-capturing.html
Ref: http://msdn.microsoft.com/en-us/library/windowsphone/develop/windows.phone.media.capture.photocapturedevice.setpreviewresolutionasync(v=vs.105).aspx
For future developers who face the same problem, below are my findings.
Nokia Lumia 920 supports the following 6 capture resolutions (with their corresponding aspect ratio):
3264X2448 4:3;
3552X2000 16:9;
2592X1936 4:3;
2592X1456 16:9 ;
2048X1536 4:3 ;
640X480 4:3 ;
and following 4 preview resolutions (with their corresponding aspect ratio):
1280X720 16:9;
1024X768 4:3 ;
800X448 16:9 ;
640X480 4:3;
for 16:9 aspect ratio capture_resolutions use only the 16:9 preview_resolutions.
Ref: http://www.developer.nokia.com/Resources/Library/Lumia/#!advanced-photo-capturing.html
Ref: http://msdn.microsoft.com/en-us/library/windowsphone/develop/windows.phone.media.capture.photocapturedevice.setpreviewresolutionasync(v=vs.105).aspx
Related
I am trying to set the fps of the coral mipi camera to 60fps. From the datasheet, it says it can run 720p at 60fps so i know the camera is capable.
I have set the resolution using the following command which works.
v4l2-ctl --device=/dev/video1 --set-fmt-video=width=1280,height=720
but when I set the fps to 60, the max limit seem to be 30.
mendel#mocha-calf:~$ v4l2-ctl --device=/dev/video1 -p 60
Frame rate set to 30.000 fps
There are no option to set exposure or gain. Would I have to rebuild the driver to be able to have these options?
Regards
Paul
60 FPS not supported. Please see the supported formats below.
mendel#tuned-rabbit:~$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'YUYV' (YUYV 4:2:2)
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 720x480
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1920
And for changing/setting exposure and gain, you may need to make modifications in the current driver code and rebuild the kernel image. Driver code can be found at:
https://coral.googlesource.com/linux-imx/+/refs/heads/master/drivers/media/platform/mxc/capture/ov5645_mipi_v2.c#2774
And instructions to build the kernel image can be seen at : https://coral.googlesource.com/docs/+/refs/heads/master/GettingStarted.md
I've setup a camera in a squash club and want it to tell me if the squash court is occupied or empty. I trained it with a few hundred images of occupied and empty courts and the results are good.
Now the catch is sometimes the club closes early and the lights get turned off. So I basically have almost black images. I tried adding a few of these images to my "empty" squash court training set. I re-ran the image training but the new model does not predict these dark images as empty. It thinks they are occupied.
I next tried creating a new class called "court_closed". I put five of these dark images there and re-trained. Now the model thinks dark images are "empty". That is technically an improvement over thinking they are occupied. But why is it not predicting them as "court_closed"? Do I need to add hundreds of nearly identical dark/black images?
Here's an example image:
Think I figured it out by just using Imagemagick command line. I can convert the image to HSI or LAB and get the brightness (Intensity or Luminosity) from the average of the I or L channel.
convert court1.jpg -colorspace HSI -channel b -separate +channel -scale 1x1 -format "%[fx:100*u]\n" info:
The result will be between 0 and 100% with 0 being black and 100 white
I've searched for a while now, but can't seem to get the answer I'm looking for.
I have an image, when I do properties on that image it says:
Dimensions 1717x697
Width 1717 pixels
Height 697 pixels
Horizontal Resolution 96 dpi
Vertical Resolution 96 dpi
Bit depth 32
So everything I've found searching says to get inches you are supposed to divide the pixels by the dpi...
So when I divide 697 by 96 I get 7.26041...
The height of my document that was scanned was 3.5 inches tall...how is that possible?
What I'm trying to do is if I have a piece of paper that is scanned and that piece of paper is 3.5 by 8.5 (coupon) I want to be able to know the the inches of that document based on pixels or some other method.
Thanks,
Mark
I am using NI PCI-1411 frame brabber card and the signal is RS-170 signal. According to the discussion on the website:https://www.cs.rochester.edu/~nelson/courses/vision/resources/video_signals.html.
It said"The aspect (width to height) ratio for typical RS-170 signal rectangle is 4:3. The vertical resolution of video is limited to 485 pixels, as determined by the number of scan lines. The RS-170 standard specifies the aspect ratio (ratio of vertical/horizontal dimensions) of the video display as 3:4"
The CCD I use is Hitachi KP-M1AN.Its number of pixels are 768(H)*494(V) and the pixels size is 11.64(um) * 13.5(um),sensing area is 8.91*6.67mm,Horizontal/Vertical TV resolution is 570/485
Here are my questions:
1.Now I gave a square object to CCD (The CCD is Hitachi KP-M1AN.CCD pixels size is 11.64(um)*13.5(um) and the ).According to the pixel size on CCD, the horizontal pixel numbers should be different with vertical pixel numbers.however, I notice the pixel numbers at both directions are same. So I wonder what is the "real" pixels size now after the ratio change ?
For example, here is a square object is 143um*143um and CCD pixel size is 11um*13um.And according to pixel size it must be 13 pixels * 11 pixels. But what I see now is 12 pixels * 12 pixels.
2.According to question 1, if the pixels size change owning to the ratio change.How does the NI software change the pixel size (I mean extend it or compress it.)
Very simply I have a script that calls imagemagick on my photos.
The original image is 320 x 444, and I want to create a few scaled down versions but keeping the same aspect ratio
I call imagemagick using
convert oldfile.png -resize 290x newfile.png
I want to scale it to my set widths but the heights scale accordingly.
I do 80x, 160x and 290x in 3 separate commands.
The smallest 2 produce images with the same original aspect ratio, the 290x does not.
The size of the image it produces is 290 x 402
I have no idea why that one fails to keep the aspect ratio but the other 2 sizes maintaine it.
Any ideas?
I think that the problem in the third command is the requested size itself:
in the first command both dimensions are divided by 4: 320/4=80 and 444/4=111
in the second command both dimensions are divided by 2: 320/2=160 and 444/2=222
444 and 320 have only two common divisors: 2 and 4. You already used these divisors in your first two commands, so any other (width, height) couple will give you a slightly different aspect ratio: it is impossible to obtain the same exact aspect ratio fixing 290.
In fact while your original image has an aspect ratio of 1.3875, with a 290x403 image you would obtain an aspect ratio of 1,389655172 and with a 290x402 image you would get a 1,386206897 ratio: fixing 290 there is no other dimension's value that can give you the desired aspect ratio.
In general however Imagemagick always tries to preserve the aspect ratio of the image, as you can read in Imagemagick documentation:
The argument to the resize operator is the area into which the image
should be fitted. This area is not the final size of the image but the
maximum sizes for the image. that is because IM tries to preserve the
aspect ratio of the image more than the final (unless a '!' flag is
given), but at least one (if not both) of the final dimensions should
match the argument given image. So let me be clear... Resize will fit
the image into the requested size. It does NOT fill, the requested box
size.
For further reference see here