Author Topic: SX110IS - howto start porting  (Read 65841 times)

Offline Obihoernchen

  • Full Member
  • ***
  • Posts: 104
    • SX110IS Wiki
Re: SX110IS - howto start porting
« Reply #360 on: 09 / May / 2009, 03:15:07 »
@obihoernchen: sx110-wiki-page looks good!!!


Just an idea: What's about the other 12-bit cameras? Do they possess a proper color profile? How do they got it?

Regards!

thx :)

dont know I will ask a developer!
Canon PowerShot SX110 IS
CHDK: at Autobuild now
Wiki: SX110IS

Offline Obihoernchen

  • Full Member
  • ***
  • Posts: 104
    • SX110IS Wiki
Re: SX110IS - howto start porting
« Reply #361 on: 09 / May / 2009, 06:16:48 »
done

I asked fe50 and he tells me the following:
(I will try to translate it in english)

This is everytime a problem of 12bit cameras, because DNG4PS-2 cant go on with 12 bit until now. For the SX10 they converted the 12bit raw into 10bit and then they used the normal method. (ewavr done so)

The newer port use the matrix of sx10.

We should look here:
http://chdk.setepontos.com/index.php/topic,390.msg30620.html#msg30620
Canon PowerShot SX110 IS
CHDK: at Autobuild now
Wiki: SX110IS

Offline chdkj

  • Full Member
  • ***
  • Posts: 140
Re: SX110IS - howto start porting
« Reply #362 on: 09 / May / 2009, 13:43:28 »
Thank you Obihoernchen.
I had play with color matrix of sx10 in sx110 but without success (colors are not how they supposed to be).
But I didn't spend much effort on it.

sx110

Offline Obihoernchen

  • Full Member
  • ***
  • Posts: 104
    • SX110IS Wiki
Re: SX110IS - howto start porting
« Reply #363 on: 10 / May / 2009, 16:08:18 »
Maybe I should open a Topic in Raw section and ask for help?
Canon PowerShot SX110 IS
CHDK: at Autobuild now
Wiki: SX110IS

Offline axu89

  • Rookie
  • *
  • Posts: 29
Re: SX110IS - howto start porting
« Reply #364 on: 10 / May / 2009, 16:59:07 »
The calibration is just hopeless.. no matter what tricks I try the results are total ****. Something is totally wrong..
[SX110 IS]

Offline chdkj

  • Full Member
  • ***
  • Posts: 140
Re: SX110IS - howto start porting
« Reply #365 on: 11 / May / 2009, 00:45:22 »
As far as I have understand only hook_raw_image_addr and hook_raw_size have to be adapted for new camera to get RAW working (seen from a porters point of view). Indeed I've marked hook_raw_image_addr as "unsure" but I checked the code again and got same results --> I'm pretty sure that hook_raw_image_addr is correct. And I don't think that hook_raw_image_addr has something to do with that color haze. So codewise everything should  be fine.  :blink: ????

No idea.
sx110

Offline reyalp

  • Guru Member
  • ******
  • Posts: 4468
Re: SX110IS - howto start porting
« Reply #366 on: 11 / May / 2009, 01:09:14 »
If you didn't have the correct address, you'd get garbage or a partial image, not an image with the wrong colors.

Incorrect CAM_BLACK_LEVEL in the sd990 had an effect somewhat like what was described here. See  http://chdk.setepontos.com/index.php/topic,2972.30.html
Don't forget what the H stands for.

Offline axu89

  • Rookie
  • *
  • Posts: 29
Re: SX110IS - howto start porting
« Reply #367 on: 11 / May / 2009, 14:02:53 »
If you didn't have the correct address, you'd get garbage or a partial image, not an image with the wrong colors.

Incorrect CAM_BLACK_LEVEL in the sd990 had an effect somewhat like what was described here. See  http://chdk.setepontos.com/index.php/topic,2972.30.html


Not that I would understand a thing about this.. but I tried setting CAM_BLACK_LEVEL to 128 and calibration results are way better than before (with quick test picture of my laptop LCD (full of reflections). Error used to be something like 80% and now its just 17%.. Now if someone would just fine tune it and take a proper calibration picture :)
[SX110 IS]

Offline Obihoernchen

  • Full Member
  • ***
  • Posts: 104
    • SX110IS Wiki
Re: SX110IS - howto start porting
« Reply #368 on: 11 / May / 2009, 20:11:29 »
If you didn't have the correct address, you'd get garbage or a partial image, not an image with the wrong colors.

Incorrect CAM_BLACK_LEVEL in the sd990 had an effect somewhat like what was described here. See  http://chdk.setepontos.com/index.php/topic,2972.30.html


Not that I would understand a thing about this.. but I tried setting CAM_BLACK_LEVEL to 128 and calibration results are way better than before (with quick test picture of my laptop LCD (full of reflections). Error used to be something like 80% and now its just 17%.. Now if someone would just fine tune it and take a proper calibration picture :)


I would do it if you could tell me:
1. how to change CAM_BLACK_LEVEL
and 2. how to compare the 2 pictures and measure the difference?
Canon PowerShot SX110 IS
CHDK: at Autobuild now
Wiki: SX110IS

CHDK Forum

Re: SX110IS - howto start porting
« Reply #368 on: 11 / May / 2009, 20:11:29 »

Offline axu89

  • Rookie
  • *
  • Posts: 29
Re: SX110IS - howto start porting
« Reply #369 on: 11 / May / 2009, 23:19:20 »
If you didn't have the correct address, you'd get garbage or a partial image, not an image with the wrong colors.

