Is it possible to change color for the plot function in opticalFlow class?
4 次查看(过去 30 天)
显示 更早的评论
The plot function in opticalFlow class ( see here ) has three name-value pair arguments. I assumed other regular plot arguments would work too but obviously they don't. I tried to use 'color' unsuccessfully.
I plan to superimpose the plots on images and the current blue color is hardly visible... So my question is: is there any way to change the color of this plot?
0 个评论
采纳的回答
Anand
2016-6-2
Unfortunately, this can't be done directly. You need to find a handle to the underlying quiver plot and modify it. Here's some code to help you:
% Compute and plot optic flow
opflow = opticalFlow(randn(100,100),randn(100,100));
plot(opflow,'DecimationFactor',[10 10],'ScaleFactor',10);
% Find quiver handle
q = findobj(gca,'type','Quiver');
% Change color to red
q.Color = 'r';
更多回答(1 个)
Oskar Wilhelmsson
2018-3-24
I ran into a similar problem. Using "clf" in the beginning of the video loop will make sure the color is always the same, which is what I think you actually want.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computer Vision with Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!