AminetAminet
Search:
84544 packages online
About
Recent
Browse
Search
Upload
Setup
Services

comm/misc/Camedia.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Get pictures from Camedia digital camera
Author:afleuti at iiic.ethz.ch (Andreas Patrick Fleuti), TetiSoft at apg.lahn.de (Detlef Würkner)
Uploader:TetiSoft apg lahn de (Detlef Würkner)
Type:comm/misc
Version:0.43
Architecture:m68k-amigaos
Date:2001-06-09
Download:http://aminet.net/comm/misc/Camedia.lha - View contents
Readme:http://aminet.net/comm/misc/Camedia.readme
Downloads:863

This is the new version of Camedia.
Camedia is a the name of my digital camera from Olympus.
To be precise, it's name is Camedia C-900 Zoom, in US, the same camera is called
400Z.

What does the program:
----------------------
- copy pictures from the camera to the computer
- copy thumbnails (tiny pictures) from the camera to the computer
- shows some infos about the camera and it's pictures
- shows a preview
- delete pictures


What's new:
-----------

0.43
Changes by TetiSoft:
Fixed source code to be compatible with SAS/C 6.58 and recompiled with it.
Fixed compiler warnings.
Fixed enforcer hits.
Fixed some bugs.
Added serial speed of 230400 Baud (untested).
Added return codes to be usable in shell scripts.
Added version string.
Now also works with Camedia C-860L.

0.42 beta
Should now work with C400L

0.41 beta
I thought thumbails can't get bigger then about 4KB. Well I was wrong. 
I set the buffer now dynamicly, which should be fine for all thumbails.

0.4 beta
Implemented new commands like 
- TAKE_PICTURE, which asks the camera to take a picture, 
- THUMBNAILS, is like RETR (retrieve) but instead of the big_picture, the camera
sends a tiny one
  (my jpeg.datatype was unable to load that tiny jpeg picture, but PhotoAlbum
could do it)
- DEL, which deletes pictures (* be careful about that, You won't get asked if
You are sure! *)

I also changed the code from C++ back to C and here are the reasons why:
The StormC compiler was UNABLE to compile my code. This behavior (this bug) is
known, but
there is no fix for it. This way, in C, everybody can extend my code with StormC
without hoping the
compiler will be nice as it was in C++.
The bad news (just for programmers) is that they must take care of my own
implementaion of try/catch 
which is easy to understand. Also the functionoverloading (dump) was changed
because of C.


0.3 beta
The hardcoded DisplayID is gone. So the PREVIEW mode shows each time a screen
mode requester.
The restriction to true color mode is still there (16Bit, 24Bit works, I guess
15Bit too).

Fixed the unit-bug. Even You set the unit, the 0.2 beta version always used unit
0.

The source code is freely available. I decided to make it public, so everybody
can enjoy it more.
[Take a look at the infos about the source code at the end of this file]

0.2 beta
You don't need any longer 600 KB free memory.
The memory requirements are about 50 KB when retrieving pictures or using the
info function.
When using the preview function, You need about 300 KB, Cybergraphics,
jpeg.library and a 24Bit Graphic-Board.

The old restriction using the serial.device at 57600 Baud is obsolote.
You can set the device, the unit and the speed (9600, 19200, 38400, 57600 or
115200).

You can choose, which picture you like to retrive (from x to y).

You can set the name, the retrieved picture should have.
The camera saves for each picture when it was taken. This is saved (as before)
in the comment.
However, if this date doesn't make real sense, the comment will be set to "No
Date" (that's new).

There is an info function. This shows you many information about your camera,
and the stored pictures.

A preview function, which turns your camera into a (inexpensive ?) video camera.
This way, You can watch yourself at your display :) 
To use this feature, you need:
- about 300 KB memory for the program (plus some more for the 24 Bit screen)
- jpeg.library, which can be found at Aminet
- Cybergraphics
- a graphic card, which has the DisplayID  0x40120051 (24Bit, 640x480,
Cybervision?)
P.S. (BestCModeIDTags() seems not work for me...that's why DisplayID is
hardcoded) 

You are able to retrieve uncompressed pictures. The old version crashes when you
try to get 
uncompressed pictures! the uncompressed pictures will be saved in tiff, but it's
filename ends with
.jpeg - next version will be better :)


Requirements: 
-------------
OS 3.0 or higher (should work with OS 2.1 as well)
normaly about 50 KB free memory
a Camedia digital camera from Olympus


for the preview function, you need:
-----------------------------------
about 300 KB memory for the program (plus some more for the true color screen)
jpeg.library, which can be found at Aminet
Cybergraphics
a graphic card



How to use this software:
------------------------
- Connect the camera to the serial port and turn the camera on.

- Open a shell where you have access to the program Camedia.


INFO:
=====
- type "Camedia INFO" to get infos about your camera


RETR:
=====
- type "Camedia RETR" to get all pictures, which will be stored localy.
  The pictures will have the name "picture_1.jpeg", "picture_2.jpeg" and so on.
  
- type "Camedia RETR from 3" to get the pictures 3, 4, and so on 

- type "Camedia RETR from 3 to 5" to get the pictures 3, 4 and 5

- type "Camedia RETR from 3 to 3" to get only the picture 3.

- type "Camedia RETR to 3" to get the picture 1, 2 and 3.

THUMBAILS:
==========
This behaves exactly like RETR except that it get thumbnails instead of the big
pictures.

- type "Camedia THUMBAILS" to get all thumbnails (tiny pictiures), which will be
stored localy.
  The thumbails will have the name "picture_1.jpeg", "picture_2.jpeg" and so on.

