Info
此问题已关闭。 请重新打开它进行编辑或回答。
How to use Matlab function which supportsUint8 for image in double
3 次查看(过去 30 天)
显示 更早的评论
I have X-Ray image database whose images are 16bit format(double). If I want to use Matlab function
[centers, radii] = imfindcircles(img5,[20 25],'ObjectPolarity','dark'); it gives me error Undefined function or method 'imfindcircles' for input arguments of type 'double'.
Please help me in this regard.
0 个评论
回答(1 个)
Image Analyst
2015-5-3
Before you call it, cast img5 to an integer, either uint8 or uint16
img8bit = uint8(255 * mat2gray(img5)); % Make 8 bit copy.
[centers, radii] = imfindcircles(img8bit , [20, 25], 'ObjectPolarity', 'dark');
delete(img8bit ); % clear temporary variable.
1 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!