Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #7654
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python@mrabarnett.plus.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'mrab': 0.05; 'correct.': 0.09; 'from:addr:python': 0.09; 'subject:files': 0.09; 'subject:image': 0.09; 'there?': 0.09; 'this:': 0.10; 'wrote:': 0.14; "'rb')": 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'multiplies': 0.16; 'received:84.92': 0.16; 'received:84.92.122': 0.16; 'received:84.92.122.60': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'reply-to:addr:python-list': 0.16; 'subject:raw': 0.16; 'header:In-Reply-To:1': 0.21; 'received:84': 0.25; '(in': 0.26; 'elements': 0.29; 'subject:working': 0.30; 'yes.': 0.30; 'to:addr:python-list': 0.33; 'thank': 0.35; 'header :User-Agent:1': 0.35; 'reply-to:addr:python.org': 0.35; 'something': 0.37; 'data': 0.38; 'subject:: ': 0.38; 'subject:with': 0.39; 'to:addr:python.org': 0.39; 'levels': 0.63; 'header:Reply-To:1': 0.72; 'reply-to:no real name:2**0': 0.72 |
| X-IronPort-Anti-Spam-Filtered | true |
| X-IronPort-Anti-Spam-Result | ApUGAMX6901UXebj/2dsb2JhbABSmAyORXeIdb9dhiYEliKLFg |
| Date | Wed, 15 Jun 2011 01:24:15 +0100 |
| From | MRAB <python@mrabarnett.plus.com> |
| User-Agent | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: working with raw image files |
| References | <0cd64f09-bd32-4b67-9266-46003dbea4b7@m4g2000yqk.googlegroups.com> <1f7a452a-8bae-43e0-ab9f-9bfed55ee206@b21g2000yqc.googlegroups.com> <a4d759a7-02dd-47b9-ba38-0dc947561230@k16g2000yqm.googlegroups.com> <e648cf41-9e2c-4acf-b312-7b83be8cd03a@h7g2000yqa.googlegroups.com> <57d6da80-59db-477f-b507-cabf01a2976d@j23g2000yqc.googlegroups.com> <720bec5b-4892-4cd7-83e1-f67ce78591be@y30g2000yqb.googlegroups.com> <71140671-4273-417d-8d2f-3986663acdb2@k16g2000yqm.googlegroups.com> <2c095413-ea59-4339-8419-ae4b688e219d@17g2000prr.googlegroups.com> <mailman.223.1308068671.11593.python-list@python.org> <bf3f66ae-9b8f-4bd9-8827-bf0cd59bd3e7@j23g2000yqc.googlegroups.com> <mailman.231.1308083252.11593.python-list@python.org> <e62e7c74-6169-42e7-acd4-3bb45c8a875b@p13g2000yqh.googlegroups.com> <mailman.236.1308089164.11593.python-list@python.org> <e16f69fb-19ed-440b-93e2-3edaa8e5ff4d@z33g2000yqb.googlegroups.com> |
| In-Reply-To | <e16f69fb-19ed-440b-93e2-3edaa8e5ff4d@z33g2000yqb.googlegroups.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| Reply-To | python-list@python.org |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.245.1308097451.11593.python-list@python.org> (permalink) |
| Lines | 21 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1308097451 news.xs4all.nl 49177 [::ffff:82.94.164.166]:41267 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:7654 |
Show key headers only | View raw
On 15/06/2011 00:59, kafooster wrote:
> On 15 Cze, 00:06, MRAB<pyt...@mrabarnett.plus.com> wrote:
>
>>
>> Yes. Something like this:
>>
>> fileobj = open("hand.raw", 'rb')
>> data = numpy.fromfile(fileobj, dtype=numpy.uint16)
>> fileobj.close()
>> data = data * float(0xFF) / float(0xFFFF)
>> data = numpy.array(data, dtype=numpy.uint8)
>> data = data.reshape((96, 470, 352))
>> imshow(data[:, :, 40], cmap='gray')
>> show()
>
> thank you very much, it works and now I can display this data even
> with Image.fromarray(). As I understand, it multiplies data elements
> by a fraction, so that when we have less levels (in 8uint), it can fit
> there?
Correct.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
working with raw image files kafooster <dmozejko@gmail.com> - 2011-06-13 11:18 -0700
Re: working with raw image files Terry Reedy <tjreedy@udel.edu> - 2011-06-13 14:49 -0400
Re: working with raw image files Wanderer <wanderer@dialup4less.com> - 2011-06-13 13:08 -0700
Re: working with raw image files Wanderer <wanderer@dialup4less.com> - 2011-06-13 13:20 -0700
Re: working with raw image files MRAB <python@mrabarnett.plus.com> - 2011-06-13 21:36 +0100
Re: working with raw image files kafooster <dmozejko@gmail.com> - 2011-06-13 13:41 -0700
Re: working with raw image files Wanderer <wanderer@dialup4less.com> - 2011-06-13 13:52 -0700
Re: working with raw image files kafooster <dmozejko@gmail.com> - 2011-06-13 13:58 -0700
Re: working with raw image files Wanderer <wanderer@dialup4less.com> - 2011-06-13 14:28 -0700
Re: working with raw image files Martin De Kauwe <mdekauwe@gmail.com> - 2011-06-14 00:49 -0700
Re: working with raw image files Terry Reedy <tjreedy@udel.edu> - 2011-06-14 12:24 -0400
Re: working with raw image files kafooster <dmozejko@gmail.com> - 2011-06-14 13:13 -0700
Re: working with raw image files MRAB <python@mrabarnett.plus.com> - 2011-06-14 21:26 +0100
Re: working with raw image files kafooster <dmozejko@gmail.com> - 2011-06-14 14:20 -0700
Re: working with raw image files MRAB <python@mrabarnett.plus.com> - 2011-06-14 23:06 +0100
Re: working with raw image files kafooster <dmozejko@gmail.com> - 2011-06-14 16:59 -0700
Re: working with raw image files MRAB <python@mrabarnett.plus.com> - 2011-06-15 01:24 +0100
Re: working with raw image files Dave Angel <davea@ieee.org> - 2011-06-14 19:25 -0400
Re: working with raw image files kafooster <dmozejko@gmail.com> - 2011-06-14 17:02 -0700
Re: working with raw image files Dave Angel <davea@ieee.org> - 2011-06-14 22:13 -0400
Re: working with raw image files Nobody <nobody@nowhere.com> - 2011-06-15 02:29 +0100
Re: working with raw image files Nobody <nobody@nowhere.com> - 2011-06-15 02:33 +0100
csiph-web