Info
この質問は閉じられています。 編集または回答するには再度開いてください。
how to get a good threshold so i can calculate the length and width of that thin line using pixel
3 ビュー (過去 30 日間)
古いコメントを表示
![796.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/198972/796.jpeg)
original picture
1 件のコメント
Jan
2019 年 2 月 15 日
Which "thin line"?! What does "using pixel" mean? The gray area contains a lot if details and is not sufficient for a serious measurement, in my opinion. A simple threshold will not be reliable, but you need a local increase of the contrast.
回答 (1 件)
Rahul punk
2019 年 2 月 15 日
5 件のコメント
Rahul punk
2019 年 3 月 1 日
use this
% Read in a standard MATLAB demo image of coins (US nickles and dimes, which are 5 cent and 10 cent coins)
baseFileName = 'coins.png';
folder = fileparts(which(baseFileName)); % Determine where demo folder is (works with all versions).
fullFileName = fullfile(folder, baseFileName);
if ~exist(fullFileName, 'file')
% It doesn't exist in the current folder.
% Look on the search path.
if ~exist(baseFileName, 'file')
% It doesn't exist on the search path either.
% Alert user that we can't find the image.
warningMessage = sprintf('Error: the input image file\n%s\nwas not found.\nClick OK to exit the demo.', fullFileName);
uiwait(warndlg(warningMessage));
fprintf(1, 'Finished running BlobsDemo.m.\n');
return;
end
% Found it on the search path. Construct the file name.
fullFileName = baseFileName; % Note: don't prepend the folder.
end
% If we get here, we should have found the image file.
originalImage = imread(fullFileName);
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!