Using double precision with vision.ForegroundDetector
Afficher commentaires plus anciens
I am performing foreground detection on a 16 bit grayscale image. The vision.ForegroundDetector object only accepts images of uint8, double, or single data types. I tried using double precision as follows, but my output is 0 for every pixel:
detector = vision.ForegroundDetector(...
'MinimumBackgroundRatio', 0.55, ...
'NumTrainingFrames', 6, ...
'LearningRate', 0.005, ...
'InitialVariance', 24.^2);
fgMask = detector(im2double(frameGray));
However, if I use im2uint8 instead of im2double I get the detections I expect. I want to have full precision, so using im2uint8 doesn't solve my problem.
Edit: It is not just my images that this fails for. Changing the image data type to double in the 'vision/TrackCarsExample' also causes the algorithm to fail.
Réponses (0)
Catégories
En savoir plus sur Image Category Classification dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!