Dalsa Piranha4 Series Manual page 130

Color 2k and 4k trilinear and quadlinear cmos
Hide thumbs Also See for Piranha4 Series:
Table of Contents

Advertisement

130
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 8
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.
03-032-20180-06
Adr+3
Adr+4
Adr+5
Red2
Green2
Blue2
First CLK
Pixel2
Red2
Green2
Blue2
Piranha4 2K and 4K Camera Color User's Manual
Adr+6
Adr+7
Adr+8
Red3
Green3
Blue3
Pixel3
Red3
Green3
Blue3
Adr+9
Adr+10
Adr+11
Red4
Green4
Blue4
Second CLK
Pixel4
Red4
Green4
Blue4
Teledyne DALSA

Advertisement

Table of Contents
loading

Table of Contents