block matching image issue

5 次查看(过去 30 天)
Blob
Blob 2023-4-8
When I did blockmatching algorithm on the tennis man image, and did a comparaison between the original and reconstructed image I got this black boxes, why?
  5 个评论

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2023-4-8
Your attached code (but not your posted code) has
imshow (F2_recons - e1)
where both of those arrays are double precision and happen to contain integer values. The difference between the two arrays ranges between -255 and +206 . You are passing that array of values -255 to +206 to imshow() as a double precision array. By default, when passed a double precision array, imshow() assumes that the valuable part of the data is the range 0 to 1, and that anything below 0 should be treated as 0 and anything above 1 should be treated as 1. So you more or less end up binarizing the difference array.
You should be considering using
imagesc(F2_recons - e1);
colormap(gray)
  2 个评论
Blob
Blob 2023-4-10
@Walter Roberson thank you, I have one more request, could you please show me how to plot the vectors of motion?
Walter Roberson
Walter Roberson 2023-4-10
Sorry, no, I do not see anything in your code that corresponds to vectors of motion, or anything that corresponds to motion at all. I cannot tell what you are calculating at all.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Red 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by