Kathy Loynes (kathyl++at++wormald.COM.AU)
Tue, 9 May 1995 17:49:49 +1000 (EST)
In the application that I am working on I have a requirement to focus &
defocus the generated image. This is effectively emulating the behaviour
of focusing a camera.
I had come up with two possible approaches to doing this :
(1) Perform some sort of image processing to blur or sharpen the image in
the framebuffer in my post-draw callback. I was looking at some of the
image enhancement sample code in the /src/haeberli/ directory on the
Developers Toolkit CD and believe that some nice effects could be
achieved. However, not surprisingly, this doesn't look like it's
possible at a 30 Hz framerate. Simply calling lrectread() &
lrectwrite() (without attempting any fiddling with pixel values)
results in the frame rate in my application dropping from 36Hz down to
approx 24Hz.
Does anyone think it is worth pursuing this approach ? Is it possible
to significantly speed up lrectread() & lrectwrite() ? I only need to
work with a monochrome image at a resolution of 640x480. I was
surprised that, at that resolution and running on an 2RM RE2, the effect
was as noticeable as it was. Is there something obvious I'm missing ?
I did try using rectcopy() with the same source and destination pixels
(as I believe there are various image processing effects that can be
done by the GEs during a rectcopy call). This was quick, no noticeable
frame rate hit, but I'm not too clear on what could be achieved via
this method. I had a look at the convolve() manpage but that didn't
seem to clarify much......
Should I be investigating the ImageVision library ? I've never used it
before and so am a little hazy on what sort of effects could be achieved.
(2) Another approach was to use the accumulation buffer to blur the
image as required. I believe this is possible in realtime (I haven't
actually tried this out yet) and is good for motion blur but may not be
exactly the focusing effect I'm looking for.
Many thanks in advance for any suggestions.
----------------------------------------------------------------------
Kathy Loynes | Wormald Technology
kathyl++at++wormald.com.au | Advanced Systems Engineering
Ph: +61 2 981 0611 | Sydney, Australia
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:29 PDT