DEL:
====
This behaves exactly like RETR except that it will delete instead of getting the
big pictures.
WARNING: The software won't ask you if you realy like to delete the picture in
the camera, so be careful.


Options for RETR or THUMBNAILS:
-------------------------------
- type "Camedia RETR Name my_name" to get all picture, which will get the name 
  "my_name_1.jpeg", "my_name_2.jpeg" and so on.


Note:
----
If You have an uncompressed picture, then it will be saved in the format tiff.
However, the filename ends with .jpeg. Next release will be better :)

Make sure you have enough disk space for the pictures. The disk should be
reasonable fast
(so if You wanna use floppy, ok, but then make sure, no other program access the
floppy).

PREVIEW:
========
- type "Camedia PREVIEW" to use your camera as a video camera.
  You can resize the window. To quit, close the window.


Important options:
==================
In all the modes (INFO, THUMBNAILS, RETR, DEL and PREVIEW), you can set device,
the devie unit and the speed.

- type "Camedia DEVICE my_serial.device UNIT 0 SPEED 115200 RETR" to get all
pictures.


Notes:
-----
The program will NOT delete the pictures in the camera when You just retrieve
the pictures.
However, in the mode DEL (delete), the program DOES delete the pictures in the
camera.
If You like to stop the program, do a CTRL-C or CTRL-F.


Problems:
--------
If there is a problem, You will get some hints, but they are mainly useful for
me, maybe not so much for You.
Reading from the camera fails sometimes when
- You type some text during the program tries to make some output on the console
*
- You press the right mouse button very long
- Your computer is very busy
- the batteries of Your camera are too low **

* when You type some text in the console, the program might can't go on.
  Cause the camera will disconnect after a while (maybe five seconds), when not
  retrieving any data from the computer, You shouldn't type in the console the
  program is running.

** Well, right now, that's Your task. In future, I might will warn You
"batteries
   are low", cause I can read the capacity of the batteries with a command.
   
--------------------------------------------------------------------------------
---------------
   Important: If you have any problem (like timeout), make sure to put fully
charged batteries
              in your camera. If you still have problem, e-mail me.
--------------------------------------------------------------------------------
---------------


Must it be a Camedia digital camera from Olympus?
------------------------------------------------
The protocol to communicate with digital cameras seems to be very much the same
for many cameras like Fuji, Epson, Sanjo, Agfa and Olympus.
The problem is the protocol is NOT official available, but there is some good
information at:
http://www.average.org/digicam/

So probably, this program works also with other digital cameras. Please tell me
Your
experiences.


Is the program dangerous for my camera?
--------------------------------------
Of course I don't guarantee anything, except that it worked for me five minutes
ago.
I played a lot with my camera, and sometimes I got strange behaviors. Till
today, I
was unable to destroy or damage my camera by sending commands to it.
To make a conclusion out of my experiences is up to Your risk.


Infos about the source code
---------------------------

The source code is split up in two parts.
Camedia.c has many nice functions, it does the communication and some more.
camprg.c is an example how to use the functions in Camedia.c

Camedia.h is pretty important, cause all constants, definitions and prototypes
are set there.

Please study http://www.average.org/digicam/ 
There you can find many infos about how the protocol looks like. You don't neet
this infos,
but of course it helps a lot. To get an overview of the available register, it's
helpful.

There are two ways to use Camedia.c's function. 
The easy way is to use the Set_XXX(...) and Get_XXX(...) functions.
These functions are wrappers to make your life easier (I hope so :)
The other way to use Camedia.c's function is more direct.
For that, You have only these four functions:

void SetIntegerRegister(enum Command_0, L4, error_msg);
void ReadIntegerRegister(enum Command_1, L4 *, error_msg);
void TakeAction(enum Action_Code action, L1 arg, error_msg);
void ReadVDataRegister(enum Command_4, L1 *, L4 *, error_msg);

There should be a fifth function, but I did't implement this one:
(NOT implemented yet: void SetVDataRegister(enum Command_3, L1 *, L4);  )

the error_msg is of type char*. It's used instead of try and catch. Whenever a
error occured in the
function, it will return AND it will have an explaining message in error_msg,
which You can and maybe
should printf("%s\n", error_msg);

The code itself should be clear.
The 'not so nice' part of Camedia.h is the macro definition (header files
shouldn't contain code...)


Contents of comm/misc/Camedia.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  268     628  42.7% -lh5- 1dca Jun  7  2001 Camedia.info
[generic]                14894   27456  54.2% -lh5- cecc Jun  7  2001 Camedia/Camedia
[generic]                 7811   37512  20.8% -lh5- 33ef Jun  7  2001 Camedia/Camedia.c
[generic]                 3129   12399  25.2% -lh5- 3cf7 Jun  7  2001 Camedia/Camedia.h
[generic]                 4155   10395  40.0% -lh5- 7bee Jun  7  2001 Camedia/Camedia.readme
[generic]                  495    1344  36.8% -lh5- f2ab Jun 26  1999 Camedia/Camedia.¶
[generic]                 5981   21809  27.4% -lh5- 38e3 Jun  7  2001 Camedia/camprg.c
[generic]                 1339    4301  31.1% -lh5- cd21 Jun  7  2001 Camedia/camprg.h
[generic]                  363     626  58.0% -lh5- 3651 Jun  7  2001 Camedia/smakefile
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         9 files   38435  116470  33.0%            Jun  9  2001

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>