RANDOM ZERO-VALUED (BLACK) PIXELS ? - page 2 - RAW Shooting and Processing - CHDK Forum supplierdeeply

RANDOM ZERO-VALUED (BLACK) PIXELS ?

  • 16 Replies
  • 5817 Views
*

Offline SticK

  • *****
  • 779
Re: RANDOM ZERO-VALUED (BLACK) PIXELS ?
« Reply #10 on: 14 / August / 2012, 11:03:56 »
Advertisements
With what's going on in Rome recently leads me to wonder.  Anyway, I was directing my last question to the member who has been handling my post with much diligence and patience, reyalp.  I assume waterwingz, you have been following this post too, and I am honored by your chime-in.  Even though I am a CHDK Rookie and will be so for some time, still need hand-holding before the seas calm down, at another level it's nice that I can talk to my peers.  High kudos to all of you for CHDK ... it's a brilliant piece of work that I am certain must have involved considerable reverse engineering.  When I took my fist S50 apart and tried to get it to work with the CCD out, it was impossible to get Canon's cooperation.

Could you think of opening another forum topic called something like "Using CHDK with computer remote control"?  I could possibly make some contributions there in the future, for now starting with a concise resume of what reyalp and I crafted out in this post.

Re: RANDOM ZERO-VALUED (BLACK) PIXELS ?
« Reply #11 on: 14 / August / 2012, 11:19:06 »
Could you think of opening another forum topic called something like "Using CHDK with computer remote control"?  I could possibly make some contributions there in the future, for now starting with a concise resume of what reyalp and I crafted out in this post.
There as been some discussion about an Android app that does the same things as chdkptp.  We have chdkptp running on raspberry pi's (linux) but not on anything truly portable at this point.  Being able to do "live view" and basic camera control in the field from a tablet or smart phone tethered to the camera's USB port would be a very nice feature - don't you think ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline SticK

  • *****
  • 779
Re: RANDOM ZERO-VALUED (BLACK) PIXELS ?
« Reply #12 on: 14 / August / 2012, 11:46:30 »
Although personally I use a regular cheap phone just for voice and am not familiar with the Android O/S, tablets and smart phones like my son is, I think for many photographers what you propose would be the cat's meow. 

Who knows ... if your CHDK idea catches on, Canon may bring back remote capture in their small camera lines, making them more attractive to sell by leveraging on the popularity tablets and smart phones.  They could even implement an RF protocol (the likes of Bluetooth for example) to eliminate cabling.   So a feature like that could even be a good "sales pitch" to Canon that way, I think ... good for photographers, and for Canon ... and ... in the public domain.

For my application, I use a desktop computer because I have to run other hardware like spectrometers, lighting, and motion control systems.  So mine is not portable.

I have not delved into CHDKPTP yet but will do so soon, and see how it goes.

*

Offline reyalp

  • ******
  • 13287
Re: RANDOM ZERO-VALUED (BLACK) PIXELS ?
« Reply #13 on: 14 / August / 2012, 16:44:35 »
So the fact that the camera does not name the "remoted" file, the camera file counter likely remains fixed.
Thanks for the description, that clears it up a lot.
Quote
That seems to agree with your CHDK operation description.  Hence a pileup of RAW files with the same number on the SD card.  CHDK does not overwrite a existing file with the same name, instead it adds it to the SD card folder. 
I don't understand this. If CHDK sees the same number, the file will have identical names and be overwritten. AFAIK you can't have multiple files with the same name in the same directory in FAT unless the filesystem is badly damaged.  Maybe I'm misunderstanding something.

It's possible for the listing windows shows over USB to have duplicate names (I've seen this happen when you mix prefix/extension combos the firmware doesn't expect), but the actual directory on the card shouldn't be able to do this.

It seems to me the Canon firmware might be confused if there are only raws with no associated jpeg. In this case, the actual numbers on the card could be correct.

Can you look in the CHDK file browser and see what it shows in this situation ? Or examine the card in a card reader ?
Quote
One option a developer may consider is when CHDK detects RemoteCapture,
CHDK doesn't currently know how to detect RemoteCapture. We could probably detect if the file number incremented between shots, but it's not clear what to do then. If we add to the current file counter value, then things will get confused when the Canon counter starts counting again. We could add an option to the raw settings to use a completely different counting scheme I guess.

