I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods
Amazon Honor System Click Here to Pay Learn More
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / MISC Areas / Cameras
Applications - 1 2 many 4 all
Applications - 1 2 many 4 all

New MessageApplications - 1 2 many 4 all (modified 0 times) brite_eye
Profile
Last night both sailpix and morcheeba located decompression routines, sailpix in a patent application (we/I had failed to look for ungranted patents) and morcheeba in firmware.

This thread is for descriptions, suggestions, questions and links to a final set of applications to download, decompress, process and enhance raw photos. It now appears that these will be lossless and raw bayered images. I am placing a link to boodles raw2rgb. Please feel free to post your cleaned up applications here with all the necessary gnu gpl lpgl open source attachments. I believe the patent application filed in July will take another year from now before it is granted. Even once it is granted, we probably are licensed to use it on photos in our cameras - even if we run a converted version on raw images that have been downloaded from a "licensed" camera that we own. Anyone with legal thoughts and ideas should create a new thread "Legal - 1 2 many 4 all".

I am hoping for following applications:
1. Unlock - simple few click version of Drmn4ea's poker (give him a chance to post first version).
2. Download - including options to select individual files or just all pictures.
3. Decompressor - avoiding use of patent if possible (locate prior art) or Download may just call firmware routine(slower).
4. Enhancers - brighteners (for dark images until/if autobrite is found), and other image improvements.
5. Gadgets - firmware uploads to do whatever we want.

Here are reposts of the latest decompression discoveries!

morcheeba:
I've got a new version of my disassembler. A minor fix to how disv8 handles variable names and banks, plus lots more comments!
earlier version: disassembly = 54k lines, 2.4MB, FIRMWARE.COMMENTS = 3102 lines, 122KB (from about november)
this version: disassembly = 55k lines, 2.5MB, FIRMWARE.COMMENTS = 4635 lines, 182KB

I found a routine (L81A3C) that has both the address of the compressed image and the uncompressed image, so I assume it does something. It also seems to have two nested for loops:

for v=0 to VERT_SIZE
for h=0 to HOR_SIZE/4

I had to stop looking at it because my head spun. There are some hardware registers accessed, but I can't tell how much work is being done in software vs. hardware. (those accesses could be just getting data from SDRAM).

I found where LANG-EN.DAT gets loaded (memory map updated), and then found where the two-finger-salute stuff gets printed -- (only 2 fingers are actually needed - shutter+display). It should be easy to find out where the other text gets printed, but I was lazy

I also found the registers that read the buttons (and mapped which is which), and successfully wrote to the FLASH memory.


sailpix:
Sorry about the last post - I didn't read back far enough to see that I was duplicating known info...
I did some digging in the USPTO database. The patent number on the splash screen is currently assigned to "SMaL Camera Technologies"
- is this clearly the Autobrite technology?

Anyways... these guys seem to like patenting stuff. I searched for all patents with inventor name of "Fife, Keith"
and found an application (i.e. not an issued patent, yet) for "In-stream lossless compression of digital image sensor
data". A bit of reading explains that this is an on-the-fly method for processing and compressing the data from a
digital camera image sensor data and storing it to FLASH memory. Hmmm... sounds like a perfect candidate for the
PureDigital RAW format. Timing is right too - application is dated July 2004, right after the PV2 gets released.

The description fits too - SMaL mentioned widely in press releases that their camera stores stuff in a lossless RAW
format. I suppose the idea is that they can make a camera which compresses the raw image data to a proprietary format,
then the "processing system" does the rest or the work. This lowers the horsepower needed in the camera since it
doesn't have to handle the complexities of image processing or JPEG compression.

Here's the link:
http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.html&r=4&p=1&f=G&l=50&d=PG01&S1=%28%22fife%2C+keith%22.IN.%29&OS=in/%22fife,+keith%22&RS=IN/%22fife,+keith%22

The algorithm is pretty rough reading because it has been reformatted into "patent-speak" text. Man, I wish they
allowed pseudocode in patents...

The next thing I would do is to try following the algorithm against all-black sensor data and see if it comes up with
the bit stream in the all-black RAW file.

12-21-2004 07:45:27

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) brite_eye
Profile
http://www.boodle.info/programs/raw2bmp/
boodles program basically just debayerizes a decompressed raw image.
This is a pretty simple program released under the GNU General Public License. Either drag your raw memory dump from your one time use camera onto boodles_raw2bmp.exe or on the command line type the program's name then pass the memory dump file's name as an argument. It will create a bitmap of the same name as the raw file passed with .bmp appended. This should port easily to Linux/Unix environments.
12-21-2004 07:56:27

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) Drmn4ea
Profile
>I believe the patent application filed in July will take another year from now before it is granted.

What's claimed specifically is a compression algorithm, not a DEcompression algorithm. Would a from-scratch decompressor run afoul of a patent when/if one is granted?

