Squeak controlling a digital camera

ohshima at is.titech.ac.jp ohshima at is.titech.ac.jp
Fri May 21 14:33:36 UTC 1999


   Hi,

   I wrote several primitives for ICRUISE PDA to manipulate a
digital camera which comes with it.  Now, Squeak has a
capability to control an 850k pixel digital camera!

   Attached is a picture I took by the camera.  You'll find
nested recursive rectangles in the picture.  In fact, the
picture is the screen of Squeak which is going to take
itself on a mirror:-) (The picture is out of focus because
the auto focus function doesn't seem work for the image on a
mirror.)

   The following is the expression I evaluated to take the picture:
--------------------
f _ Form extent: 320 at 240 depth: 16.
       "a form where the result will be stored"
camera _ DigitalCamera startCameraOn: 1 size: 320 at 240 zoom: 1.0 depth: 16.
       "create a camera object"
camera takePictureInto: f buffering: true buffer: (200 at 200 extent: 320 at 240).
       "this primitive call doesn't return until the shutter button is pressed"
camera release.
       "release the hardware resource"
--------------------

   It is also possible to get the image on the CCD one after
another.  So I can make a short slow-motion movie by
evaluating the following:

--------------------
fs _ (1 to: 20) collect: [:i | Form extent: 160 at 120 depth: 16].
camera _ DigitalCamera startCameraOn: 1 size: 160 at 120 zoom: 1.0 depth: 16.
1 to: 20 do: [:i | camera PeekOn: (fs at: i)].
camera release.
1 to: 20 do: [:i | (fs at: i) display. (Delay forMilliseconds: 100) wait].
--------------------

   It's fun!

   Apart from the camera stuff, with a hardware that has
120MHz SH-3, 8MB DRAM, and 640*480*16 LCD, I found I feel it
practical to use Squeak on ICRUISE.

                                              OHSHIMA Yoshiki
                 Dept. of Mathematical and Computing Sciences
                                Tokyo Institute of Technology

P.S.
   I couldn't figure out how to save a 16 bit depth Form in
convenient way.  Would anyone teach me?

P.P.S.
   An email I sent a few days ago seems lost.  I'm sorry if
you get another copy of this email.
-------------- next part --------------
Skipped content of type multipart/appledouble


More information about the Squeak-dev mailing list