Prev: barcode reader
Next: ActiveX Winsock Control
From: Mike on 4 May 2010 02:14 Hi Just an impixel question: >> a=rand([256 256 3]); >> a(1,1,:)=255.; >> figure; >> imshow(a) >> impixel % here I click pixels at (1,1), (1,2) , (2,2) and (2,1) ans = 1.000000000000000 1.000000000000000 1.000000000000000 0.935956007375390 0.762701082555705 0.297926592746646 0.687563039047706 0.394728451046901 0.123781049683410 0.782910876575916 0.976887314178435 0.844799166919494 why are the first point's values all one? Mike
From: Walter Roberson on 4 May 2010 02:35 Mike wrote: > Hi > Just an impixel question: > >>> a=rand([256 256 3]); >>> a(1,1,:)=255.; >>> figure; >>> imshow(a) >>> impixel % here I click pixels at (1,1), (1,2) , (2,2) and (2,1) > > ans = > > 1.000000000000000 1.000000000000000 1.000000000000000 > 0.935956007375390 0.762701082555705 0.297926592746646 > 0.687563039047706 0.394728451046901 0.123781049683410 > 0.782910876575916 0.976887314178435 0.844799166919494 > > why are the first point's values all one? Data value 255. is out of the range permitted for true-color images that are stored in double precision, which are required to be in the range 0 to 1. Rather than refusing to show the image, imshow clamped the value at the maximum allowed.
From: Mike on 4 May 2010 06:08 On May 4, 2:35 pm, Walter Roberson <rober...(a)hushmail.com> wrote: > Mike wrote: > > Hi > > Just an impixel question: > > >>> a=rand([256 256 3]); > >>> a(1,1,:)=255.; > >>> figure; > >>> imshow(a) > >>> impixel % here I click pixels at (1,1), (1,2) , (2,2) and (2,1) > > > ans = > > > 1.000000000000000 1.000000000000000 1.000000000000000 > > 0.935956007375390 0.762701082555705 0.297926592746646 > > 0.687563039047706 0.394728451046901 0.123781049683410 > > 0.782910876575916 0.976887314178435 0.844799166919494 > > > why are the first point's values all one? > > Data value 255. is out of the range permitted for true-color images that > are stored in double precision, which are required to be in the range 0 > to 1. Rather than refusing to show the image, imshow clamped the value > at the maximum allowed.- Hide quoted text - > > - Show quoted text - thank you. Mike
|
Pages: 1 Prev: barcode reader Next: ActiveX Winsock Control |