필터 지우기
필터 지우기

i want to make a filter that will eliminate pixel value less than 200 and then add the values of all pixel greater than 200

조회 수: 3 (최근 30일)
clc
clear all
I = imread('saif1.jpg');
J = rgb2gray(I);
figure, imshow(I), figure, imshow(J);
  댓글 수: 6
Geoff Hayes
Geoff Hayes 2020년 8월 27일
Prashant - eliminate how? Set any pixel value that is not 255 to be zero?
Image Analyst
Image Analyst 2020년 8월 28일
You can change a pixel value in an image to some other value, but you cannot eliminate the pixel because matrices must remain rectangular, not have ragged edges like if you eliminate the pixel and shift all other pixels in the line or column over.

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2020년 1월 29일
Try
mask = J > 200; % Map of where the image is 201 or greater.
theSum = sum(J(mask))

카테고리

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