Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
impixelinfo : increasing precision of display??

Subject: impixelinfo : increasing precision of display??

From: shre shai

Date: 11 Nov, 2010 19:53:03

Message: 1 of 6

Does anyone know how to increase the number of digits that are reported
with impixelinfo in image processing toolbox? e.g. my image has values
spanning 30000-50000 but when using pixelinfo it just dispaly as 3E4. I
want it to display full value as eg . 35467.

Subject: impixelinfo : increasing precision of display??

From: ImageAnalyst

Date: 11 Nov, 2010 20:42:04

Message: 2 of 6

On Nov 11, 2:53 pm, "shre shai" <shres...@gmail.com> wrote:
> Does anyone know how to increase the number of digits that are reported
> with impixelinfo in image processing toolbox? e.g. my image has values
> spanning 30000-50000 but when using pixelinfo it just dispaly as 3E4. I
> want it to display full value as eg . 35467.

format shortG
a= 50000 * rand(10,1)

Shows in command window:
a =
        13801
        33985
        32755
       8130.6
       5949.9
        24918
        47987
        17019
        29263
        11191

Or try format long. Or just look up "format" and take your pick of
different options.

Subject: impixelinfo : increasing precision of display??

From: sukuchha shrestha

Date: 12 Nov, 2010 01:02:06

Message: 3 of 6

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <fc9872ae-ba84-4db7-b9e8-04c0185bbf03@w38g2000pri.googlegroups.com>...
> On Nov 11, 2:53 pm, "shre shai" <shres...@gmail.com> wrote:
> > Does anyone know how to increase the number of digits that are reported
> > with impixelinfo in image processing toolbox? e.g. my image has values
> > spanning 30000-50000 but when using pixelinfo it just dispaly as 3E4. I
> > want it to display full value as eg . 35467.
>
> format shortG
> a= 50000 * rand(10,1)
>
> Shows in command window:
> a =
> 13801
> 33985
> 32755
> 8130.6
> 5949.9
> 24918
> 47987
> 17019
> 29263
> 11191
>
> Or try format long. Or just look up "format" and take your pick of
> different options.


Dear Image Analyst,

I was praying that somehow you notice this thread. Thanks for the answer but I think you got me completly wrong. I am not talking abt seeing the value in either command window or a variable window but in the figure when i view my figure and use impixelinfo to get the values of the pixels.

data=rand(500,500)*40000;
imshow(data,[]), impixelinfo, colormap jet;

now in figure you see, the pixel values are displayed in the order of 2.94E4. But i am losing information here as the value could be from 29400 to 29499. Therefor i want to display exactly what the values is eg. 29367 .

Subject: impixelinfo : increasing precision of display??

From: sukuchha shrestha

Date: 12 Nov, 2010 01:03:04

Message: 4 of 6

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <fc9872ae-ba84-4db7-b9e8-04c0185bbf03@w38g2000pri.googlegroups.com>...
> On Nov 11, 2:53 pm, "shre shai" <shres...@gmail.com> wrote:
> > Does anyone know how to increase the number of digits that are reported
> > with impixelinfo in image processing toolbox? e.g. my image has values
> > spanning 30000-50000 but when using pixelinfo it just dispaly as 3E4. I
> > want it to display full value as eg . 35467.
>
> format shortG
> a= 50000 * rand(10,1)
>
> Shows in command window:
> a =
> 13801
> 33985
> 32755
> 8130.6
> 5949.9
> 24918
> 47987
> 17019
> 29263
> 11191
>
> Or try format long. Or just look up "format" and take your pick of
> different options.


Dear Image Analyst,

I was praying that somehow you notice this thread. Thanks for the answer but I think you got me completly wrong. I am not talking abt seeing the value in either command window or a variable window but in the figure when i view my figure and use impixelinfo to get the values of the pixels.

data=rand(500,500)*40000;
imshow(data,[]), impixelinfo, colormap jet;

now in figure you see, the pixel values are displayed in the order of 2.94E4. But i am losing information here as the value could be from 29400 to 29499. Therefor i want to display exactly what the values is eg. 29367 .

Subject: impixelinfo : increasing precision of display??

From: ImageAnalyst

Date: 12 Nov, 2010 02:07:11

Message: 5 of 6

Unfortunately impixelinfo does not appear to give you control over the
format. You'd have to write your own code using a static text label
and the mouse move event. Possibly Yair already has something for
this but I'd doubt it. His web site is: http://undocumentedmatlab.com/

Subject: impixelinfo : increasing precision of display??

From: Yair Altman

Date: 12 Nov, 2010 08:31:04

Message: 6 of 6

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <03306367-0bb9-4bcf-acae-e444da9c8515@42g2000prt.googlegroups.com>...
> Unfortunately impixelinfo does not appear to give you control over the
> format. You'd have to write your own code using a static text label
> and the mouse move event. Possibly Yair already has something for
> this but I'd doubt it. His web site is: http://undocumentedmatlab.com/


I do not know of a way to modify a Matlab plot's axis labels format automatically. However, if you have the time and energy, you can do as follows: First, modify all labes from 'auto' to 'manual' with static string values that you can format as you please using sprintf. Then, trap the plot's zoom/pan events so that the labels will be modified based on the axis's new limits.

Maybe someone has already done this on the File Exchange - it's worth a search. If not, this could be a very useful utility to post there.

Yair Altman
http://UndocumentedMatlab.com

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us