Azzera filtri
Azzera filtri

Write and put notation inside image?

1 visualizzazione (ultimi 30 giorni)
I people, I have two images and i applied the sift flow code, my images represent the blood flow.through the difference between the two images can obtain the direction of blood flow.this difference results in a single image (matrix), I converted all the values in the array into a vector, my idea is to sort an array positions for the non-repeated values, and adding to the sum of the other array positions repeated, for example:
A=[1 1 0 0 0; 0 0 0 1 1; 1 1 1 1 1]
vector=[1 1 0 0 0 0 0 0 1 1 1 1 1 1 1]
non-repeated=[0 1]
sum_positions=[6 9]
I'm trying to do this in order to group the values in an equal position. So when do imshow () values that have between 0 and 50 can write in the image "background". 51 and 100 "background or not" can someone help me

Risposta accettata

Image Analyst
Image Analyst il 29 Giu 2014
In your example, what variables do you already have and which do you want to obtain? And what does imshow() have to do with anything? None of your variables have values like 51 or 100 . And how did you obtain sum_positions as 6 and 9? What is being summed????
  9 Commenti
Biza Ferreira
Biza Ferreira il 3 Lug 2014
my image is in grayscale and I want to group similar pixels and assigning a color to each group. example: between 0 and 25 pixel's color "0" (black)
Image Analyst
Image Analyst il 3 Lug 2014
The code I just showed you does exactly that. Did you try it? It came from my Image Segmentation Tutorial http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 Run that if you want to see it in action.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by