필터 지우기
필터 지우기

How to change a range of pixel values in a Grayscale JPEG image?

조회 수: 2 (최근 30일)
Margery
Margery 2015년 4월 9일
댓글: Margery 2015년 4월 9일
Hello, I want to change pixels from a given range e.g. 60-95 to 255. How can I do it? I did look at lots of codes but they are all just for single values and I'm new to Matlab

채택된 답변

David Young
David Young 2015년 4월 9일
Like this (where A is the array containing the image):
A(A >= 60 & A <= 95) = 255;
By the way, that the image is stored on disk in JPEG format isn't relevant - once you've read it, it is just an array.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by