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

clc
clear all
I = imread('saif1.jpg');
J = rgb2gray(I);
figure, imshow(I), figure, imshow(J);

6 commentaires

Saif - by elimate pixel value less than 200 do you mean that you want to remove them from the image or just replace with a value of 0 (or 255)? And when you add the values of all pixel greater than 200 are you just looking for a sum of all these pixels?
i just want the sum of all the pixel value greater than 200.
Saif - take a look at Find Array Elements That Meet a Condition and see how you can get all those pixels that are greater than 200. You should then be able to just sum the result.
Hello ,
i would like to ask with the same concept but in my case i want to select only which pixel value has 255 and if it's low or more than 255 pixel value then it has to be eliminate.
how can i do that?
Prashant - eliminate how? Set any pixel value that is not 255 to be zero?
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)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange

Commenté :

le 28 Août 2020

Community Treasure Hunt

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

Start Hunting!

Translated by