On 01/-10/-28163 02:59 PM, kafooster wrote:
On 15 Cze, 01:25, Dave Angel wrote:
On 01/-10/-28163 02:59 PM, kafooster wrote:
On 14 Cze, 22:26, MRABwrote:
Multiply the numpy array by a scaling factor, which is
float(max_8bit_value) / float(max_16bit_value).
could you please explain it
On Tue, 14 Jun 2011 13:13:07 -0700, kafooster wrote:
> Ok, I solved the problem with matplotlib
>
> fileobj = open("hand.raw", 'rb')
> data = numpy.fromfile(fileobj,dtype=np.uint16)
> data = numpy.reshape(data,(96,470,352))
> imshow(data[:,:,40],cmap='gray')
> show()
>
> the error was caused by
On Tue, 14 Jun 2011 19:25:32 -0400, Dave Angel wrote:
> You said in an earlier message to ignore the RAW format. However, if
> your file matches a typical camera's raw file
It doesn't. He's dealing with a raw array of fixed-size integers (i.e.
what you would get if you took a C array and wrote
On 15/06/2011 00:59, kafooster wrote:
On 15 Cze, 00:06, MRAB wrote:
Yes. Something like this:
fileobj = open("hand.raw", 'rb')
data = numpy.fromfile(fileobj, dtype=numpy.uint16)
fileobj.close()
data = data * float(0xFF) / float(0x)
data = numpy.array(data, dtype=numpy.uint8)
data = data.
On 15 Cze, 01:25, Dave Angel wrote:
> On 01/-10/-28163 02:59 PM, kafooster wrote:
>
> > On 14 Cze, 22:26, MRAB wrote:
>
> >> Multiply the numpy array by a scaling factor, which is
> >> float(max_8bit_value) / float(max_16bit_value).
>
> > could you please explain it a little? I dont understand it
On 15 Cze, 00:06, MRAB wrote:
>
> Yes. Something like this:
>
> fileobj = open("hand.raw", 'rb')
> data = numpy.fromfile(fileobj, dtype=numpy.uint16)
> fileobj.close()
> data = data * float(0xFF) / float(0x)
> data = numpy.array(data, dtype=numpy.uint8)
> data = data.reshape((96, 470, 352))
>
On 01/-10/-28163 02:59 PM, kafooster wrote:
On 14 Cze, 22:26, MRAB wrote:
Multiply the numpy array by a scaling factor, which is
float(max_8bit_value) / float(max_16bit_value).
could you please explain it a little? I dont understand it. like
multiplying each element?
You said in an earlie
On 14/06/2011 22:20, kafooster wrote:
On 14 Cze, 22:26, MRAB wrote:
Multiply the numpy array by a scaling factor, which is
float(max_8bit_value) / float(max_16bit_value).
could you please explain it a little? I dont understand it. like
multiplying each element?
Yes. Something like this:
f
On 14 Cze, 22:26, MRAB wrote:
>
> Multiply the numpy array by a scaling factor, which is
> float(max_8bit_value) / float(max_16bit_value).
could you please explain it a little? I dont understand it. like
multiplying each element?
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jun 14, 2011 at 1:26 PM, MRAB wrote:
> On 14/06/2011 21:13, kafooster wrote:
>
>>
>> I would like to visualize this data with PIL, but PIL works only with
>> 8bit data. How could I resample my array from 16bit to 8bit?
>>
>
> Multiply the numpy array by a scaling factor, which is
> float(
On 14/06/2011 21:13, kafooster wrote:
Ok, I solved the problem with matplotlib
fileobj = open("hand.raw", 'rb')
data = numpy.fromfile(fileobj,dtype=np.uint16)
data = numpy.reshape(data,(96,470,352))
imshow(data[:,:,40],cmap='gray')
show()
the error was caused by different order of data, however
Ok, I solved the problem with matplotlib
fileobj = open("hand.raw", 'rb')
data = numpy.fromfile(fileobj,dtype=np.uint16)
data = numpy.reshape(data,(96,470,352))
imshow(data[:,:,40],cmap='gray')
show()
the error was caused by different order of data, however it still
reads the dataset as half of i
On 6/14/2011 3:49 AM, Martin De Kauwe wrote:
what is a .raw file, do you mean a flat binary?
Perhaps tiff-like.
https://secure.wikimedia.org/wikipedia/en/wiki/Raw_image_format
"Providing a detailed and concise description of the content of raw
files is highly problematic. There is no single ra
what is a .raw file, do you mean a flat binary?
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 13, 4:58 pm, kafooster wrote:
> On 13 Cze, 22:52, Wanderer wrote:
>
>
>
>
>
>
>
>
>
> > On Jun 13, 4:41 pm, kafooster wrote:
>
> > > Wanderer: by *.raw I mean images with .raw extension, pure pixel data
> > > without headerhttp://en.wikipedia.org/wiki/Raw_image_format
>
> > > That is a cl
On 13 Cze, 22:52, Wanderer wrote:
> On Jun 13, 4:41 pm, kafooster wrote:
>
> > Wanderer: by *.raw I mean images with .raw extension, pure pixel data
> > without headerhttp://en.wikipedia.org/wiki/Raw_image_format
>
> > That is a clear and nice code however I think Image.open cannot
> > handle .ra
On Jun 13, 4:41 pm, kafooster wrote:
> Wanderer: by *.raw I mean images with .raw extension, pure pixel data
> without headerhttp://en.wikipedia.org/wiki/Raw_image_format
>
> That is a clear and nice code however I think Image.open cannot
> handle .raw since i get error
>
> image1 = Image.open
Wanderer: by *.raw I mean images with .raw extension, pure pixel data
without header
http://en.wikipedia.org/wiki/Raw_image_format
That is a clear and nice code however I think Image.open cannot
handle .raw since i get error
image1 = Image.open("hand.raw", "rb")
File "D:\Python27\lib\site-p
On 13/06/2011 21:20, Wanderer wrote:
On Jun 13, 4:08 pm, Wanderer wrote:
On Jun 13, 2:18 pm, kafooster wrote:
I am working on some medical image data, and I try to look into
specific slice of 3d *.raw image. I know voxels are 16 bit int, and
dimensions are 352*470*96. I checked it
On Jun 13, 4:08 pm, Wanderer wrote:
> On Jun 13, 2:18 pm, kafooster wrote:
>
>
>
>
>
>
>
>
>
> > I am working on some medical image data, and I try to look into
> > specific slice of 3d *.raw image. I know voxels are 16 bit int, and
> > dimensions are 352*470*96. I checked it in some pro medic
On Jun 13, 2:18 pm, kafooster wrote:
> I am working on some medical image data, and I try to look into
> specific slice of 3d *.raw image. I know voxels are 16 bit int, and
> dimensions are 352*470*96. I checked it in some pro medical image
> viewer, it is alright. However, with the code I use,
On 6/13/2011 2:18 PM, kafooster wrote:
I am working on some medical image data, and I try to look into
specific slice of 3d *.raw image. I know voxels are 16 bit int, and
dimensions are 352*470*96. I checked it in some pro medical image
viewer, it is alright. However, with the code I use, I di
I am working on some medical image data, and I try to look into
specific slice of 3d *.raw image. I know voxels are 16 bit int, and
dimensions are 352*470*96. I checked it in some pro medical image
viewer, it is alright. However, with the code I use, I display just
white noise image.(but worked
23 matches
Mail list logo