現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
how can i find the distance from the peak of one wave to another wave in a image?
1 回表示 (過去 30 日間)
古いコメントを表示
basha Shaik
2020 年 2 月 19 日
i need to find the distance of the wave. i refer to some questions & answers from that i get to know can solve canny's edge detection method.
but i don't know how to process it. can anyone help me...?
4 件のコメント
採用された回答
darova
2020 年 2 月 19 日
I suggest next algorithm
- imcrop region of interest (since it's always at the same position
- imbinarize image
- maybe clear a bit with bwareaopen
- find pixels you are interested in
- use findpeaks
17 件のコメント
darova
2020 年 2 月 19 日
I tried to define distance in 00001.jpg image
Can you tell the difference between D1 and D2? Don't how to identify them
00003.jpg image
basha Shaik
2020 年 2 月 19 日
it is just the wave before the breakup of the liquid sheet. i need to find the wave peak. in that d1 is occurs before the breakup. but d2 is already breakup into liquid droplets.
darova
2020 年 2 月 20 日
I wrote a script
Some explanations:
- Experiment with number of removing pixels
I2 = bwareaopen(I1,2e2); % remove small objects
- Experiment with reducing of number of points
ii = 1:5:length(x); % reduce number of points
- Experiment with peakheight
[~,locs] = findpeaks(abs(kk),'MINPEAKDISTANCE',3,...
'MINPEAKHEIGHT', 0.05);
- Experiment with angle of liquid breakup
If angle is small - consider/measure 2d peak
If angle is big - consider/measure 1th peak
if atan2d(dy(end),dx(end)) > 110 % angle of breakup
Feel free to ask question. Let me know if something doesn't work
basha Shaik
2020 年 2 月 21 日
thank you very much. but what the pixel length of that wave distance...? i didn't understand that. and this code can generate for all the images at once....?
basha Shaik
2020 年 2 月 22 日
thank you. but i got some error while run the script.
Error using chckxy (line 30)
The first two inputs must have at least two elements.
Error in spline (line 72)
[x,y,sizey,endslopes] = chckxy(x,y);
Error in main>write_length (line 39)
x2 = spline(t1,x1,t2);
Error in main (line 4)
write_length(STR);
darova
2020 年 2 月 22 日
Show your image. Remove it or replace from folder and change your main code as
function main
for i = 1:3
STR = sprintf('%05d.jpg',i);
if exist(STR,'file')
write_length(STR);
end
pause(1)
end
end
darova
2020 年 2 月 24 日
Here is what got
I only commented these lines because of
% set(gca,'clim',[-1 1]/3)
% colormap default
See .zip file
darova
2020 年 2 月 24 日
In case of other error try this:
function main
for i = 0:1
try
STR = sprintf('%05d.jpg',i);
write_length(STR);
pause(1)
catch ME
if ~exist(STR,'file')
disp(['File ' STR ' Does not exist'])
else
disp(ME.identifier)
disp(['File ' STR ' was not processed'])
end
end
end
end
その他の回答 (1 件)
basha Shaik
2020 年 2 月 25 日
sorry for making you trouble and thank you for helping me.
here, i attached the output i got but i didn't understand exactly, here i explain in brief
i need to solve 13000 images at once and need to save the value of wave length in .dat file or any numerical value format.
can u help me with the code for solving this problem.
do u solve the all the images at once....?
7 件のコメント
basha Shaik
2020 年 2 月 25 日
thank u very much.
2.jpg
3.jpg 15.9798035376983
4.jpg MATLAB:badsubscript
5.jpg 17.3668315184042
6.jpg
7.jpg 19.6975375353927
8.jpg
9.jpg 34.2065668340247
11.jpg
12.jpg 49.2911737269352
13.jpg 34.8050889623858
this the dat data. but it not showing for some images.
darova
2020 年 2 月 25 日
Experiment with this line
>> STR = sprintf('%05d.jpg',15)
STR =
00015.jpg
>> STR = sprintf('%05d.jpg',8)
STR =
00008.jpg
>> STR = sprintf('%01d.jpg',8)
STR =
8.jpg
basha Shaik
2020 年 2 月 25 日
i tried but the output it not detecting 2, 8 ,13. i attached the below output image
basha Shaik
2020 年 2 月 25 日
darova
2020 年 2 月 25 日
I changed angle of breakup for 2.jpg
if atan2d(dy(end),dx(end)) > 130 % angle of breakup
Result
I think 11.jpg is defective. I don't see here a wave. Can you see?
8.jpg is problem. I don't how to measure a wave length. Sorry
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
アジア太平洋地域
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)