范围阈值二值化处理。
조회 수: 6 (최근 30일)
이전 댓글 표시
阈值二值化处理一般是大于n为1,小于n为0。
请问如果我想让图像(n1,n2)范围内的为1,而(0,n1)和(n2,255)范围的为0,请问要怎么改?
%读取一张图片,并显示
original_picture=imread('a.jpg');
%把图像转换成灰度图像
GrayPic=rgb2gray(original_picture);
%对图像进行二值化处理
Pic2=im2bw(original_picture,thresh);
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Thresholding에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!