Skip to content

Commit

Permalink
- Camera settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mirsadm committed Oct 4, 2021
1 parent 7da4aab commit 3d49897
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,15 @@ namespace motioncam {
ACaptureRequest_setEntry_u8(mSessionContext.repeatCaptureRequest->captureRequest, ACAMERA_CONTROL_AF_TRIGGER, 1, &afTrigger);

// Set the focus region
int w = static_cast<int>(mCameraDescription.sensorSize.width * 0.125f);
int h = static_cast<int>(mCameraDescription.sensorSize.height * 0.125f);
int w = static_cast<int>(mCameraDescription.sensorSize.width * 0.25f);
int h = static_cast<int>(mCameraDescription.sensorSize.height * 0.25f);

int px = static_cast<int>(static_cast<float>(mCameraDescription.sensorSize.left + mCameraDescription.sensorSize.width) * mRequestedFocusX);
int py = static_cast<int>(static_cast<float>(mCameraDescription.sensorSize.top + mCameraDescription.sensorSize.height) * mRequestedFocusY);

int32_t afRegion[5] = { px - w/2, py - h/2,
px + w/2, py + h/2,
500 };
1000 };

ACaptureRequest_setEntry_i32(mSessionContext.repeatCaptureRequest->captureRequest, ACAMERA_CONTROL_AF_REGIONS, 5, &afRegion[0]);

Expand Down Expand Up @@ -285,7 +285,7 @@ namespace motioncam {

int32_t afRegion[5] = {px - w/2, py - h/2,
px + w/2, py + h/2,
500 };
1000 };

ACaptureRequest_setEntry_i32(mSessionContext.repeatCaptureRequest->captureRequest, ACAMERA_CONTROL_AF_REGIONS, 5, &afRegion[0]);

Expand All @@ -299,11 +299,11 @@ namespace motioncam {
w = static_cast<int>(mCameraDescription.sensorSize.width * 0.75f);
h = static_cast<int>(mCameraDescription.sensorSize.height * 0.75f);

int32_t aeRegion[5] = {px - w/2, py - h/2,
int32_t aeRegion[5] = { px - w/2, py - h/2,
px + w/2, py + h/2,
500 };
1000 };

ACaptureRequest_setEntry_i32(mSessionContext.repeatCaptureRequest->captureRequest, ACAMERA_CONTROL_AE_REGIONS, 10, &aeRegion[0]);
ACaptureRequest_setEntry_i32(mSessionContext.repeatCaptureRequest->captureRequest, ACAMERA_CONTROL_AE_REGIONS, 5, &aeRegion[0]);
}
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private void estimateFromExposure(float ev, float shadows) {
float chromaBlendWeight;
float spatialDenoiseWeight;

sharpen0 = 2.5f;
sharpen0 = 2.25f;
sharpen1 = 2.0f;

if(ev > 7.99) {
Expand Down

0 comments on commit 3d49897

Please sign in to comment.