Skip to main content
. Author manuscript; available in PMC: 2025 Apr 27.
Published in final edited form as: Nat Protoc. 2023 May 29;18(7):2051–2083. doi: 10.1038/s41596-023-00829-4
basicExptime=0.01;src.Exposure=basicExptime;%set the exposure timeimageTestExp=getsnapshot(vid);%capture an imageimshow(imageTestExp,[]);%show the image in a figure windowoverExpNum=(sum(imageTestExp(:)>=255));%the amount of the over-exposed pixelsdisp([Overexposurepercentage:,num2str(overExpNumlength(imageTestExp(:))),%]);