CVF File Format - General Discussion and Assistance - CHDK Forum supplierdeeply

CVF File Format

  • 13 Replies
  • 2300 Views
CVF File Format
« on: 04 / September / 2014, 19:23:32 »
Advertisements
I have it in mind to create a custom curve without using the custom curve editor. The curve would be algorithmically generated.

How are these curves stored in a CVF file? Is there any more to it than a lookup table for the r, g and b channels? Are the values stored as floats, doubles, 8, 16 or 32-bit integers, signed or unsigned?

Many thanks in advance.

Re: CVF File Format
« Reply #1 on: 04 / September / 2014, 19:36:49 »
Be aware that CHDK currently only supports custom curves for 10 bit sensors  ( i.e. old cameras).

This might be of interest though :  http://chdk.setepontos.com/index.php?topic=932.msg35736#msg35736
Ported :   A1200    SD940   G10    Powershot N    G16

Re: CVF File Format
« Reply #2 on: 04 / September / 2014, 21:05:21 »
In the post you linked to it mentions 12 bpp. Is it 10 or 12?

Re: CVF File Format
« Reply #3 on: 04 / September / 2014, 21:14:25 »
In the post you linked to it mentions 12 bpp. Is it 10 or 12?
AFAIK - old cameras were 10.  Everything in the last few years is 12.  The post was about trying to get new cameras to work with the old 10 bpp code.
Ported :   A1200    SD940   G10    Powershot N    G16


Re: CVF File Format
« Reply #4 on: 04 / September / 2014, 21:33:32 »
So CHDK also supports the new 12 bpp, correct?

Also, it's 12 bits per channel per pixel, correct? 12 red, 12 green and 12 blue?
« Last Edit: 04 / September / 2014, 21:46:52 by chris319 »

Re: CVF File Format
« Reply #5 on: 04 / September / 2014, 21:59:14 »
So CHDK also supports the new 12 bpp, correct?  Also, it's 12 bits per channel per pixel, correct? 12 red, 12 green and 12 blue?
CHDK "supports" whatever comes off the sensor.  12 bpp in recent cameras (and that's regardless of the color of the pixel).

However, as I originally posted here,  CHDK does not support the application of curves to the RAW informtion from 12 bpp sensors.

If I have that mixed up,  I'm certain somebody else will weigh in here shortly.


Ported :   A1200    SD940   G10    Powershot N    G16

Re: CVF File Format
« Reply #6 on: 04 / September / 2014, 23:33:51 »
I'm going to proceed on the assumption that it's 10 bits red, 10 bits green and 10 bits blue -- 10 bits per pixel per channel, a total of 30 bits which will fit into a 32-bit variable.

A lookup table would require 1024 entries * 2 bytes each to hold values up to 1024. The table would thus be 2048 bytes in size. All three colors would have the same curve applied, so this table would be referred to 3 times for each pixel (r, g and b).

What format does the file take?

Re: CVF File Format
« Reply #7 on: 04 / September / 2014, 23:52:44 »
I'm going to proceed on the assumption that it's 10 bits red, 10 bits green and 10 bits blue -- 10 bits per pixel per channel, a total of 30 bits which will fit into a 32-bit variable.
You are of course free to assume anything you want.  Whether that results in something useful might be another story ..

Quote
A lookup table would require 1024 entries * 2 bytes each to hold values up to 1024. The table would thus be 2048 bytes in size. All three colors would have the same curve applied, so this table would be referred to 3 times for each pixel (r, g and b).
But there are 2 green pixels for every red & blue pixel.

Quote
What format does the file take?
http://chdk.wikia.com/wiki/Frame_buffers#Raw

http://hackcanon.com/camera-tricks/exposure/using-curves/
« Last Edit: 04 / September / 2014, 23:57:59 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 12102
Re: CVF File Format
« Reply #8 on: 05 / September / 2014, 00:22:55 »
What format does the file take?
I would suggest reading the thread that waterwingz linked to, and consulting the CHDK source:
http://trac.assembla.com/chdk/browser/trunk/modules/curves.c
Don't forget what the H stands for.

*

Offline msl

  • *****
  • 1263
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CVF File Format
« Reply #9 on: 05 / September / 2014, 05:16:13 »
In German CHDK forum a project for 12bit curves was launched in 2010! CHDKLover had revised the curve function completely. It was a great work.

See also the German description: http://forum.chdk-treff.de/viewtopic.php?f=7&t=1889&start=60#p26541

In 2012 I have adapted the patch to the CHDK version 1.2. But the interest was not very big.

Here is the patch. There are also some extreme picture examples: http://forum.chdk-treff.de/viewtopic.php?f=7&t=1889&start=60#p26541

msl
CHDK-DE:  CHDK-DE links

 

Related Topics