Why dice similarity is so low for those two images?
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
Please see attached images. Even in the eye seem that are very close one image to the other since they are more or less the same with different post processing values.
Yet the dice(x,y) gives me only 0.00272479564032698
where it should give me close to 1. With that number it tells me that those two have nothing in common which is not true.
What am I doing wrong?
1 件のコメント
Stelios Fanourakis
2019 年 9 月 12 日
Has something to do with the Bitdepth? At one pic is 8 and the other is 1.
採用された回答
Image Analyst
2019 年 9 月 12 日
Because not many of the white pixels are in the same location in the two images. Maybe you can try imregister() first to align them, and then try again.
15 件のコメント
Stelios Fanourakis
2019 年 9 月 12 日
So you say that bitdepth doesn't matter? This is the second example I am using. My first example from a different set was similar to it but I was getting better coefficients, such as 0.95 or 0.99. At the previous set both images had 8 bitdepth. I feel this is the wrong but I'll try your suggestion as well and let you know
Stelios Fanourakis
2019 年 9 月 12 日
Imregister will give me 1 image as output. How am I going to apply dice after? I need two seperate images
Image Analyst
2019 年 9 月 12 日
編集済み: Image Analyst
2019 年 9 月 12 日
Use 2alg as the reference/fixed image, and 2pp as the test/moving image. Use imregister() to get a new aligned 2pp, then call the Dice Sorensen equation with the 2alg and the new/registered 2pp image.
Bit depth should be 1 - they should be "logical" images, not grayscale or floating point images.
I used imregister ultimately. It gave me the error
Expected input number 1, L1, to be integer-valued.
When tried to dice(x,y).
Then I changed x (the imregistered pic) to uint8 and double but still dice comes 0
Stelios Fanourakis
2019 年 9 月 12 日
Then I just put affine and optimizer + metric in the registration command and it gave me
0.11 dice, still very low
Stelios Fanourakis
2019 年 9 月 12 日
I used imshowpair to visualize both registered image and test image and I attach the outcome. As you can see, both green and purple images are very proximal to each other. I cannot get 0 for dice. I believe it is something else.
What happenes if I change the bitdepth of the image? Will it change anything?
Stelios Fanourakis
2019 年 9 月 12 日
I changed both images to 8 bitdepth but still dice comes 0.
I am going to get mad. Any explanation for this please?
Guillaume
2019 年 9 月 12 日
What do you call the bitdpepth of your images? They're binary images (0/1), so as Image Analyst said, the bitdepth is effectively 1 (pixel is on or off), regardless of what class you're using to store the 0s and 1s. Whether you use 1, 8, 16, 64, or 5 millions bits to store 0 and 1, you still only have 2 values.
Stelios Fanourakis
2019 年 9 月 12 日
Yes Guilaume. However, this is not the case for my issue. I get dice zero values no matter what and both my images are identical.
Image Analyst
2019 年 9 月 13 日
Like I said the reason for 0 DS coefficient is that the images are not well aligned, and the coefficient is telling you exactly that. If you want to align them and try again, you can do that but it seems like you're telling me that imregister wants uint8 images, so cast them to uint8, align them with imregister, then cast them back to logical by thresholding at 0.5 or im2bw(), then compute the DS coefficient.
I tried again using the im2bw() and dice now gives me the error
The logical indices in position 1 contain a true value outside of the array bounds.
Stelios Fanourakis
2019 年 9 月 15 日
Actually, I used Structural Similarity Index and I got very satisfactory results. Can you please explain me the differences between SSIM and DICE? Thanks
Image Analyst
2019 年 9 月 15 日
DICE looks at the percentage of overlap bewtween two binary images. SSIM works with grayscale images and does not require any sort of alignment since it's based on bulk measurements like mean and standard deviation so the objects could be anywhere.
Stelios Fanourakis
2019 年 9 月 15 日
So I might stick with SSIM. I believe it is more accurate for my occasion. Thanks Image Analyst
Image Analyst
2019 年 9 月 16 日
編集済み: Image Analyst
2019 年 9 月 16 日
You might also want ot check out htis Universal Image Quality Index:
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Image Quality についてさらに検索
参考
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)
