difference between using [] with imshow and dividing an image by a scalar before using imshow fxn

45 views (last 30 days)
Matthew Worker
Matthew Worker on 6 Oct 2021
Commented: Stephen on 1 Dec 2021 at 12:04
This question was flagged by Rik
deleted

Answers (2)

yanqi liu
yanqi liu on 6 Oct 2021
Edited: yanqi liu on 1 Dec 2021 at 7:13
yes,sir
  4 Comments
Stephen
Stephen on 1 Dec 2021 at 12:04
"I dont understand why you go out of your way to do this"
Because this is a public forum.
Public forums answer peoples' questions, but also act as references for other people who have the same or similar queries. The people who answer and discuss on any public forum do so on the understanding that they are contributing to this knowledge base.
When you unilaterally decide to delete all of your questions, then
  1. you selfishly steal the volunteers' time and help for youself, not share it with anyone else. This is not what the volunteers agreed to by taking part in public forum: you mislead by pretending to agree to taking part in a public forum, but in reality you just wanted private consulting without paying for it.
  2. what is special about your case? What happens if everyone decided on any ground whatsoever that they want to delete their questions, what would remain of any public forum then?

Sign in to comment.


Image Analyst
Image Analyst on 6 Oct 2021
If you have a floating point image, it expects all the values to be within the 0-1 range. If it's in that range, it will display 0 as 0 and 1 as 255. Numbers below 0 will show up as black. Numbers above 1 will show up as white.
If you use [], it can take floating point numbers in any range and will display the min value as 0 and the max value as 255, and values in between will be linearly scaled in brightness.
If your display is still black even though your numbers are in the 0-1 range, it's possible all your numbers are like 0.1 or less. So a value of 0.1 will show up as gray level 25 - really dark. Lower values will also be very very dark and hard to see. If you use [] then it will map the 0.1 to 255 and values in the range 0-0.1 will be linearly scaled between 0 and 255.
If your image is in the range 0-255, then you divide by 100 then your values go from 0 to 2.55. Anything 0-1 will show up in gray scale, and anything between 1.00 and 2.55 will be saturated -- clipped to 255 and appear totally white.

Community Treasure Hunt

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

Start Hunting!

Translated by