One: Introduction
In the previous article, the opencv and zbar libraries were cross-compiled.
https://blog.csdn.net/qq_34968572/article/details/112978917
This section is the application layer program development for the compiled library in the previous section, and the library files compiled in the previous section are needed.
Two: source code
/**
* 解析二维码wifi信息,并连接
*/
int Service::WifiConnectManager(int width, int height)
{
int result = HET_SUCCESS;
char fileName[40] = {0};
int frame_cnt = 0;
unsigned char buffer[width * height * 3];
char pBuff[100];
unsigned int buffSize = 0;
int len = Sensor_Height * Sensor_Height * 3/2;
unsigned char yuvBuffer[len];
unsigned char yuvCompBuffer[width * height *3/2];
/* 获取摄像头yuv数据 */
result = mppService.getSersonYuvData(yuvBuffer, len, 1);
if (result != SUCCESS)
{
printf("lamp get yuv face data failed!\n");
return FAILED;
}
/* yuv缩放 */
HETCompress compress;