You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In routine parse_im (file "video_capture.c") you protect against the calculated values of RGB being greater than 255, and clip them to this maximum value. However you do not protect against them going negative (which can happen in dark areas of the image).
The code needs to be extended as:
if(B > UCHAR_MAX){
B = UCHAR_MAX;
} else if(B < 0){
B = 0;
}
if(G > UCHAR_MAX){
G = UCHAR_MAX;
} else if(G < 0){
G = 0;
}
if(R > UCHAR_MAX){
R = UCHAR_MAX;
} else if(R < 0){
R = 0;
}
The text was updated successfully, but these errors were encountered:
In routine
parse_im
(file "video_capture.c") you protect against the calculated values of RGB being greater than 255, and clip them to this maximum value. However you do not protect against them going negative (which can happen in dark areas of the image).The code needs to be extended as:
The text was updated successfully, but these errors were encountered: