필터 지우기
필터 지우기

how to manipulate image pixels

조회 수: 2 (최근 30일)
Sams
Sams 2014년 5월 9일
답변: Image Analyst 2014년 5월 9일
Hi everyone I've got an image and now i'd like to change some pixelvalues. e.g i'd like to change all values to 0 which are below a certain limit. I thought to give it a try with a for loop but so far it didn't work. Please, i am totally new to matlab. cheers Sams

채택된 답변

Image Analyst
Image Analyst 2014년 5월 9일
Make a binary image mapping out the pixels less than some threshold and then use that as a logical index to set them to zero:
thresholdValue = 100; % Or whatever you want
belowThreshold = grayImage < thresholdValue; % Create binary image.
% Make a copy that will be masked.
newImage = grayImage; % Create a copy.
newImage(belowThreshold) = 0; % Assign them to zero.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by