Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #7644

Re: working with raw image files

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.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 <SRS0=jzgM=ZD=ieee.org=davea@srs.perfora.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'mrab': 0.05; 'scaling': 0.05; 'bits': 0.07; 'linear': 0.07; 'space.': 0.07; 'subject:files': 0.09; 'subject:image': 0.09; 'pm,': 0.10; 'wrote:': 0.14; 'exponential': 0.16; 'factor,': 0.16; 'numpy': 0.16; 'subject:raw': 0.16; 'cc:addr:python-list': 0.17; '(which': 0.20; 'header:In-Reply-To:1': 0.21; 'ignore': 0.21; 'file,': 0.22; 'cc:2**0': 0.22; 'cc:no real name:2**0': 0.23; 'values': 0.25; 'function': 0.25; 'typically': 0.28; 'matches': 0.29; 'cc:addr:python.org': 0.30; 'second': 0.30; 'array': 0.30; 'shifting': 0.30; 'subject:working': 0.30; 'it.': 0.31; 'does': 0.33; 'file': 0.34; 'however,': 0.34; 'expensive': 0.34; 'example,': 0.35; 'there': 0.35; 'header:User-Agent:1': 0.35; 'typical': 0.35; 'format.': 0.36; 'several': 0.36; 'pretty': 0.37; 'could': 0.38; 'but': 0.38; 'data': 0.38; 'third': 0.38; 'earlier': 0.38; 'hardware': 0.38; 'subject:: ': 0.38; 'some': 0.38; 'received:192': 0.38; 'explain': 0.39; 'said': 0.39; 'subject:with': 0.39; 'received:192.168.1': 0.40; 'your': 0.60; 'traditional': 0.68; 'header:Reply-To:1': 0.72; 'reply-to:no real name:2**0': 0.72; '02:59': 0.84; 'bayer': 0.84
Date Tue, 14 Jun 2011 19:25:32 -0400
From Dave Angel <davea@ieee.org>
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10
MIME-Version 1.0
To kafooster <dmozejko@gmail.com>
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>
In-Reply-To <e62e7c74-6169-42e7-acd4-3bb45c8a875b@p13g2000yqh.googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:J8WosJkgKUQ+czgcu3PXQipSpQftrVlrlBuHtYWokNQ ll/fIxnXkDyKEKtoPiXx8Ie4gq/whEzTIhhadUJnRPHalaeOqC idWG5zsvze7B4nTeGse/h/utZlSVFS4KJwge93nisN1GtSHPUG RYrDULISIe5ym2KfxJykGxQ49aXbZoU+//A0H0b2DpPxc+XWMr nRpco9dCv52LOO9aGLKow==
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
Reply-To davea@ieee.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.241.1308093964.11593.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 82.94.164.166
X-Trace 1308093964 news.xs4all.nl 49046 [::ffff:82.94.164.166]:56515
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:7644

Show key headers only | View raw


On 01/-10/-28163 02:59 PM, kafooster wrote:
> On 14 Cze, 22:26, MRAB<pyt...@mrabarnett.plus.com>  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 earlier message to ignore the RAW format.  However, if 
your file matches a typical camera's raw file, there are several problems:

1) the data is typically 12 to 14 bits per pixel, only rarely 16 (very 
expensive cameras)
2) the data does not have R, G and B values for each pixel, but only one 
of these.  The others are generated by Bayer interpolation.
3) the data is linear (which is what the hardware produces), and 
traditional image data wants to be in some non-linear color space.  For 
example, most jpegs are sRGB 8*3 bits per pixel.

The first would mean that you'd need to do a lot of shifting and 
masking.  The second would mean a pretty complex interpolation 
algorithm.  And the third would require an exponential function at the 
very least.

DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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