日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

数字图像处理之点运算

發布時間:2024/4/14 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 数字图像处理之点运算 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
-------------------------------------------------------------------------------------------------------------------
灰度直方圖imhist
IMHIST(I) displays a histogram for the intensity image I whose number of
??? bins are specified by the image type.? If I is a grayscale image, IMHIST
??? uses 256 bins as a default value. If I is a binary image, IMHIST uses
??? only 2 bins.
i=imread('lena.gif'); %灰度圖像,128x128 imshow(i);title('source');%顯示源圖像 figure; imhist(i);title('graph');%顯示灰度直方圖
直方圖的峰值位置說明了圖像總體上的亮暗,如果圖像較暗,峰值靠左;反之靠右。

另外:
在workspace中顯示i=128x128,即單通道128x128.觀察圖像數據如下

而如果是彩色rgb圖像如
i=imread('lena.jpg'); %圖像,512x512x3 imshow(i);title('source');%顯示源圖像
雙擊i也可查看每個像素點的值


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
灰度閾值變換im2bw
?IM2BW Convert image to binary image by thresholding.
??? IM2BW produces binary images from indexed, intensity, or RGB
??? images. To do this, it converts the input image to grayscale
??? format (if it is not already an intensity image), and then
??? converts this grayscale image to binary by thresholding.

rgb=imread('lena.jpg'); imshow(rgb);title('原圖像');figure; i=rgb2gray(rgb);%先轉化成灰度圖像,也可以不轉,因為im2bw會自動轉 subplot(1,3,1);imshow(i);title('灰度圖像');threshold=graythresh(i); bw1=im2bw(i,threshold); subplot(1,3,2);imshow(bw1);title('2值圖像,自動選擇閾值');bw2=im2bw(i,130/255); subplot(1,3,3);imshow(bw2);title('2值圖像,閾值130');??????

轉載于:https://www.cnblogs.com/-song/archive/2012/03/25/3331886.html

總結

以上是生活随笔為你收集整理的数字图像处理之点运算的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。