Get bitmap from camera preview - Android Studio

I want to make some machine vision application, and i need to have control of camera preview. I need to have bitmap of frames so i can change them, and display only ones i need. I found many examples on internet on how to live preview camera and capture image, but i need to have bitmap of preview, do some change and than display it on screen. It will probably be 2-3 fps but it doesn't matter. So my question is how to get bitmap of some frames of camera preview without actually preview it on screen, and is it better to use android.hardware.Camera or android.hardware.camera2.* ?

Related

Galaxy S3 mini photos aspect ratio problem

When I view my photos in gallery in landscape view, they usually fill the screen but recently the aspect ratio seems to have changed
and the photos no longer fill screen with 2 black bars each side of photo. I have never changed any settings to cause this
and i cant find any camera or photos setting to fix it. I have attached a picture.

Panorama mode needs some improvement

Perhaps I'm doing it wrong, but I just can't get the panorama mode to work properly with the S10+.
I have 2 major gripes with it:
The panorama doesn't go all the way around, so I don't get a full 360 degree panoramic photo
The photos always come out distorted/stretched when viewed elsewhere
With issue one, it only seems to take about 350 degrees, so I end up with a stitch that doesn't quite work out when I view the photo later. Apps like Google Photos helpfully turn these types of images into something similar to being there and rotating on the spot but because the phone doesn't seem to take a full photo this doesn't work properly.
On issue two, when viewing the photos in Google Photos or even Facebook, they try to make these images into a photosphere type image, so 360 degrees along the X and Y axis. The trouble is, even though these photos are taken with the wide angle camera, it stretches the image upwards and distorts it to get that 360 view. LG wide angle cameras (at least on the G6 which is the last one I owned) add about 10 degrees to the top and the bottom of a pano photo using AI to match the colours at the top and bottom (e.g. extra blue at the top for sky). This results in a blurry patch at the top and bottom of the photosphere, but also prevents the main part of the image being distorted.
Its a shame about both of these "features" as otherwise I'm pretty happy with the camera, but having distorted panoramas is not great.

Camera aspect ratio

Hi guys,
To my surprise, my brand new P30 Pro camera's app doesn't come with 16:9 aspect ratio resolution which is a shame...
My old Mate 10 Pro had it and I can't see myself watching my picutres with those 2 white squares on the left and right of my pictures...
Let me link you an official thread about this issue: https://uk.community.huawei.com/mate-20-series-20/who-would-like-the-option-to-take-16-9-aspect-ratio-photos-with-your-huawei-phone-1520
For me, it's a bummer...
If any of you is able to "mod" the app to get back that 16:9 aspect ratio with high resolution, please advise ! Or any kind of contact to Huawei cuz this doesn't look THAT complicated to add back..
Regards
Yea, that would be awesome to have this. A phone this expensive doesn't have this crucial aspect ratio? How come? Don't people watch photos on tvs or monitors? 16:9 should be the standard for casual photographers.
It still has a full screen photo mode, but you have to lower the photo megapixels from 10 megapixels to (full screen) 6
Matziatzu said:
It still has a full screen photo mode, but you have to lower the photo megapixels from 10 megapixels to (full screen) 6
Click to expand...
Click to collapse
Full screen is 19.5:6 aspect ratio, which is far too wide. The point is to view the photos on TV or monitor in full screen. This aspect ratio is rather useless, it crops too much. The camera is nice, but if I knew it doesn't have 16:9, I'm not sure if I would buy this phone. Now it's too late, already bought, and I'll have to spend a lot of time to crop thousands of photos I'm doing on my trips.
Also the default gallery application in which I can crop the photos has a bug - if I do a 4:3 photo in 40 megapixels and crop it to 16:9 in the default gallery application, it changes the photo resolution to 3648x2050 from 7296x5472, so I need to use some external app for that.
So if anyone is reading this:
DO NOT CROP THE PHOTOS WITH DEFAULT APPLICATION
Pivoo said:
Full screen is 19.5:6 aspect ratio, which is far too wide. The point is to view the photos on TV or monitor in full screen. This aspect ratio is rather useless, it crops too much. The camera is nice, but if I knew it doesn't have 16:9, I'm not sure if I would buy this phone. Now it's too late, already bought, and I'll have to spend a lot of time to crop thousands of photos I'm doing on my trips.
Also the default gallery application in which I can crop the photos has a bug - if I do a 4:3 photo in 40 megapixels and crop it to 16:9 in the default gallery application, it changes the photo resolution to 3648x2050 from 7296x5472, so I need to use some external app for that.
So if anyone is reading this:
DO NOT CROP THE PHOTOS WITH DEFAULT APPLICATION
Click to expand...
Click to collapse
Use Google photos app:
7296x5472--->7296x4102
40mp--->29,9mp
HDJ80 said:
Use Google photos app:
7296x5472--->7296x4102
40mp--->29,9mp
Click to expand...
Click to collapse
if you mean this one:
getdroidtips.com/download-google-camera-for-huawei-p30-pro/
I tried it. Sure it makes the photos, but it has lots of issues:
1. Camera switching doesn't work, I can only use the main camera. No wideangle, no tele
2. After zooming in the app crashes
3. Max mp I can get in 16:9 mode is 8.3, not 29.9
4. No portrait mode and lots of other modes from stock application are also missing.
So sure, I can do photos with 16:9, but what's the point if I can't use most of options that hardware provides? Cropping for hours or days after making thousands of photos is still the only option here.
There is not good solution, which is really sad.
And if you mean an app for cropping, I already found a better one - Simple Gallery and PicTools for cropping in bulk.
News about this topic? I have just faxed
Faced this on my Huawei and I feel really frustrated!
Enviado de meu SM-G950F usando o Tapatalk

Mi 9 stock camera app question

I have 16:9 mode enabled, but viewfinder (i.e. the screen) has this big semitransparent black area on the right that makes it difficult to visualize what's in the picture. The shutter and some options are on this big black stripe. But it is really getting in the way.
In 4:3 mode the stripe becomes solid and everything is ok, but in 16:9 part of the photo is actually behind that stripe which really makes it hard to take good pics.
Any solution or workaround? Do most people take 16:9 pictures these days?
I try take 16:9 it's look zoom in on camera app but after take photo it's look normal

Question B+W PHOTOS

How do I take B+W photos but not with the filters ?
Just use a photo editor and reduce saturation to zero.
Also there are many camera apps on the store that take B&W photos so you can preview before taking the shot
turdboman said:
How do I take B+W photos but not with the filters ?
Click to expand...
Click to collapse
Not possible as it is limited by hardware. The sensors on the s21 ultra has a physical color filter array on them which helps them to capture RGB spectrum.
So unless you are talented enough to remove this RGB filter and replace it with a monochrome filter, you will have to use software simulation to enjoy b&w photos.
When it records the image it records the gray scale for each channel, the b&w image is already there. Simply edit/save with saturation at zero.
That's how I set up the proper contrast and black level, then bring up the saturation when editing sometimes.
Or shoot in RAW mode and post edit that image as you have all the raw sensor data. I doubt you'll see much if any difference...
This isn't rocket science.

Categories

Resources