-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprocess_frame.c
38 lines (32 loc) · 1.24 KB
/
process_frame.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty. This file is offered as-is,
* without any warranty.
*/
/*! @file process_frame.c
* @brief Contains the actual algorithm and calculations.
*/
/* Definitions specific to this application. Also includes the Oscar main header file. */
#include "template.h"
void ProcessFrame(uint8 *pRawImg)
{
OSC_ERR err;
enum EnBayerOrder enBayerOrder;
err = OscCamGetBayerOrder(&enBayerOrder, 0, 0);
if (err != SUCCESS)
{
OscLog(ERROR, "%s: Error getting bayer order! (%d)\n", __func__, err);
return;
}
/* Use a framework function to debayer the image. */
err = OscVisDebayer(pRawImg, OSC_CAM_MAX_IMAGE_WIDTH, OSC_CAM_MAX_IMAGE_HEIGHT, enBayerOrder, data.u8ResultImage);
if (err != SUCCESS)
{
OscLog(ERROR, "%s: Error debayering image! (%d)\n", __func__, err);
return;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* | */
/* | Add your code here */
/* | */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
}