Difference between revisions of "Pattern Recognition"

From ElphelWiki
Jump to: navigation, search
Line 1: Line 1:
The project will develop a fpga based pattern recognition system using the Elphel 353 camera. I have created this page in order to document what we I am doing and also to receive some feedback from the elphel community.
+
= Pattern Recognition =
 +
 
 +
The project will develop a fpga based pattern recognition system using the Elphel 353 camera. I have created this page in order to document what I am doing and also to receive some feedback from the elphel community.
  
 
I am only at the primary stages. I am working on two issues:
 
I am only at the primary stages. I am working on two issues:
Line 6: Line 8:
 
  * Understanging the fpga code structure in order to remove the jpeg compressor, which we will not use in our recognition algorithm
 
  * Understanging the fpga code structure in order to remove the jpeg compressor, which we will not use in our recognition algorithm
  
Actually I can use and modify the processor's drivers. Now I'm developing a program that uses the /dev/fsdram knode to read the raw image from the DDR and create an equivalent RGB file. After some problems now I create a rgb file and convert it to a visible format such as png or bmp, but the image is wrong and I cannot understand why.
+
Actually I can use and modify the processor's drivers. Now I'm developing a program that uses the /dev/fsdram node to read the raw image from the DDR and create an equivalent RGB file. After some problems now I create a rgb file and convert it to a visible format such as png or bmp, but the image is wrong and I cannot understand why.
  
 
I understand the raw image is stored at the first positions of the DDR memory occupying byte 0 until the byte (width+4)*(height+4)-1. Is this correct? Anybody has a memory map of the DDR? Some information about how the memory is occupied by the data(raw image, gamma data, corrections, jpeg)?
 
I understand the raw image is stored at the first positions of the DDR memory occupying byte 0 until the byte (width+4)*(height+4)-1. Is this correct? Anybody has a memory map of the DDR? Some information about how the memory is occupied by the data(raw image, gamma data, corrections, jpeg)?

Revision as of 10:32, 29 February 2008

Pattern Recognition

The project will develop a fpga based pattern recognition system using the Elphel 353 camera. I have created this page in order to document what I am doing and also to receive some feedback from the elphel community.

I am only at the primary stages. I am working on two issues:

* Understanding the processor structure (basically drivers and associated nodes)
* Understanging the fpga code structure in order to remove the jpeg compressor, which we will not use in our recognition algorithm

Actually I can use and modify the processor's drivers. Now I'm developing a program that uses the /dev/fsdram node to read the raw image from the DDR and create an equivalent RGB file. After some problems now I create a rgb file and convert it to a visible format such as png or bmp, but the image is wrong and I cannot understand why.

I understand the raw image is stored at the first positions of the DDR memory occupying byte 0 until the byte (width+4)*(height+4)-1. Is this correct? Anybody has a memory map of the DDR? Some information about how the memory is occupied by the data(raw image, gamma data, corrections, jpeg)?

At maximum resolution (2592*1936) I have to read (2592+4)*(1936+4)=5036240 bytes from memory. I assume that the stored data starts like this:


GreenRedGreenRedGreenRed (2596 bytes)

BlueGreenBlueGreenBlueGreen (2596 bytes)

. . .


If I take this data and make some conversion I get a wrong image of what the camera is seeing. I know my conversion algorithm works correctly.

Has anybody work on something like this?

The image.raw application available on the camera is just a symbolic link to /dev/ccam_img that uses the cmoscam353 driver. I'm following this driver to understand the way that is read from the DDR. Can anybody tell me how the raw image data is generated?

What is the proper way to change the camera resolution?

Thanks in advance for any help,

Diego Mendez