ipa: rkisp1: awb: Ignore empty AWB statistics
When the AWB engine doesn't find a valid pixel because all pixels lie outside the configured colour range it returns an AWB measurement value of 255, 255, 255. This leaves the regulation in an unrecoverable state noticeable by a completely green image. Fix that by skipping the AWB calculation in case there were no valid pixels. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
848a3017b8
commit
0069b9ceb1
1 changed files with 5 additions and 0 deletions
|
@ -298,6 +298,11 @@ void Awb::process(IPAContext &context,
|
|||
const rkisp1_cif_isp_stat *params = &stats->params;
|
||||
const rkisp1_cif_isp_awb_stat *awb = ¶ms->awb;
|
||||
|
||||
if (awb->awb_mean[0].cnt == 0) {
|
||||
LOG(RkISP1Awb, Debug) << "AWB statistics are empty";
|
||||
return;
|
||||
}
|
||||
|
||||
RGB<double> rgbMeans = calculateRgbMeans(frameContext, awb);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue