[Elphel-support] Scanline sequence in compressor

Andrey Filippov andrey at elphel.com
Fri Feb 18 11:52:13 PST 2011


Alex,

The memory controller has the buffer size 4 times larger that the page it
reads/writes in an atomic operation. So the rest of the FPGA either fills in
one page of the buffer and then requests it to be written (at the same time
the window of the buffer visibility advances to the next page) or request
page(s) to be read. The memory controller takes care of the optional
synchronization between writing sensor data and reading it in tiles format
(that synchronization is only turned off when the data from the sensor is
stopped). Controller also supports special modes, like linescan - in that
case tile overlap extends to the next frame to make the sequence of images
continuous.

I would recommend not to modify the memory controller itself, but connect to
it instead of the compressor. Even better - connect ion parallel to the
compressor, so compressor will take care of all the synchronization signals.
If you select color JPEg mode, the compressor will read 18x18 tiles
(disregarding the outer 1-pixel border) - it is what you need for the 3x3
kernel.

You may also find useful to experiment with the "focus helper" - it is based
on the DCT coefficients from the compressor. The FPGA table accepts 15
fast-switchable filter 64-word tables (calculated in that demo PHP script),
the table elements are multiplied by the squares of the DCT coefficients and
the sum of the products is a measure of focus in the current 8x8 pixel
block. These values can be used in two ways - show them as image
("destructively" mixing or replacing with the original image) or just
calculate the sum of those values over the selected WOI. That sum is used as
a measure of the "sharpness", the display mode can be used to adjust the
filter parameters. This image can also help to detect edges (though with
reduced resolution), the set of demo filters include omnidirectional,
vertical and horizontal ones (with different frequency bands). Maybe this
data can help in your project, if not instead - in addition to the other
edge detection methods.

Andrey


On Thu, Feb 17, 2011 at 7:24 PM, Alex Gomez <alexgomez623 at gmail.com> wrote:

> Hi Andrey,
>
> I have one more question. I am modifying channel 2, but I can't figure out
> the behavior of the signals stch2, ench2, ch2rdy and readNextFrame2. Do you
> have any documentation specifying the behavior of these signals when reading
> from memory? Even a simple state machine diagram, or a sketch that was used
> when developing the controller would be very helpful. Thanks again for your
> help!
>
> -Alex
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20110218/fd8cbeeb/attachment-0002.html>


More information about the Support-list mailing list