I wouldn't want CHDK to figure out the number from files on the card (at least not by default), because it could be quite slow, and there are already issues due to having too many files handles open at startup. There's also diversity in the possible location and naming.
Quote
Over the next several days I will try your suggestion of PTP on another computer and might have some questions later, for I which I'd start a new thread.  You seem very knowledgeable ... I noticed a C code snippet in a reply ... are you one of the developers?
Yes, I am one of the chdk developers and the developer of the chdkptp client.

Note that although it isn't implemented yet, there has been talk about sending images directly over the PTP  extension without writing to the card, see http://chdk.setepontos.com/index.php?topic=4338.msg88931#msg88931
Don't forget what the H stands for.


*

Offline SticK

  • *****
  • 779
Re: RANDOM ZERO-VALUED (BLACK) PIXELS ?
« Reply #14 on: 14 / August / 2012, 17:53:52 »
You're most welcome // my pleasure. 

I tried to repeat the "file pileup" problem and could not, which is good news.  So probably that was FileExplorer/driver leaving dangling files, something that fits your explanation.  Therefore under RemoteCapture, CHDK manipulates one RAW file on the SD card, ie overwrites it every time I do a PC shutter release.  So that works as expected.  I seen dangling files happen a couple of times with Windows in past decade or so.

Hence for SX110 ..... beginning with an empty folder on the SD card and camera OFF, this works well ...
  a) Plug in USB
  b) Power UP
  c) Close whatever Canon stuff pops up on the screen
  d) Launch RemoteCapture DC
  e) Shoot one photo
  f) Close RemoteCapture DC.  That retracts the lens but keeps camera powered.
  g) Press ON/OFF to power DOWN
  h) Press ON/OFF to power UP (refreshes Windows filesystem data)
  i) Close whatever Canon stuff pops up on the screen
  j) Launch FileExplorer and open the camera
  k) Copy the CR2 file to PC and rename.
  l)  Go to (d) for the next shot.
While in RemoteCapture, the CR2 file will have the same number for each shot.

So to answer your questions, the RAW file on the SD card does get overwritten correctly.

Your suggestion of adding a file counting scheme in the menu is good.  You could also create a special folder to handle RAWs when connected to RemoteCapture.  That way the 110CANON folder and file counter should remain unaffected when going back normal portable operation when the camera is disconnected from the computer.

Thanks for the link to the PTP post.  I agree in principle.

*

Offline reyalp

  • ******
  • 13287
Re: RANDOM ZERO-VALUED (BLACK) PIXELS ?
« Reply #15 on: 14 / August / 2012, 22:44:46 »
So to answer your questions, the RAW file on the SD card does get overwritten correctly.
Have your verified this by looking at the actual contents of the SD card with a card reader or the CHDK file browser ? I would not draw conclusions based on what windows PTP file browsing shows.
Quote
Your suggestion of adding a file counting scheme in the menu is good.
It's not very good because there's I can't think of a simple scheme that could be guaranteed to not collide with the Canon one. The Canon firmware will also change it's numbering based on what's on the card in some cases.
Quote
  You could also create a special folder to handle RAWs when connected to RemoteCapture.  That way the 110CANON folder and file counter should remain unaffected when going back normal portable operation when the camera is disconnected from the computer.
If we make folders outside of the 100CANON etc naming scheme, then the Canon firmware will not see them, so you wouldn't be able to transfer them them using standard PTP. If it is in that naming scheme, then it still potentially collides with the Canon stuff. You might be able to do something like 900CANON and be safe, but the interactions with the stock firmware would have to be checked.
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: RANDOM ZERO-VALUED (BLACK) PIXELS ?
« Reply #16 on: 14 / August / 2012, 23:43:09 »
Yes I did check the card in a reader and there is only one CR2 file on it in the 110CANON folder, after taking several remote shots.  So long as I adhere to the protocol I outlined earlier, opening the camera folder in FileExplorer step (j) shows the same CR2 file as the card reader, just the one file.  No problem.

I'm certain you are far more qualified than me to find the best solution ... I just drop some ideas to present a thinking ballpark.  So if 900CANON would work without collision and files would show up in FileExplorer as picked off by Canon firmware in the 100CANON and 110CANON folders, then sure.

Thanks for your attention.

 

Related Topics