Dalsa Piranha4 User Manual page 87

8k color cameras
Hide thumbs Also See for Piranha4:
Table of Contents

Advertisement

Piranha4 8k Color Camera User's Manual
A simple workaround accomplishes this:
1) Acquire as if the P4 camera was a 8-bit mono, 24,576 (4096 x 3) pixels linescan
camera
2) Treat acquired buffer as SapFormatRGBR888 (24bit/pixel). Sapera LT provides a
feature to share buffer components between two SapBuffer objects. Buffer type may
be different between the two SapBuffer objects. This can be a trick to convert buffer
format without buffer copy.
Acquiring the above data as you would an 8-bit mono camera in 8-tap mode creates the
acquisition buffer shown below.
Adr+0
Adr+1
Adr+2
Red1
Green1
Blue1
On the other hand, the SapFormatRGBR888 format is shown below.
Pixe1 (3byte)
Red1
Green1
Blue1
As you demonstrated above, the two buffers' content and their order are exactly same.
Thus, acquiring the buffer as if the camera were a mono 8-bit, 8-tap results in the same
buffer contents as the SapFormatRGBR888.
Sample code:
//Assuming acquisition buffer is declared as below.
#define NUMBUFFERS
SapBuffer *m_Buffers;
m_Buffers = new SapBufferWithTrash(NUMBUFFERS, m_Acq);
// Call Create() for acquisition buffer
m_Buffers->Create();
// Declare SapBuffer object which shares buffer components with the acquisition buffer
SapBuffer *m_ViewBuffers;
int width, height, i;
void* pData[NUMBUFFERS];
for (i=0; i<NUMBUFFERS; i++)
{
m_Buffers->GetAddress(i, &pData[i]);
}
width = m_Buffers->GetWidth();
height = m_Buffers->GetHeight();
m_ViewBuffers = new SapBuffer(NUMBUFFERS, pData, width / 3,
height,SapFormatRGB888);
m_ViewBuffers->Create();
If you declare above m_ViewBuffer as the source buffer of SapView object, you can display
RGB image without any additional processing.
Teledyne DALSA
Adr+3
Adr+4
Adr+5
Red2
Green2
Blue2
First CLK
Pixel2
Red2
Green2
Blue2
8
Adr+6
Adr+7
Adr+8
Red3
Green3
Blue3
Pixel3
Red3
Green3
Blue3
87
Adr+9
Adr+10
Adr+11
Red4
Green4
Blue4
Second CLK
Pixel4
Red4
Green4
Blue4
03-032-20274-00

Advertisement

Table of Contents
loading

This manual is also suitable for:

P4-cc-08k03t-01-r

Table of Contents