How can I find the starting point of the flows in optical flow?

2 ビュー (過去 30 日間)
Jae Min Lee
Jae Min Lee 2018 年 9 月 10 日
再開済み: Guillaume 2019 年 1 月 16 日
I am performing smoke detection using optical flow. How can we find the starting point of acting?
vidReader = VideoReader('test1.avi', 'CurrentTime', 1);
% opticFlowLK = opticalFlowLK('NoiseThreshold', 0.009);
% opticFlowFarneback = opticalFlowFarneback;
opticFlow = opticalFlowHS;
opticFlowLKDoG = opticalFlowLKDoG('NumFrames', 3);
while hasFrame(vidReader)
frameRGB = readFrame(vidReader);
frameGray = rgb2gray(frameRGB);
flow = estimateFlow(opticFlow, frameGray);
m = flow.Magnitude;
figure(1);
imshow(frameRGB);
hold on
plot(flow,'DecimationFactor',[5 5],'ScaleFactor', 100);
hold off
%pause(0.1);
end
  4 件のコメント
KSSV
KSSV 2018 年 9 月 10 日
How did you draw those blur arrows
Jae Min Lee
Jae Min Lee 2018 年 9 月 10 日
I uploaded the source code.

サインインしてコメントする。

採用された回答

Bjorn Gustavsson
Bjorn Gustavsson 2018 年 9 月 10 日
Well, in principle you can determine sources and sinks of a flow by looking at its divergence. Regions with divergence larger than zero are sources, smaller than zero sinks. This is valid for a 3-D flow in 3-D, or a 2-D flow in 2-D - you, however, have 2-D images of 3-D flow so extra caution has to be taken. But since we're already on our way - you might get something out of trying to look at divergences of your optical flow, you most likely should do whole lot of low-pass filterings on the divergence and perhaps the flow-vectors.
If that fails you could have a look at Helmholtz decomposition and further on, if you can get some more robust estimates.
Let us know how you proceedings go. Good luck!
HTH

その他の回答 (1 件)

KSSV
KSSV 2018 年 9 月 10 日
Check this variable flow. This should be having your location coordinates, from here you can pick the initial point.
  2 件のコメント
Jae Min Lee
Jae Min Lee 2018 年 9 月 10 日
Thank you for your reply. But I don't understand. Can you give me a little detail?
KSSV
KSSV 2018 年 9 月 10 日
As I don't have data in hand....I don't know how the flow variable is.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by