extremely low resolution - General Discussion and Assistance - CHDK Forum

extremely low resolution

  • 8 Replies
  • 3803 Views
extremely low resolution
« on: 03 / January / 2009, 18:22:28 »
Advertisements
Hi,

Does anyone know if its possible to take very low resolution images by using CHDK?  For example a 100pixel (10px x 10px) or even a single pixel image to record a colour?

Thanks,

Alex

 
« Last Edit: 03 / January / 2009, 18:31:22 by aldo2029 »

lowest reolution possible?
« Reply #1 on: 03 / January / 2009, 18:33:32 »
Hi,

Does anyone know if its possible to take very low resolution images by using CHDK?  If so, what is the lowest resolution possible? - For example is it possible to take a 100pixel image (10px x 10px) or even a single pixel image that could be used to record a colour?

Thanks,

Alex

*

Offline reyalp

  • ******
  • 14125
Re: extremely low resolution
« Reply #2 on: 03 / January / 2009, 19:19:44 »
You cannot do this directly with CHDK.

An out of focus image should give you a sort of average of the scene color, which will also compress very well. Jacking the compression way up way up in video mode has a similar effect.

Alternately, perhaps you don't want an image at all. What about recording the histogram data with a lua script instead ? AFAIK, the live view RGB histogram isn't directly available, but it shouldn't be too hard to add. Or you could analyze the live view buffer with peek() ;)
Don't forget what the H stands for.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: lowest reolution possible?
« Reply #3 on: 04 / January / 2009, 05:18:21 »
The sensor resolution cannot be decreased, the camera always either crops (takes a portion of image from the middle) or scales the image.

We don't know how to make the jpeg scaler go lower than 640x480 (or whatever the builtin smallest image size is in each camera). The lowest resolution from original firmware is mjpeg in an avi container from lowest resolution video record. Video is saved from live view display, not from a proper photography process.

That said, it would be entirely possible to write new RAW processing code that would for instance crop or average the image down to a few pixels in whatever way satisfies your need.

We also have a histogram that may be useful for whatever you are trying to do.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: extremely low resolution
« Reply #4 on: 04 / January / 2009, 05:21:06 »
And please don't double post, I merged your topics.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: extremely low resolution
« Reply #5 on: 05 / January / 2009, 13:27:09 »
maybe get_histogram can be abused for that? or motiondetection. we can set it so it only reacts to a certain color channel, cant we?
btw, why do you need that?

Re: extremely low resolution
« Reply #6 on: 05 / January / 2009, 17:30:20 »
Thanks for the response.  (Apologies for the double post)

Basically what I am trying to achieve is a camera on which the resolution can be turned down to very low res.  I've almost got it working on a laptop, using a webcam and the processing language but I really want to make it work on a portable camera.

With a webcam you can just set the pixel size manually down to a single pixel or anything inbetween.  Alternatively you can take a higher resolution image and add the R, G and B values to an array and then average them to get a colour reading for the whole image.  I've been reading up on the histogram stuff and wonder whether it might be possible to do something similar with this data?

Ultimately what I'd like to achieve is something like the three images I've attached. A normal photo, a single pixel colour reading and possibly something in-between.  These were just quickly done on photoshop by sizing down and back up again - Do you think The RAW image convert could do something similar?












« Last Edit: 05 / January / 2009, 17:33:09 by aldo2029 »

*

Offline fbonomi

  • ****
  • 469
  • A570IS SD1100/Ixus80
    • Francesco Bonomi
Re: extremely low resolution
« Reply #7 on: 06 / January / 2009, 03:53:25 »
A pipe in fron of the camera, with translucent paper/glass/plastic/ in the middle would obtain a very similar result, would'nt it?

Code: [Select]
======   ================================  <-PIPE
|C   |        |
|A   =====    |
|M       |    | <-TRANSLUCENT PAPER
|E   =====    |
|R   |        |
======   ================================  <-PIPE

The paper only gets illuminated from the area that can bee seen from the pipe...
The longer the pipe, the more "selective" the device would be.

Of cource, the interior of the pipe should be black and not reflective.

In addition, you should force the camera in Av mode, very large aperture and setting a focal lenght to infinite

If this is not exactly the result you want you should explain better what you want to do with those images, it will be easier  to find alternative solutions..

Do you want to use it to:
- recognize an object
- measure luminosity
- save space on card
...???

« Last Edit: 06 / January / 2009, 03:57:37 by fbonomi »

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: extremely low resolution
« Reply #8 on: 06 / January / 2009, 09:00:43 »
You didn't specify JPEG, so yes, it's possible if you process the raw data. It requires tweaking the CHDK code but it really should be perfectly possible. You need to look at the raw saving code, raw.c I think.

Alternatively, you could avoid taking a photo at all and just use the viewport data, which will likely be faster, if that meets your requirements. The histogram code, which should be in gui_osd.c, should give good hints on how to do that.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal