Getting bad image quality with android CameraX library

244 views
Skip to first unread message

Mohammad Sajib Al Seraj

unread,
Aug 8, 2022, 1:14:14 PM8/8/22
to Android CameraX Discussion Group

Hello,
I am developing a camera application with the CameraX library, but I found quality discrepancy native camera app photo and my application photo. I have tested photos taken with the same lighting condition.

Is there any way to improve image quality with CameraX?

Thanks in advance
Mohammad

Android CameraX Discussion Group

unread,
Aug 8, 2022, 1:22:12 PM8/8/22
to Android CameraX Discussion Group, mals...@mtu.edu
Hi Mohammad,

Thanks for writing in. This is a complicated topic and it depends on a lot of things. For starters which devices have you noticed this on? Please keep in mind that the native camera may have access to APIs not available in the Camera2 Public API so neither the Camera2 or CameraX API may not be 100% able to duplicate what the native camera can produce.

You can also file an issue with us here: https://issuetracker.google.com/issues/new?component=618491&template=1257717 (please attach examples and how you are setting up your capture, etc) 

Mohammad Sajib Al Seraj

unread,
Aug 8, 2022, 3:51:36 PM8/8/22
to Android CameraX Discussion Group
Thanks for the reply. I have noticed this discrepancy on Samsung A72 devices. I will create an issue there.
I have another question. When I found bad quality image I thought maybe the reason behind is JPEG compression. I saved photos in different file formats (HEIF, PNG, RAW). I am wondering why all the images (including the RAW one) still have the characteristics of a JPEG file, no matter which format I picked in the code – RAW and HEIF included. Is there still some conversion going on in the image stream? I looked at the raw data info in exifTool and says JPEG encoding, even for the “PNG” file.

---- System ----
     - File Name                       : 8.PNG
     - Directory                       : C:/Users/86010943/OneDrive - Kodak Alaris, Inc/Documents/exiftool-12.40
     - File Size                       : 1344 KiB
     - Zone Identifier                 : Exists
     - File Modification Date/Time     : 2022:08:05 11:44:20-04:00
     - File Access Date/Time           : 2022:08:08 15:44:06-04:00
     - File Creation Date/Time         : 2022:08:08 15:44:02-04:00
     - File Permissions                : -rw-rw-rw-
---- File ----
     - File Type                       : JPEG
     - File Type Extension             : jpg
     - MIME Type                       : image/jpeg
     - Exif Byte Order                 : Big-endian (Motorola, MM)
     - Image Width                     : 4032
     - Image Height                    : 3024
     - Encoding Process                : Baseline DCT, Huffman coding
     - Bits Per Sample                 : 8
     - Color Components                : 3
     - Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)

Thanks
Mohammad

Android CameraX Discussion Group

unread,
Aug 8, 2022, 10:16:55 PM8/8/22
to Android CameraX Discussion Group, mals...@mtu.edu
Thanks for creating a ticket in the component. Let's move the discussion to the issue tracker. Thanks!

Reply all
Reply to author
Forward
0 new messages