vision.For​egroundDet​ector: NumTrainingFrames

2 次查看(过去 30 天)
I am using the vision.ForegroundDetector to detect and segment moving cells in a microscopy video.
In order for the ForegroundDetector to work properly, the training frames (NumTrainingFrames) have to contain only the background or is some movement allowed?
In all my frames, the cells that I want to detect are always moving, so I don't have any frames with only background.

回答(1 个)

Neha
Neha 2023-9-6
Hi Tiziana,
The vision.ForegroundDetector algorithm requires a few initial frames containing only the background in order to learn and create a background model. These frames are used to estimate the background and differentiate it from the moving objects (cells) in subsequent frames.
In your case, where the cells you want to detect are always moving and there are no frames with only the background, you can still use the vision.ForegroundDetector algorithm, but you might need to adjust the parameters and experiment with different settings to achieve satisfactory results.
Here are a few suggestions to handle the scenario where the cells are always moving:
1. Adjust the number of training frames (NumTrainingFrames): Reduce the number of training frames to a smaller value, especially if you have a limited number of frames available without the cells. But if it is not a short video, you can increase the number of training frames, the algorithm will have more samples of the background to learn from.
2. Experiment with different parameter values: You can try adjusting other parameters of the vision.ForegroundDetector algorithm, such asNumGaussains”, LearningRate and MinimumBackgroundRatio. Experimenting with different values can help you find the optimal settings for your specific video. In this case, since the background is static, you can reduce the value of “NumGaussians”. To understand more about choosing the hyperparameters for the detector, you can refer to the following MATLAB Answer:
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Computer Vision with Simulink 的更多信息

产品


版本

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by