MATLAB Answers

Display Pixel Values in Image - Alternative to `showPixelValues()`

조회 수: 27(최근 30일)
Royi Avital
Royi Avital 3 Sep 2017
Commented: Royi Avital 7 Sep 2017
I would like to display an image and its pixel values in a similar manner to showPixelValues().
What I need is to be able to display it on an Axes Object on my own.
Namely something like:
hFigure = figure();
hAxes = axes();
DisplayImagePixelsValues(hAxes, mInputImage);
% Now set the properties of the axis.
Are there any alternatives to `showPixelValues()`? Something with more user control.
Thank You.
According to answers it seems I wasn't clear.
I don't want to show data of a current axis or something.
I want a function which the input is a matrix (Small one) and the output is a regular axis object with result of an image with text of the pixels values.
From there I'd like to be able to customize this axes to my wishes.

  댓글 수: 0

로그인 to comment.

답변 수 (2)

Image Analyst
Image Analyst 3 Sep 2017
How about impixelinfo()?

  댓글 수: 3

Royi Avital
Royi Avital 3 Sep 2017
See my edit to the question. I don't want to work on existing image window. Anyhow, any alternatives to the above besides impixelinfo()? Thank You.
Image Analyst
Image Analyst 3 Sep 2017
If not, then you'll just have to use text() to put up text labels over the image pixels.
Royi Avital
Royi Avital 4 Sep 2017
Hi, I looked into that. But I'd prefer having something which displays in a Figure Object (For exporting purposes). Has anyone implemented something like showPixelValues() in low level?

로그인 to comment.

Walter Roberson
Walter Roberson 3 Sep 2017
The existing File Exchange contribution you linked to, does an imshow() without any parent, so it will display inside the current axes.
However, I discovered recently that if you imshow() and the current axes is at the default position, that imshow sets up conditions so that the axes will typically be deleted on the next graphics operation. You can avoid that by setting a non-default Position for the axes.
In any case you can easily edit the File Exchange Contribution to add a 'Parent' property to the imshow() calls and other calls.

  댓글 수: 9

표시 이전 댓글 수: 6
Royi Avital
Royi Avital 6 Sep 2017
On the other end it is limited to only few pixels while teh HTML code can handle much more data.
Walter Roberson
Walter Roberson 6 Sep 2017
What HTML code? The routine you linked to does not create HTML. Which routine are you looking at that produces HTML?

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.

Translated by