triclopsbuffer.h
Go to the documentation of this file.
1 /**************************************************************************************************
2  Software License Agreement (BSD License)
3 
4  Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
5  All rights reserved.
6 
7  Redistribution and use in source and binary forms, with or without modification, are permitted
8  provided that the following conditions are met:
9 
10  *Redistributions of source code must retain the above copyright notice, this list of
11  conditions and the following disclaimer.
12  *Redistributions in binary form must reproduce the above copyright notice, this list of
13  conditions and the following disclaimer in the documentation and/or other materials provided
14  with the distribution.
15  *Neither the name of the University of Aveiro nor the names of its contributors may be used to
16  endorse or promote products derived from this software without specific prior written permission.
17 
18  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
19  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 ***************************************************************************************************/
32 //=============================================================================
33 // Copyright © 2004 Point Grey Research, Inc. All Rights Reserved.
34 //
35 // This software is the confidential and proprietary information of Point
36 // Grey Research, Inc. ("Confidential Information"). You shall not
37 // disclose such Confidential Information and shall use it only in
38 // accordance with the terms of the license agreement you entered into
39 // with Point Grey Research, Inc. (PGR).
40 //
41 // PGR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
42 // SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
43 // IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
44 // PURPOSE, OR NON-INFRINGEMENT. PGR SHALL NOT BE LIABLE FOR ANY DAMAGES
45 // SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
46 // THIS SOFTWARE OR ITS DERIVATIVES.
47 //
48 //=============================================================================
49 //=============================================================================
50 // $Id: triclopsbuffer.h,v 2.3 2007/11/30 00:43:03 soowei Exp $
51 //=============================================================================
52 #ifndef TRICLOPSBUFFER_H
53 #define TRICLOPSBUFFER_H
54 
55 //=============================================================================
56 //
57 // This file defines the the API for Buffer management calls in the
58 // Triclops Stereo Vision SDK.
59 //
60 //=============================================================================
61 
62 
63 //=============================================================================
64 // Defines
65 //=============================================================================
66 
67 //=============================================================================
68 // System Includes
69 //=============================================================================
70 
71 #include <triclops.h>
72 
73 #ifdef __cplusplus
74 extern "C"
75 {
76 #endif
77 
78 //=============================================================================
79 // Macros
80 //=============================================================================
81 
82 //=============================================================================
83 // Enumerations
84 //=============================================================================
85 
86 //=============================================================================
87 // Types
88 //=============================================================================
89 
90 //=============================================================================
91 // Function Prototypes
92 //=============================================================================
93 
94 //=============================================================================
95 // Image Buffer Operations
96 //=============================================================================
97 //
98 // Group = Image Buffer Operations
99 
100 //
101 // Name: triclopsSetImageBuffer
102 //
103 // Synopsis:
104 // Sets the internal image buffer for the specified camera and image type
105 // to be the buffer supplied by the user.
106 //
107 // Input:
108 // context - The context.
109 // buffer - A user allocated buffer of sufficient size.
110 // imageType - The image type.
111 // camera - The camera.
112 //
113 // Returns:
114 // TriclopsErrorOk - The operation succeeded.
115 // InvalidContext - The input context was invalid.
116 // InvalidCamera - The input camera is invalid for this camera configuration,
117 // or is not associated with the requested image type.
118 // InvalidRequest - The image is not set to be generated by the stereo kernel.
119 //
120 // Description:
121 // This function allows the user to specify directly what memory he/she
122 // wishes the output images to be deposited into. This memory will be used
123 // by the stereo kernel as working space. This has the advantage of saving
124 // a copy for tasks such as displaying to the screen. The user may simply
125 // set the output image buffer to his/her display buffer. However, since
126 // this memory will be used by the stereo kernel as working space, the
127 // contents of the buffer may change with each call of triclopsPreprocess()
128 // or triclopsStereo(). If the results are to be saved, it is the user's
129 // responsibility to do so. In addition, the user is responsible to allocate
130 // sufficient memory for the buffer, and to de-allocate the buffer after
131 // it is no longer needed. Before de-allocating the buffer, the user should
132 // call triclopsUnsetImageBuffer(). If the user requests an invalid image,
133 // such as the disparity image, when the context stereo flag is set to false,
134 // or the edge image when edge correlation is set to false, an error of
135 // invalid request will be returned. Disparity images are always associated
136 // with the reference camera.
137 //
138 // See Also:
139 // triclopsGetImage(), triclopsUnsetImageBuffer()
140 //
143  unsigned char* buffer,
144  TriclopsImageType imageType,
145  TriclopsCamera camera );
146 
147 //
148 // Name: triclopsUnsetImageBuffer
149 //
150 // Synopsis:
151 // This releases the user specified internal image buffer for the specified
152 // camera and image type. The next time this buffer is required by the
153 // system, it will allocate a new one for internal use.
154 //
155 // Input:
156 // context - The context.
157 // imageType - The image type.
158 // camera - The camera.
159 //
160 // Returns:
161 // TriclopsErrorOk - The operation succeeded.
162 // InvalidContext - The input context was invalid.
163 // InvalidCamera - The input camera is invalid for this camera configuration,
164 // or is not associated with the requested image type.
165 //
166 // Description:
167 // If the user has already called triclopsSetImageBuffer for a particular
168 // camera and image type, the stereo kernel will be using that buffer for
169 // internal processing. If the user no longer wants to have the supplied
170 // buffer used by the stereo kernel, he/she may use this function to inform
171 // the stereo kernel that it is no longer available. A new buffer will be
172 // created the next time it is required by the stereo kernel.
173 //
174 // See Also:
175 // TriclopsGetImage(), triclopsSetImageBuffer()
176 //
179  TriclopsImageType imageType,
180  TriclopsCamera camera );
181 
182 
183 //
184 // Name: triclopsSetImage16Buffer
185 //
186 // Description:
187 // This function allows the user to set the location to which 16bit
188 // (generally subpixel) depth images are written to once they are processed.
189 //
190 // Input:
191 // context - The TriclopsContext to set the buffer in.
192 // buffer - A pointer to the buffer.
193 // imageType - The type of image to be written to the buffer.
194 // camera - The camera to write from.
195 //
196 // Returns:
197 // TriclopsErrorOk - Upon the successful completion of the operation.
198 //
201  unsigned short* buffer,
202  TriclopsImage16Type imageType,
203  TriclopsCamera camera );
204 
205 //
206 // Name: triclopsUnsetImage16Buffer
207 //
208 // Synopsis:
209 // This releases the user specified internal image buffer for the specified
210 // camera and image type. The next time this buffer is required by the
211 // system, it will allocate a new one for internal use.
212 //
213 // Input:
214 // context - The context.
215 // imageType - The image type.
216 // camera - The camera.
217 //
218 // Returns:
219 // TriclopsErrorOk - The operation succeeded.
220 // InvalidContext - The input context was invalid.
221 // InvalidCamera - The input camera is invalid for this camera configuration,
222 // or is not associated with the requested image type.
223 //
224 // Description:
225 // If the user has already called triclopsSetImage16Buffer for a particular
226 // camera and image type, the stereo kernel will be using that buffer for
227 // internal processing. If the user no longer wants to have the supplied
228 // buffer used by the stereo kernel, he/she may use this function to inform
229 // the stereo kernel that it is no longer available. A new buffer will be
230 // created the next time it is required by the stereo kernel.
231 //
232 // See Also:
233 // triclopsGetImage(), triclopsSetImage16Buffer()
234 //
237  TriclopsImage16Type imageType,
238  TriclopsCamera camera );
239 
240 //
241 // Name: triclopsSetColorImageBuffer
242 //
243 // Synopsis:
244 // Allows the user to set separate buffers to which individual bands of the
245 // processed color image are written to. In this case, the "processed" image
246 // means the rectified image that is rectified when triclopsRectifyColorImage()
247 // is called.
248 //
249 // Input:
250 // context - The TriclopsContext to set the buffer for.
251 // nCamera - The camera buffer to set.
252 // red - A pointer to the red buffer.
253 // green - A pointer to the green buffer.
254 // blue - A pointer to the blue buffer.
255 //
256 // Returns:
257 // TriclopsErrorOk - Upon the successful completion of the operation.
258 //
259 // See Also:
260 // triclopsRectifyColorImage()
261 //
264  TriclopsCamera nCamera,
265  unsigned char* red,
266  unsigned char* green,
267  unsigned char* blue );
268 
269 //
270 // Name: triclopsUnsetColorImageBuffer
271 //
272 // Synopsis:
273 // This releases the user specified internal color image buffer for the
274 // specified camera. The next time this buffer is required by the
275 // system, it will allocate a new one for internal use.
276 //
277 // Input:
278 // context - The context.
279 // camera - The camera.
280 //
281 // Returns:
282 // TriclopsErrorOk - The operation succeeded.
283 // InvalidContext - The input context was invalid.
284 // InvalidCamera - The input camera is invalid for this camera configuration,
285 // or is not associated with the requested image type.
286 //
287 // Description:
288 // If the user has already called triclopsSetColorImageBuffer for a particular
289 // camera, the stereo kernel will be using that buffer when rectifying a
290 // color image. If the user no longer wants to have the supplied
291 // buffer used by the stereo kernel, he/she may use this function to inform
292 // the stereo kernel that it is no longer available. A new buffer will be
293 // created the next time it is required by the stereo kernel.
294 //
295 // See Also:
296 // triclopsRectifyColorImage(), triclopsSetColorImageBuffer()
297 //
300  TriclopsCamera camera );
301 
302 //
303 // Name: triclopsSetPackedColorImageBuffer
304 //
305 // Synopsis:
306 // Allows the user to set the buffer to which the processed color image
307 // is written to.
308 //
309 // Input:
310 // context - The TriclopsContext to set the buffer for.
311 // nCamera - The camera buffer to set.
312 // buffer - A pointer to a buffer of TriclopsPackedColorPixels.
313 //
314 // Returns:
315 // TriclopsErrorOk - Upon the successful completion of the operation.
316 //
319  TriclopsCamera nCamera,
320  TriclopsPackedColorPixel* buffer );
321 
322 //
323 // Name: triclopsUnsetPackedColorImageBuffer
324 //
325 // Synopsis:
326 // This releases the user specified internal color image buffer for the
327 // specified camera. The next time this buffer is required by the
328 // system, it will allocate a new one for internal use.
329 //
330 // Input:
331 // context - The context.
332 // camera - The camera.
333 //
334 // Returns:
335 // TriclopsErrorOk - The operation succeeded.
336 // InvalidContext - The input context was invalid.
337 // InvalidCamera - The input camera is invalid for this camera configuration,
338 // or is not associated with the requested image type.
339 //
340 // Description:
341 // If the user has already called triclopsSetPackedColorImageBuffer for a
342 // particular camera, the stereo kernel will be using that buffer when rectifying a
343 // color image. If the user no longer wants to have the supplied
344 // buffer used by the stereo kernel, he/she may use this function to inform
345 // the stereo kernel that it is no longer available. A new buffer will be
346 // created the next time it is required by the stereo kernel.
347 //
348 // See Also:
349 // triclopsSetPackedColorImageBuffer(), triclopsRectifyPackedColorImage()
350 //
353  TriclopsCamera camera );
354 
355 #ifdef __cplusplus
356 }
357 #endif
358 
359 #endif // #ifndef TRICLOPSBUFFER_H
TriclopsImage16Type
Definition: triclops.h:184
TriclopsError triclopsUnsetImage16Buffer(TriclopsContext context, TriclopsImage16Type imageType, TriclopsCamera camera)
TriclopsCamera
Definition: triclops.h:205
TriclopsError triclopsSetPackedColorImageBuffer(TriclopsContext context, TriclopsCamera nCamera, TriclopsPackedColorPixel *buffer)
TriclopsError triclopsSetColorImageBuffer(TriclopsContext context, TriclopsCamera nCamera, unsigned char *red, unsigned char *green, unsigned char *blue)
TriclopsError triclopsSetImageBuffer(TriclopsContext context, unsigned char *buffer, TriclopsImageType imageType, TriclopsCamera camera)
TriclopsImageType
Definition: triclops.h:157
TriclopsError triclopsUnsetImageBuffer(TriclopsContext context, TriclopsImageType imageType, TriclopsCamera camera)
TriclopsError triclopsUnsetColorImageBuffer(TriclopsContext context, TriclopsCamera camera)
TriclopsError triclopsSetImage16Buffer(TriclopsContext context, unsigned short *buffer, TriclopsImage16Type imageType, TriclopsCamera camera)
This is from point grey. Check the manual for instructions.
void * TriclopsContext
Definition: triclops.h:272
TriclopsError triclopsUnsetPackedColorImageBuffer(TriclopsContext context, TriclopsCamera camera)
TriclopsError
Definition: triclops.h:99


xb3
Author(s): Miguel Oliveira, Tiago Talhada
autogenerated on Mon Mar 2 2015 01:33:02