New build (16) - page 3 - AllBest's Builds - CHDK Forum

New build (16)

  • 27 Replies
  • 17716 Views
*

Offline wontolla

  • ****
  • 413
  • S3 & G9 & A720
Re: New build (16)
« Reply #20 on: 07 / January / 2008, 10:34:11 »
Advertisements
Okay folks, I'm starting to warily jump into the next level of this stuff. I've not done any compiling nor machine language programming since my old 6502 CPU days with my C-64/128. I loaded the show_bad.c file into ScITE, the program I was using with AutoIT to recompile that "Auto ISO Patcher" program recently, thinking that's all I might need to change this line in show_bad.exe

if (value>threshold+BLACK_LEVEL) printf("%d,%d=%d\n",i,nrow, value);

to

if (value>threshold+BLACK_LEVEL) printf("%d,%d",i,nrow, value);

Hi Barney. I am able to compile the show_bad.c code to obtain the required pixel-list. I made the change in the "printf" command as you suggested.

I am using Dev-C++ 4.9.9.2 (with its own gcc compiler) with no flaws.

I would preffer not to upload an executable unless somebody asks for it (I am a little bit paranoic about downloading exe files).

I know you just have fun making/modifying these little programs (I liked your "obtain real exposure time" thing using exiftool) and you already have your pixel-list so maybe you won't really need the show_bad.c exe.

For the rest of us, I suggest you change the code as Barn says and compile with gcc, you should have no problem. Maybe Barn just likes the "error" messages as they represent a challenge.

Anyways if you know nothing about compiling please ask for the executable file. But you only have my boy scout word that it is not harmful.

Cheers!

Re: New build (16)
« Reply #21 on: 07 / January / 2008, 13:09:30 »
Deleted
« Last Edit: 22 / April / 2008, 09:17:18 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

*

Offline wontolla

  • ****
  • 413
  • S3 & G9 & A720
Re: New build (16)
« Reply #22 on: 08 / January / 2008, 06:14:18 »

Here is the modified "show_bad" program.

This program prints on a command window the coordinates of hot pixels (of a picture with the camera cap) for RAW pixel patching as required by AllBest 16 build. The modification is just removing the third number or pixel value from the output so you just copy and paste to the "badpixel" file.

Yes Barn, the Dev-C++ is freeware. It is an Integrated Development Environment (IDE) for C/C++. I find it fast and clean.

Me too. In 10 years I've never lost any data due to viruses. If people scan files there is minimal risk really. I just thought we were not suppose to upload exe files in this forum (my e-mail provider forbids them).

Keep those manuals at hand; maybe you will need them later (as a paperweight).

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: New build (16)
« Reply #23 on: 08 / January / 2008, 07:16:44 »
Remove characters ("=xxxx") in bad pixel list is not necessary, CHDK ignores any characters after second number to the end of the line.


Re: New build (16)
« Reply #24 on: 08 / January / 2008, 10:24:37 »
Deleted
« Last Edit: 22 / April / 2008, 09:17:39 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

*

Offline wontolla

  • ****
  • 413
  • S3 & G9 & A720
Re: New build (16)
« Reply #25 on: 08 / January / 2008, 11:47:51 »
This is what happens when we don't read the manual...wait...there is no manual!

But in this forum we have something better than the book: Thanks EWAVR!

Re: New build (16)
« Reply #26 on: 08 / January / 2008, 13:15:22 »
Deleted
« Last Edit: 22 / April / 2008, 09:18:00 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

Re: New build (16)
« Reply #27 on: 31 / January / 2008, 10:27:26 »
I did slight modifications to the source code show_bad.c, in order to produce directly a file called badpixel in the right format...

here are the modifications to apply before compiling:

1. add:

#include <iostream>
#include <fstream>
using namespace std;


after the line

#include <sys/stat.h>

2. add:

    ofstream fbadpixel;

in the variable declaration

3. add:
        fbadpixel.open("badpixel");

just after
        fcraw=fopen(argv[1],"r+b");

4. change the line:
            if (value>threshold+BLACK_LEVEL) printf("%d,%d=%d\n",i,nrow, value);


to

            if (value>threshold+BLACK_LEVEL) {
                printf("%d,%d\n",i,nrow);
                fbadpixel << i <<","<<nrow<<"\n";
            }


5. add:
     fbadpixel.close();
just after
     fclose(fcraw);


I did not have time yet to test the file on my A610, but I found a raw sample on the web, and I tested it on it, it seems to give a good outpout...

just run the file like usual....at the end, a new file badpixel should be present in the folder of show_bad...you can open this file with a text editor, and compare first and last values with the one printed in the shell window from which you run the program...

tranfert this file onto your SD card at the right place, and it should work...

 :xmas
SuperManu



 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal