Hello all,
Having a problem with the Camera. I am using the sabresd board(mx6) with android lollipop , freescale release with kernel 3.10.53.
With the problem about the Camera, we are looking into the camera zoom feature, I would like to implement the digital zoom on this version and my product , is there any piece of code or implementation already done?. I am using the ov5640 mipi camera . If not kindly guide us to implement the same.
At android Hal layer we are using libcamera2 libaries.
Thanking you
Regards,
Karan
Hi Karan
please check examples on
https://community.freescale.com/docs/DOC-93822
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Igor ,
I have checked the above , but when trying to implement the same I came across the some codes where I observe that the zoom feature is enables as in the files ,
/frameworks/av/services/camera/libcameraservice/api1/client2/Parameters.cpp
Further more when trying to find the cause of the failure, we followed the logcat and came across the snippet in the file,
frameworks/base/core/java/android/hardware/camera2/legacy/LegacyRequestMapper.java as
// Add all non-zero weight regions to the list | |
List<MeteringRectangle> meteringRectangleList = new ArrayList<>(); | |
for (MeteringRectangle rect : meteringRegions) { | |
if (rect.getMeteringWeight() != MeteringRectangle.METERING_WEIGHT_DONT_CARE) { | |
meteringRectangleList.add(rect); | |
} | |
} | |
if (meteringRectangleList.size() == 0) { | |
Log.w(TAG, "Only received metering rectangles with weight 0."); | |
return Arrays.asList(ParameterUtils.CAMERA_AREA_DEFAULT); | |
} | |
// Ignore any regions beyond our maximum supported count | |
int countMeteringAreas = | |
Math.min(maxNumMeteringAreas, meteringRectangleList.size()); | |
List<Camera.Area> meteringAreaList = new ArrayList<>(countMeteringAreas); |
for (int i = 0; i < countMeteringAreas; ++i) { | |
MeteringRectangle rect = meteringRectangleList.get(i); | |
ParameterUtils.MeteringData meteringData = | |
ParameterUtils.convertMeteringRectangleToLegacy(activeArray, rect, zoomData); | |
meteringAreaList.add(meteringData.meteringArea); | |
} |
Based on this I believe that to enable the zoom feature on the camera the measuring (weighted sum ) of the AWB has to be calculated . From the above code the log is seen Only received metering rectangles with weight 0. and the it is exiting , without setting the metering area for the zoom , and zoom feature.Is it possible to get around this error Can you guide me through this ?
Regards,
Karan