12-21-2004 08:44:39

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) dakotamod
Profile
I am starting to think it may save considerable time to just ignore #3 and upload an uncompress flash storage switch flip instead. For our purposes I disagree with Keith Fife's claim 44 (anyone remember 22 of 44 definition for drawing, I recommend performing such an act soon):

[0043] For example, with a sufficiently high data compression ratio, image data produced by 1.3 million image sensor pixels can be accommodated by a 1 MB SRAM. Once stored in the SRAM, the compressed image data can then be sent from the SRAM to a FLASH memory at a subsequent time for more permanent storage. The data sent to the FLASH can be in compressed or decompressed form.

[0044] It is noted that for many applications, a compressed form is preferred. This FLASH storage of compressed data enables an increase in data storage by the FLASH. As a result, a smaller and/or less costly FLASH memory can be employed, and transfer of the compressed data from the FLASH memory for a subsequent application, e.g., transfer to a PC, can be faster and require a reduced data transfer capability.

Above from United States Patent Application 20040135903.

12-21-2004 11:35:31

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) hoppsan
Profile
Seems to me that the easiest way to go would be to write a program that sucks down the firmware, modifies it to skip the unlocking, and then uploads it to the camera again. That way we can just use the standard flatfoto drivers and software to get images off of the camera and we don't have to worry about implementing our own raw decompressor.
12-21-2004 16:21:09

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) bentfork
Profile
hoppsan -- thats a _really_ good idea. There are lots of other similar firmware .pack files out there...
12-21-2004 16:48:53

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) dakotamod
Profile
I agree and hope someone tries soon. I do fear a slight shear, some packs appear desireous of a specific key handshake. When I poked my blue FlatFoto with an 80getkey and read back 141 response it looked rather ugly with a string of FFs in the middle. If anyone can locate function call and provide details of where to write a short string of new code along with poke commands, I'll try along with others I am sure (hopefully this can initially be tested outside of Flash).
12-21-2004 17:04:24

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) hoppsan
Profile
Well, I just used the foxz2 driver to get the pictures off my camera. My god that driver sucks when it comes to image quality. It seems to use a jpeg setting of about 50% or something. Has anyone managed to figure out how to configure this driver to output PNGs instead? I'm starting to think it would be a good idea to write our own driver after all :)
12-21-2004 18:08:44

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) dakotamod
Profile
No matter how bad, we all could use some education (along with a few holiday laughs), so please post pictures along with a Vulcan nereve pinch (described in annoying thread), driver and photo processing software.
12-21-2004 18:56:54

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) brite_eye
Profile
The worst criticism of my photos is due to poor focus caused by fixed focus. While modifying to achieve manual focus is relatively easy, the actual process of focusing is very impracticle. Adding a feature to press a button and display the center 280 x 220 portion of 1280 x 860 image would enable manual focusing. Further enhancements could be a pitched beebing to simulate auto focus with sound indicating tightest focus as one rotates lens back and fork - can you do that ForkBoy? You would then be responsible for cameras skyrocketing off drugstore shelves instead of just flying off.
12-27-2004 16:56:35

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) ForkBoy
Profile
Brite_eye, I don't think this is something I could do at this time.
If anyone could, it would be Morcheeba.

All I do is make pretty front ends for USBPoker and Morcheeba's USB discoveries...

12-27-2004 17:06:06

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) ForkBoy
Profile
I have released a new version of PV2Tool that will allow you to display .TFT files on the Camera LCD display.

Additionally I have created a new tool to view TFTs on the PC and convert bitmaps to .TFT files.

Both are available for the Windows platform only right now.

Both can be downloaded here:

http://forkboy.doesntexist.com

Viewing bitmaps on the PV2 is fun.

12-30-2004 19:49:38

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) taytrr
Profile
ForkBoy -- can you post the source for the two yet?
12-30-2004 21:33:05

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) ForkBoy
Profile
The VC++ 6 source code for PV2Tool 1.2 and the TFT Utiliy 1.0 are now available at http://forkboy.doesntexist.com

I apologize for the code - PV2Tool was an experiment and is a mess.

Forkboy (At)
verizon (Dot)
net