Incorrect CAM_BLACK_LEVEL in the sd990 had an effect somewhat like what was described here. See  http://chdk.setepontos.com/index.php/topic,2972.30.html


Not that I would understand a thing about this.. but I tried setting CAM_BLACK_LEVEL to 128 and calibration results are way better than before (with quick test picture of my laptop LCD (full of reflections). Error used to be something like 80% and now its just 17%.. Now if someone would just fine tune it and take a proper calibration picture :)


I would do it if you could tell me:
1. how to change CAM_BLACK_LEVEL
and 2. how to compare the 2 pictures and measure the difference?


1. CAM_BLACK_LEVEL is in the trunk/include/camera.h (but is 128 really the right value?)

2. I used instructions from links you had posted in the previous page. http://chdk.wikia.com/wiki/DNG4PS-2/Calibration and http://chdk.setepontos.com/index.php/topic,390.0.html

I dont have the time today to get more into it, but I took quick photo of the pallete (damn i hate the glossy LCD screen..) results were not so good but the program was able to calculate the matrix from it.
I used the modified DNG4PS-2 posted by yarvieh in this thread, its buggy like hell but worked for my experiment Options->CamOpts, there you'll find the calibration. (have to try to open the file with wrong camera type, then switch to SX110 and try again, otherwise it wont open....)
Last step is to apply the color matrix into the camera.h.


Results are not perfect, but much at least the blue haze is gone. When I open the DNG with Picasa theres black borders on the right and top, photoshop doesnt show them, its like the picture would "shift" few pixels.. but I wont get down to it now.
I attached resized photos (DNG converted to JPG with photoshop)
[SX110 IS]

Offline Obihoernchen

  • Full Member
  • ***
  • Posts: 104
    • SX110IS Wiki
Re: SX110IS - howto start porting
« Reply #370 on: 12 / May / 2009, 01:02:27 »
nice result up to now :)

I will try it too. Tomorrow or...
Canon PowerShot SX110 IS
CHDK: at Autobuild now
Wiki: SX110IS

Offline chdkj

  • Full Member
  • ***
  • Posts: 140
Re: SX110IS - howto start porting
« Reply #371 on: 12 / May / 2009, 01:05:15 »
@reyalp and @axu89: great!

@obihoernchen: look for "SX110" in include/camera.h and change CAM_BLACK_LEVEL (as axu89 already said) to whatever. Compile it: if you use Windows than you should consider 'CHDK Shell' from user whim for compiling chdk. It is a completely worry-free package...  http://chdk.wikia.com/wiki/CHDK-Shell). Please keep in mind that firmware update method requires the appropriate FI2.inc file in /platform and you have to check in the FI2-option in CHDK Shell.
Have fun!
sx110

Offline Obihoernchen

  • Full Member
  • ***
  • Posts: 104
    • SX110IS Wiki
Re: SX110IS - howto start porting
« Reply #372 on: 12 / May / 2009, 01:47:40 »
Yeah i think i can do it ;) I dont need the FI2 Feature i never use it :P

only one question in camera.h there is nearly 10 times #define CAM_BLACK_LEVEL and one value is 31 all other are 127. Which I have to change?

PS: Which values would be good? Should I also try 129, 130, ... ? Or is there only 127 and 128?
« Last Edit: 12 / May / 2009, 02:48:01 by Obihoernchen »
Canon PowerShot SX110 IS
CHDK: at Autobuild now
Wiki: SX110IS

Offline axu89

  • Rookie
  • *
  • Posts: 29
Re: SX110IS - howto start porting
« Reply #373 on: 12 / May / 2009, 08:44:57 »
Yeah i think i can do it ;) I dont need the FI2 Feature i never use it :P

only one question in camera.h there is nearly 10 times #define CAM_BLACK_LEVEL and one value is 31 all other are 127. Which I have to change?

PS: Which values would be good? Should I also try 129, 130, ... ? Or is there only 127 and 128?


Its a list of all camera models, SX110 is at the bottom of the file and not all cameras have it defined. I dont know what would be the effect if it would be undefined for SX110..
I will experiment more today if I have the time (propably not :( )
reyalp pointed out a good thread. Theres some discussion about the black level value:

If you didn't have the correct address, you'd get garbage or a partial image, not an image with the wrong colors.

Incorrect CAM_BLACK_LEVEL in the sd990 had an effect somewhat like what was described here. See  http://chdk.setepontos.com/index.php/topic,2972.30.html
[SX110 IS]

Offline Obihoernchen

  • Full Member
  • ***
  • Posts: 104
    • SX110IS Wiki
Re: SX110IS - howto start porting
« Reply #374 on: 12 / May / 2009, 20:12:46 »
Yeah i think i can do it ;) I dont need the FI2 Feature i never use it :P

only one question in camera.h there is nearly 10 times #define CAM_BLACK_LEVEL and one value is 31 all other are 127. Which I have to change?

PS: Which values would be good? Should I also try 129, 130, ... ? Or is there only 127 and 128?


Its a list of all camera models, SX110 is at the bottom of the file and not all cameras have it defined. I dont know what would be the effect if it would be undefined for SX110..
I will experiment more today if I have the time (propably not :( )
reyalp pointed out a good thread. Theres some discussion about the black level value:

If you didn't have the correct address, you'd get garbage or a partial image, not an image with the wrong colors.

Incorrect CAM_BLACK_LEVEL in the sd990 had an effect somewhat like what was described here. See  http://chdk.setepontos.com/index.php/topic,2972.30.html



i'm so stupid -.-
Canon PowerShot SX110 IS
CHDK: at Autobuild now
Wiki: SX110IS

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal