A470 Porting - page 17 - DryOS Development - CHDK Forum

A470 Porting

  • 253 Replies
  • 93884 Views
Re: A470 Porting
« Reply #160 on: 25 / May / 2009, 12:26:59 »
Advertisements
While taking RAW images just enable the grid from osd menu and select the grid, it displays the un/cropped area.

Re: A470 Porting
« Reply #161 on: 26 / May / 2009, 03:44:47 »
thanks a lot

*

Offline Thorwak

  • *
  • 26
  • a470
    • Nostalgia Public NetHack Server
Re: A470 Porting
« Reply #162 on: 27 / May / 2009, 14:00:36 »
Hi ppl,

I'm a total chdk rookie. In fact I bought a a470 a couple of days ago since I really wanted to try chdk out, and that camera is dirt cheap right now. When I noticed the a470 was supported I bought one right away. Thanks for the port, MrSpoon! :)

I had a look at the RAW cropping problem, and it seems it's just a couple of overlooked #define statements (from copy/paste probably). I looked at other cameras and fixed the problem. The X size is verified through experimentation, any bigger and dead pixels appear. It MIGHT be possible to get a couple more pixels vertically, but it's really close to the limit so I didn't test this. It's bigger than the JPG anyway now so.. :) Note that I've only checked the resulting .DNG files out. I don't have any software for reading .RAW or .CRW so someone could maybe check this, just in case. Should be fine though.

Here's my patch:
Code: [Select]
Index: include/camera.h
=============================================================================
--- include/camera.h (revision )
+++ include/camera.h (working copy)
@@ -230,8 +230,8 @@
     #define CAM_JPEG_HEIGHT 1944
     #define CAM_ACTIVE_AREA_X1 6
     #define CAM_ACTIVE_AREA_Y1 6
-    #define CAM_ACTIVE_AREA_X2 2618
-    #define CAM_ACTIVE_AREA_Y2 1962
+    #define CAM_ACTIVE_AREA_X2 3108
+    #define CAM_ACTIVE_AREA_Y2 2334
     // camera name
     #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
     //#define DNG_EXT_FROM ".DPS"

I've tested it on my a470 ver. 1.02c, but of course I take no responsibility and so on. That said, I put up compiled versions of my patched chdk build here:
http://nostalgia.suroot.com/a470-0.9.8-766-rawfix

I'll leave it up until the svn code is fixed and it gets into the autobuild.

It might be a good idea to re-create your badpixel.bin.

Again, Thanks to everyone involved in the chdk project and in the a470 port!!



EDIT 2009-05-28:

The coordinates were still slightly off, resulting in black line and/or incorrect pixels at the borders. I've cropped it a tiny bit now to exactly match what I see when magnifying a picture. Maybe someone else could confirm it looks good at the edges with their cam too.

New diff (against original 766 trunk)
Code: [Select]
Index: include/camera.h
=============================================================================
--- include/camera.h (revision )
+++ include/camera.h (working copy)
@@ -228,10 +228,10 @@
     // cropping
     #define CAM_JPEG_WIDTH  2592
     #define CAM_JPEG_HEIGHT 1944
-    #define CAM_ACTIVE_AREA_X1 6
-    #define CAM_ACTIVE_AREA_Y1 6
-    #define CAM_ACTIVE_AREA_X2 2618
-    #define CAM_ACTIVE_AREA_Y2 1962
+    #define CAM_ACTIVE_AREA_X1 12
+    #define CAM_ACTIVE_AREA_Y1 8
+    #define CAM_ACTIVE_AREA_X2 3108
+    #define CAM_ACTIVE_AREA_Y2 2332
     // camera name
     #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
     //#define DNG_EXT_FROM ".DPS"

New binaries (previous ones taken down) :
http://nostalgia.suroot.com/a470-0.9.8-766-rawfix2/


Hav fun :)
« Last Edit: 28 / May / 2009, 04:19:22 by Thorwak »
Do it 'til it Hz

Re: A470 Porting
« Reply #163 on: 28 / May / 2009, 05:26:19 »
OK will perfect thanks

Re: A470 Porting
« Reply #164 on: 28 / May / 2009, 23:41:09 »
Works perfectly. Resulting RAW image resolution 3096*2324. :)
« Last Edit: 29 / May / 2009, 00:51:30 by paragbhade »

*

Offline Thorwak

  • *
  • 26
  • a470
    • Nostalgia Public NetHack Server
Re: A470 Porting
« Reply #165 on: 29 / May / 2009, 03:19:44 »
Excellent, I guess MrSpoon could just update the svn then. Would be nice to have that done since it makes the a470 port a lot more usable. Thanks for reporting! :)
Do it 'til it Hz

Re: A470 Porting
« Reply #166 on: 29 / May / 2009, 08:53:03 »
" I've tested it on my a470 ver. 1.02c, but of course I take no responsibility and so on. That said, I put up compiled versions of my patched chdk build here:"

I have tried this patch (including re-running badpixel.lua) and am not getting any improved resolution.
That said, I am not sure if the problem relates to the original CRW file. It is just over 9 MB and I would
have expected a larger CRW file for a resolution that should be 3072 x 2304.

I am unable to find any program that can read the CRW file, from a hex dump it appears to have no
header information, only raw data. The resolution I am getting is 2612 x 1956.

thanks.

The output from dcraw -i -v crw_0441.dng follows:


Filename: crw_0441.dng
Timestamp: Thu May 28 20:27:23 2009
Camera: Canon PowerShot A470
DNG Version: 1.1.0.0
ISO speed: 100
Shutter: 1/79.5 sec
Aperture: f/6.0
Focal length: 11.6 mm
Embedded ICC profile: no
Number of raw images: 1
Thumb size:   128 x 96
Full size:   3152 x 2340
Image size:  2612 x 1956
Output size: 2612 x 1956
Raw colors: 3
Filter pattern: RGGBRGGBRGGBRGGB
Daylight multipliers: 3.485738 1.929403 2.691900
Camera multipliers: 1.623000 0.956000 1.583000 0.000000





*

Offline Thorwak

  • *
  • 26
  • a470
    • Nostalgia Public NetHack Server
Re: A470 Porting
« Reply #167 on: 29 / May / 2009, 09:37:05 »
pterem321, that is interesting. Before I dig deeper, I just want to make sure: Are you using the boot method (and not the firmware update method, if that is available for the a470)?

My build doesn't contain the file necessary to use the firmware update method since I didn't feel like getting into the whole encryption-keys business because it was hard to find exact information for a noob (as myself). If you could just confirm that the splash screen of chdk shows yesterday's date as build time so we know you are using the correct version and not using your old version by accident?

Anyway, the .dng files should work for you too, but of course I'll take a look at what might cause the problem for the "true raw" format if it exists :)

Thanks,

/Thorwak
Do it 'til it Hz

Re: A470 Porting
« Reply #168 on: 29 / May / 2009, 10:24:44 »
Well Thorwalk, you may have a point on some differences the way CHDK is loaded.

My method was (BTW I use linux) is to unzip the zip file and copy files to the root directory of the
memory card. I have not attempted making the card bootable as I was happy enough to use the
menu to load CHDK when I want.

I replaced the diskboot.bin file and I did notice a small black line in the far left of my new pic
otherwise I thought there was potentially good results other than the resolution matter.
(the black line did not appear in the previous CHDK version, but the resolution was the same).


The build info reported is:

CHDK Ver: CHDK 0.9.8-766
Date:         May 24,2009
Time:         12:41:37
Camera:    A470
FW Vers:    102c
Compiler    GCC 4.3.2

The previous version was dated May 18, 2009 so there is some change, don't know if it should
have read may 28, 2009.

BTW (will be logging out for the day).



Thanks


*

Offline Thorwak

  • *
  • 26
  • a470
    • Nostalgia Public NetHack Server
Re: A470 Porting
« Reply #169 on: 29 / May / 2009, 10:35:46 »
Yep, it should read May 28, you have mixed up the files somehow. I hadn't even bought my camera on May 24 :P

The black line is also fixed in my May 28 build.

Get it here:
http://nostalgia.suroot.com/a470-0.9.8-766-rawfix2

You're gonna have to make your card bootable or wait for the autobuild to get fixed.

Cheers,

Thorwak

Do it 'til it Hz

 

Related Topics


SimplePortal © 2008-2014, SimplePortal