12-31-2004 16:50:41

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) insomniac40
Profile
Brite_eye,
Inresponse to question about panorama I'm afraid the answer is simple and not very technical. I photo merged four images together in photoshop elements. Nothing fancy. Just stood there and took photos as I scanned the field and merged them together. It would have come out a lot better with tripod and shutting the flash off. There is always next time now that this camera is multi-use.
01-12-2005 15:23:46

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) brite_eye
Profile
2 ALL, Ansel mentions Winlib 0810 - is that a substitute for libusb 1.8.0? If so how do the two compare and why use one vs the other?
01-21-2005 16:34:52

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) morcheeba
Profile
I'm working on using the PV2's screen as an external screen for a computer... here's a sample. I used a really small font font (8x11 pixells) to cram in 35x20 characters onto the display - an 8x8 font would allow 27 rows. I used the fonts from the camera's LANG-EN.DAT file (but obviously the built-in firmware increases the size a bunch), and that font table doesn't include some popular characters - like ':', '%', '=', '#', and '.'. So that's why there are some other characters in those places - like the no-flash symbol and the self-timer-clock symbol. I haven't modified the firmware yet to allow continuous updates, but that's in the works...
01-22-2005 01:18:08

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) Ansel_Adams
Profile
Brite-Eye, no, 0810 was a typo, but yes I have been sticking with using libusb 1.8.0 because it's been part of a working system to get the pictures off of the Ritz red. After all this time I'm just happy to be able to enjoy the use of my camera for actual pictures.. I've been trying to find a CVS that has OTU digital cameras in my area. I went to two stores that had photo centers, but they don't expect to get a supply for several months. The clerks in the stores knew exactly what I was looking for when I asked for one-time use cameras.
01-22-2005 20:22:48

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) morcheeba
Profile
External screen application -- more progress!!

The TFT display command is nice, but it's more suited to display a single message than be a continuously updated display. When the image is first displayed, the camera beeps, waits for a button press, then beeps again and turns off the display. I modified the firmware to remove all of this - it's quiet, stand-alone, and leaves the screen on between updates (as a result, the screen glitches a bit while it is being reinitialized at every update, but it would be possible to fix that). The speed of screen updates is limited by the USB transfer speed (not just the hardware limitation, but also the speed that the camera can process the incoming information). You can see the screen refresh, and I clocked it at 1.65 seconds/screen.

I'm using my mac to compose the TFT image from text and a font table, but that means 64K of data must be transfered for every screen. If the USB transfer is the limiting factor, then it might be faster to send only the desired text & let the camera draw it instead -- it would depend on how fast the camera could draw characters. Also, the camera uses a double buffered (or triple?) operation - data is saved in one bank of memory before being copied to the display memory -- modifying the firmware to store data in the final destination on the first try would make it more efficient would probably double the speed.

01-22-2005 21:46:39

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) Drmn4ea
Profile
Win32 port of morcheeba's PV2mod: http://cexx.org/dakota/pv2mod_win.zip . I used this port to successfully mod my Red 6410, but as with any software here, no lifeguard on duty, use at your own risk.

(Correctly working) port of disv8 coming soon, when I don't have an immediate need to sleep

01-27-2005 22:28:34

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) Drmn4ea
Profile
Win32 port of disv8; erroneous Windows behavior due to Mac/Win memcpy variations corrected (using memmove...hopefully none of your compilers implement this brokenly as another memcpy, if you're rebuilding from source.)

http://cexx.org/dakota/disv8.zip

Again this is basically the EXE port + source only; you still need to supply the latest FIRMWARE.COMMENTS yourself (and of course your own FIRMWARE.BIN).

01-30-2005 17:52:28

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) brite_eye
Profile
boodle, sailpix is fast approaching a decompression solution. When will you be ready with a new raw to rgb debayer routine?
03-09-2005 15:13:14

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) sailpix
Profile
Thought I'd re-activate this old thread because it is appropriate and (so far) short...


ForkBoy,

I shot a full camera (25) of pictures this weekend and noticed several issues with using PV2Tool 2.x:

A. I still can only unlock my Ritz/Wolf Red 6410 for TWAIN using the old PV2Tool v2.04. PV2Tool v2.05/6 will both find my camera and can download some (see below) individual files, but neither of the recent versions can unlock my camera to work with the Foxz2 TWAIN driver.

B. When I get the file list for a full camera using v2.05/v2.06 then I only see the first 13 files. I cannot see (or access) the other 12 .RAW files on the "roll". If I pull the flash then I can see all 25 .RAW file names in the directory (I assume) area - and the TWAIN driver finds and retrieves all 25 images.

C. I tried pulling the flash from my camera - it only works up to a point. From watching the U-I, that point is around 19%. Each time I get a file that's 3200K bytes long - I don't believe this is much more than around 5-6 images worth. The action log window says "Read Error". Is there any more information I could give you to diagnose this? Since I can't download the .RAW files individually (see B, above) I wanted to pull them out of the full flash dump.

D. I just got a real RadioShack FlatFoto2 camera. However, PV2Tool v2.05/v2.06 doesn't seem to work for these gadgets... It doesn't seem to want to get a file listing because the camera isn't unlocked - but it can't be unlocked because a FlatFoto2 isn't locked in the first place, right? Do you have some sort of state machine that prevents requesting the file list until after the unlock is successful? Anyways... what can I do to help get PV2Tool working with this camera?

