関数または変数 'uipane1' が認識されません。

3 Ansichten (letzte 30 Tage)
蓮 出越
蓮 出越 am 20 Jul. 2022
Beantwortet: Hernia Baby am 20 Jul. 2022
% Horn-Schunck法を使用したオプティカルフロー推定
% ビデオの読み込み
vidReader = VideoReader('visiontraffic.avi','CurrentTime',11);
% オプティカルフロー推定法の定義
opticFlow = opticalFlowHS;
% オプティカルフローの可視化
h = figure;
movegui(h);
hViewPane1 = uipane1(h,'Position',[0 0 1 1],'Title','Plot of Optical Flow Vectors');
hPlot = axes(hviewPane1);
% グレースケールイメージに変換
while hasFrame(vidReader)
frameRGB = readFrame(vidReader);
frameGray = im2gray(frameRGB);
flow = estimateFlow(opticFlow,frameGray);
imshow(frameRGB)
hold on
plot(flow,'DecimationFactor',[5 5],'ScaleFactor',60,'Parent',hPlot);
hold off
pause(10^-3)
end
オプティカルフローを求めるコードになりますが、
関数または変数 'uipane1' が認識されません。
エラー: HornSchunckmethod (行 11)
hViewPane1 = uipane1(h,'Position',[0 0 1 1],'Title','Plot of Optical Flow Vectors');
というエラーが表示されます。改善方法を教えてください。よろしくお願いします。

Akzeptierte Antwort

Hernia Baby
Hernia Baby am 20 Jul. 2022
おそらくタイポかと思います。uipanelではないでしょうか?
自作の関数の場合はPathが通っていません。

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!