Write and put notation inside image?
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
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
採用された回答
Image Analyst
2014 年 6 月 29 日
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 件のコメント
Image Analyst
2014 年 6 月 29 日
Biza's "Answer" moved here since it's not an answer to the original posted question but actually a reply to me.
Image Analyst, I have one matrix with 25345 values between 0 and 255 values some repeated. I want to create two vectors, one with no repeated values, and another that counts the values that repeat ... for example
clc;
clear all;
close all;
A=imread('imagem60.tif');%load image
A = double(A);
vector=A(:); %conversion image on vector
C=unique(vector') %turn values in one unique vector
dimentionA = length(vector);%count dimension of A
dimentionC = length(C);%count dimension of unique vector of C
count =0; % count initialise in 0
for (i=1:dimentionC) %
for (j=1:dimentionA)
end
end
Now with these two for loops, I want to check on the position c how many values of A are repeated. Like the first position equal to C 0, as many 0 exist in the vector A. He runs A vector and sum all 0. should you not find more moves to the next position in C vector and 2 is now the new value to find. And go to vector A and crosses the whole array and counts how many values there are 2. do this until there are no more values in the vector C.
Before that I command values or order (color) and between intrevalos color values between 0 and 50, I put a note on the image mark the region as "background", the interval between 51 and 100 to 255 other note.
Image Analyst
2014 年 6 月 29 日
You don't need to call unique(), simple call imhist() and look for bins that have only 1 count:
[pixelCounts, grayLevels] = imhist(A);
uniqueIndexes = pixelCounts == 1;
uniqueGrayLevels = grayLevels(uniqueIndexes);
Every gray level is counted, and this is a lot simpler than what you proposed.
I don't know what "intrevalos color values" are. Please define.
Image Analyst
2014 年 6 月 29 日
Biza's "Answer" again moved here since it's not an Answer to his original question:
sorry I'am portuguese, intervals values "color between Gray levels"
Image Analyst
2014 年 6 月 29 日
I don't know what color between gray levels means either, but I trust that my code will help you solve your problem. Let me know if you tried it and it does not do what you want.
Biza Ferreira
2014 年 7 月 1 日
I try your code but don't shoe anything, and just convert all value to zero
Image Analyst
2014 年 7 月 3 日
Biza's "Answer" yet again moved here since it's not an Answer to his original question. Biza, quit posting answers to your questions unless you've solved them. If you reply to someone, post it as a comment.
Image Analyst I checked what I needed for my work, and...
contagem =0;
for i=1:length(C) %
r =bwconncomp(direcao==C(i),4);
contagem = contagem+1;
end
end
Now I just need, grouping pixels of similar values, in short intervals and assign each interval a gray color
Image Analyst
2014 年 7 月 3 日
What are you doing? Do you just want to assign each connected component a unique color? If so, do this:
labeledImage = bwlabel(binaryImage, 8); % Label each blob so we can make measurements of it
coloredLabels = label2rgb (labeledImage, 'hsv', 'k', 'shuffle'); % pseudo random color labels
imshow(coloredLabels);
Biza Ferreira
2014 年 7 月 3 日
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
2014 年 7 月 3 日
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.
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Contrast Adjustment についてさらに検索
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
