how to have only required pixels?

sir ,i have taken a rainy image and i use the clustering method .by using this i could able to have two types of clusters one is "background cluster" and another is "rain streak cluster". now i only want to have the rain streak clusters,so that i can go for my rest work.is there any " matlab code" for this situation or how can i do that? thanks in advance.

5 comentarios

Jan
Jan el 24 de Abr. de 2013
You explain, that you use a clustering method already. Now you ask for a method to obtain one of the clusters? could you post more details about what you are doing exactly?
jagannath mishra
jagannath mishra el 30 de Abr. de 2013
Editada: jagannath mishra el 30 de Abr. de 2013
sorry jan Simon for late response, i just want to remove the non rain pixels from the image.so that i could able to get a fine rain removed picture which i needed
Jan
Jan el 30 de Abr. de 2013
Currently the question does not contain enough information to be answered. All we see, is that you have used "the clustering method".
jagannath mishra
jagannath mishra el 30 de Abr. de 2013
Editada: jagannath mishra el 1 de Mayo de 2013
basically what information do you want,i can't understand.
jagannath mishra
jagannath mishra el 1 de Mayo de 2013
why u don't reply jan Simon

Iniciar sesión para comentar.

 Respuesta aceptada

Image Analyst
Image Analyst el 30 de Abr. de 2013
What does remove mean? So far, after your clustering algorithm, you have a binary image: 0 is background and 1 is rain. So someone might consider that binary image to already be the "background-removed" image. If you want just the rain pixels in a big long 1-D list, you could do this:
rainPixels = grayImage(binaryImage);
which might be useful, for example, if you wanted a histogram of only the rain pixels.

8 comentarios

jagannath mishra
jagannath mishra el 30 de Abr. de 2013
Editada: jagannath mishra el 30 de Abr. de 2013
"remove" means,as i have 2 types of cluster as my image .now i want only the rain clusters as my image.so that i can subtract it from the clustered image and get a non rain image.and what is "binaryImage " here?
Image Analyst
Image Analyst el 30 de Abr. de 2013
Editada: Image Analyst el 30 de Abr. de 2013
But you said "i use the clustering method" so you already have that. I don't know what clustering algorithm you used but they define foreground and background, so if you used a clustering method, you're pretty much done.
jagannath mishra
jagannath mishra el 1 de Mayo de 2013
Editada: jagannath mishra el 1 de Mayo de 2013
while i was putting your code
rainpixels=grayImage(binaryImage);
it says an error"??? Subscript indices must either be real positive integers or logicals."
rainpixels=grayImage(logical(binaryImage));
jagannath mishra
jagannath mishra el 1 de Mayo de 2013
an error again which is"index exceeds matrix dimenssion"
What does this say:
whos binaryImage
put it just before your rainpixels line and after you've "used the clustering method". Be aware that binaryImage was the name I used for whatever your clustering method outputs. You may have called it something different.
Is there anyway we can see your code for using the "clustering method" so we know what it was? For example, did you use kmeans() in the Statistics Toolbox, or some other method? Please explain it.
jagannath mishra
jagannath mishra el 2 de Mayo de 2013
when i use this it shows like ;"Name=f,Size=336*497*3,Bytes=500976,Class=unit8,Attributes=(nothing written)".And yes i use the KMean clustering method.this is the url for original image"http://tinypic.com/r/n4z5uu/5",and this is for the clustered image"http://tinypic.com/r/2zhnu6u/5".i hope this may help you to clear my doubt.if you still need to see the programe i can share that also.
jagannath mishra
jagannath mishra el 3 de Mayo de 2013
what happened sir?

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by