From: <ki...@ba...> - 2005-03-24 22:12:42
|
This is a report on a new Mars camera and a request for help from anyone who has one of these, or a similar one. I have some incomplete information (described below) based upon correspondence with an owner of such a camera. Unfortunately, the correspondence stopped just at the point that I was actually almost getting enough information to be able to support the camera, as will be clear below. It will also be clear why the camera will not make it into the upcoming next public release of libgphoto2: there are problems which are minor (major problems such as proprietary compression mode take a bit longer!) and could be solved with a little bit of follow-through on the part of the camera owner. The account follows, beginning with a quote from my reply to the first letter from the owner. -------------------------------------------- > hello, my camera inst working on gphoto -P and it says that it is > supported. > > here is a debug of what he says, like he can read the number of images > on the cam, but not download them. > then, after I looked at some debug output, I replied: 0090 18 00 04 00 0c b0 04 dc-98 02 9a 00 0c b0 04 f4 00a0 18 04 30 01 0c b0 04 0d-98 06 c6 01 0c b0 04 25 00b0 18 08 5c 02 0c b0 04 3e My analysis follows now. 1. The camera is using an unknown code for the first byte of data given in the configuration data block, for each photo. Currently known codes are listed in the source-code file libgphoto2(version)/camlibs/mars/mars.c, in the function "mars_get_comp_ratio" and then again, but organized differently now, in "mars_get_picture_width". The bytes which appear in your log file in these locations are not previously known. ---------------------------- Since the data appeared uncompressed, I suggested simply to add the new ID bytes in the appropriate functions, which was done (below) according to the next letter I received, and is reported to work: (owner reports back) i did these changes in mars.c: in mars_get_comp_ratio i added: case 0x18: return 1; case 0x98: return 1; and in mars_get_picture_width i added: case 0x18: return 640; case 0x98: return 640; and the pictures are being downloaded!!! the only problem is that they are very dark ill attach a photo of my face for you to see! ------------------------------------------- I then wondered what the code for the uncompressed photos is. Here is the last response I got from the camera owner, included in my reply to it. My reply contains an educated guess on my part, concerning the code for a 320x240 photo, but I can't post new code involving mere guesswork, and I can't add support for this camera until I actually know what is happening: ------------------------------------------------------ Date: Sat, 5 Mar 2005 01:38:27 -0600 (CST) From: ki...@ba... To: (deleted) Subject: Re: new things! On Sat, 5 Mar 2005, (deleted) wrote: > hello sir, just to tell you that i found out how to download 320x240 > pictures off the cam, later ill send you a diff with all the changes, > cause now im going out. > > thanks again for all your help! > I think I get it now, having looked at your photo. The new codes 0x18 and 0x98 instead of 0x08 and 0x88 are for photos taken _with_ _flash_! If my reaoning is correct, then I suspect the following, too: 1. If you take photos without flash, then the codes are not new, neither for 640x480 nor for 320x240. The way to test this would be to take some outdoor, daylight photos, if necessary with the flasher turned off. I suspect that for daylight photos at 320x240 the codes are 0x02 and 0x82 (already listed). 2. Extrapolating, I suspect that the new codes for 320x240 with flash are 0x12 for the first photo listed on a line of config data, and 0x92 for the second photo listed on a line of config data. Could I possibly be right about that? Furthermore, I am curious about the existence or nonexistence of compression mode. Nothing on the website seemed to mention that. Is there any mention of it in your docs, or anything resembling it among the possible settings listed on the LED of the camera? Not that the knowledge would do much good. I have no idea how to handle the compression if it is there so I will be glad if it is not. Theodore Kilgore ------------------------------------------------------ Additional comments (as of today, March 24): During the previously-described correspondence, I also learned which camera this is: ------------------------------------------------------ Hello, my camera is this one http://www.ebigchina.com/ebcps/4/pd/408515.html the manual calls it "DIGITAL CAMERA CD302N" in the manual says in the specifications: " Product Type: Digital Camera Electronic Coupling Element: CMOS Sensor 300k Pixels Image Resolution: 640x480 Pixels (VGA) 320x240 Pixels (QVGA) Memory Devices: Built-in 4*16Mb(SDRAM) Memory Capacity: 26 Pieces (VGA) 104 Pieces (QVGA) Viewfinder: Built-in Auto shoot: 10s Shutter Speed: 1/6-1/15000 seconds Shoot Mode: Single/Continuous Photograph/PC camera Automatic Energy Saving: Automatically enter the energy saving mode in 60s. AVI video: 60s(QVGA) Image Process: Automatic Exposure/Automatic White Balance Working voltage: AAA 1.5V*3/USB 5V Transmission Interface: USB Interface Working Temperature: 0-40:C Operation System: Windows98 SE/2000/ME/XP" ------------------------------------------------------------ The decisive thing, I believe, which causes the new code(s) is that the camera uses a flashbulb or LED, and the code indicates the use of said flash. I don't own a Mars camera with this feature, so do not know about it until I get a full report. I also got the photo which is mentioned above. Indeed, the background is very dark. The default treatment of photos will get a photo out of the camera, but in order to get a nicer photo I am sure that it will need some kind of different treatment. This would need some work and tweaking, and again I say that I don't have one of these cameras to test! It should be fairly easy to solve the indicated problems and get the camera added, but I need the help of an owner who is willing to do a bit of testing and tweaking (involving some experimentation with source code changes for te camera library, of course). Volunteers are welcome. Final note to anyone who has a new compressed-mode-only Mars camera and has read this hoping for some exciting news: Sorry. I have been spending a lot of time lately working on the compressed mode for the sq905 cameras, about which I knew a bit more to start with. I hope to get done with that. It may be foolish optimism, but I think it is almost licked. Theodore Kilgore |