I decided to bring up all this stuff in a public thread to see if anyone else is having the same (or similar)
issues with PV2Tool. It's a great utility and I want you to keep improving it for us!

Thanks!


- sailpix _/)
04-06-2005 21:49:16

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) brite_eye
Profile
For D. above, My new $49 thin Blue Radioshack baby works like a charm with pv2tool v2.06 (just downloaded firmware and several raws - skipped unlock just find, connect, get listing, download)! I returned my prized $79 old blue flatfoto (it was used to decompress morcheeba's cat) when it stopped flashing (good thing I was very busy snapping lots of pictures before 30 day return expired).

I think I fried my Ritz when I wasn't getting a complete listing as in B., but do not remember what version of pv2tool. I then fried a CVS blue using pv2mod without immediately unplugging - but all subsequent pv2mod single instruction single block firmware changes have been successful.

For the last month I can't remember having any problems with v2.06. Sailpix your problems may be USB timing related due to old 6410, new flatfoto and hardware or operating system (I used homebuilt with 2G Celeron overclocked to 2.6G running XP SP1).

04-07-2005 04:23:40

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) billw
Profile
sailpix, I've had some of the problems you've run into a couple of times - specifically your B&C problems. Once the camera did it on it's own, and it also happened when I uploaded my 26 1-byte .RAW files.

I'm guessing it happens when the camera doesn't like something in the FAT structure, and I don't think it's pv2tool's fault particularly. I'm also guessing that it affects the flash download, because the camera probably checks the FAT to gracefully handle bad sectors.

Both times I had it happen, I uploaded a flash image (with no pictures on it) to fix it. The upload worked fine despite the download dying after 5%. That said, I'd severely caution against flash upload on a 6410. The failures thread is littered with the bodies of 6410's. I killed one myself with a correct checksummed-firmware and a textbook perfect flash upload.

It *might* be enough however, to download or clear the pics via foxz2 (once you get that working). I'm pretty sure foxz2 uses the USB file-access routines built into the camera, whereas pv2tool directly accesses the camera's FAT, finds which sectors files are stored in, and accesses the sectors directly, etc.

Just guessing, but maybe your "problem A" is unrelated to the other problems. In any case, you might want to try a later version of libusb on your system. I can get you a version of pv2tool 2.06 linked against libusb 0.1.10.1 if you want to try that. (Is that OK by you forkboy?)

brite_eye, if you get a chance to snag the firmware off the flatfoto2, can you run my pv2patch-0.2.1 against it? You don't actually have to apply any patches - I'm curious to see if it reports any of of the patchable pv2 locations, and if the checksums are handled the same as the pv2. Basically a quick test to see if any of the codebase is the same.

04-07-2005 10:12:59

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) sailpix
Profile
If PV2Tool reads the sectors in the FAT structure directly then my problem (B) may be a bug in how PV2Tool does that.
This 6410 camera has /never/ been uploaded to using PV2Tool - I just use that to read .RAW files and to try to read the flash.

I have used the Foxz2 TWAIN driver to download my 25 images and then delete them from the camera. Then I shot another 21 images - of which only 13 were visible. So, this problem persists through clear downloads by the TWAIN driver.

USB timing issues are possible - I suppose... Often the camera doesn't really unlock - this leads to the "can't download images in bootloader mode" messages. But, when it does unlock enough for the TWAIN driver, I can always pull all 25 images via that driver.


- sailpix _/)
04-07-2005 12:37:07

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) billw
Profile
(B) may well be caused by a bug or misassumption in pv2tool, but (C) definitely isn't. Pv2tool doesn't try to access the fat structure at all to download the flash. It just bulk reads all of the flash, one block at a time.

Do you still get (C) right after you've downloaded all of the images from foxz2? The answer would help seperate (B) from (C).

Sí Sí?

04-07-2005 12:57:25

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) sailpix
Profile
I'm not sure - I haven't tried that sequence... I usually try downloading the flash right after I've downloaded the .RAW files.

I'd love some sort of more detailed output diagnostics (log file?) which would tell me more about what it's trying and where things are failing. But, ForkBoy can add that if it's the best way to diagnose things.

When I finish with RAW conversions and get back from vacation (May) then I may be able to dive into the USB stuff some myself. I'm tired of image bit crunching - for now. :-\


- sailpix _/)
04-07-2005 14:03:18

New MessageRE:Applications - 1 2 many 4 all (modified 0 times) kiram
Profile
Hey, Forkboy, could you add a loop to your program PV2tool for unlocking. I found with both my cameras that to unlock them i just need to go >connect>unlock>disconnect, and do that lotsa times until it unlocks. Dont need to mess with unplugging it a lot (or restarting). Maybe you could add a loop checkbox so that it will automatically so my finger isnt sore... btw, are you going to realise sourcecode for PV2tool?
04-08-2005 16:00:37

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3