Effacer les filtres
Effacer les filtres

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 vues (au cours des 30 derniers jours)
clc
clear all
I = imread('saif1.jpg');
J = rgb2gray(I);
figure, imshow(I), figure, imshow(J);
  6 commentaires
Geoff Hayes
Geoff Hayes le 27 Août 2020
Prashant - eliminate how? Set any pixel value that is not 255 to be zero?
Image Analyst
Image Analyst le 28 Août 2020
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.

Connectez-vous pour commenter.

Réponses (1)

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

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by