...
|
...
|
@@ -260,10 +260,10 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
|
|
//修复上边
|
|
|
for (x = 2; x <= dealInfo->Width - 2; x++)
|
|
|
{
|
|
|
int SourceIndex = Get_2DImage_PointToArray(x, 3, dealInfo->Width, dealInfo->Height);
|
|
|
int SourceIndex = Get_2DImage_PointToArray(x, 3, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
|
|
|
int FirstIndex = Get_2DImage_PointToArray(x, 0, dealInfo->Width, dealInfo->Height);
|
|
|
int SecondIndex = Get_2DImage_PointToArray(x, 1, dealInfo->Width, dealInfo->Height);
|
|
|
int FirstIndex = Get_2DImage_PointToArray(x, 0, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
int SecondIndex = Get_2DImage_PointToArray(x, 1, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
|
|
|
rgb_data[FirstIndex] = rgb_data[SourceIndex];
|
|
|
rgb_data[FirstIndex + 1] = rgb_data[SourceIndex + 1];
|
...
|
...
|
@@ -277,10 +277,10 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
|
|
//修复下边
|
|
|
for (x = 2; x <= dealInfo->Width - 2; x++)
|
|
|
{
|
|
|
int SourceIndex = Get_2DImage_PointToArray(x, dealInfo->Height - 3, dealInfo->Width, dealInfo->Height);
|
|
|
int SourceIndex = Get_2DImage_PointToArray(x, dealInfo->Height - 3, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
|
|
|
int FirstIndex = Get_2DImage_PointToArray(x, dealInfo->Height - 1, dealInfo->Width, dealInfo->Height);
|
|
|
int SecondIndex = Get_2DImage_PointToArray(x, dealInfo->Height - 2, dealInfo->Width, dealInfo->Height);
|
|
|
int FirstIndex = Get_2DImage_PointToArray(x, dealInfo->Height - 1, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
int SecondIndex = Get_2DImage_PointToArray(x, dealInfo->Height - 2, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
|
|
|
rgb_data[FirstIndex] = rgb_data[SourceIndex];
|
|
|
rgb_data[FirstIndex + 1] = rgb_data[SourceIndex + 1];
|
...
|
...
|
@@ -292,12 +292,13 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
|
|
}
|
|
|
|
|
|
//修复左边
|
|
|
for (int y = 0; y <= dealInfo->Height; y++)
|
|
|
for (int y = 0; y < dealInfo->Height; y++)
|
|
|
{
|
|
|
int SourceIndex = Get_2DImage_PointToArray(2, y, dealInfo->Width, dealInfo->Height);
|
|
|
int SourceIndex = Get_2DImage_PointToArray(3, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
|
|
|
int FirstIndex = Get_2DImage_PointToArray(0, y, dealInfo->Width, dealInfo->Height);
|
|
|
int SecondIndex = Get_2DImage_PointToArray(1, y, dealInfo->Width, dealInfo->Height);
|
|
|
int FirstIndex = Get_2DImage_PointToArray(0, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
int SecondIndex = Get_2DImage_PointToArray(1, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
int ThirdIndex = Get_2DImage_PointToArray(2, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
|
|
|
rgb_data[FirstIndex] = rgb_data[SourceIndex];
|
|
|
rgb_data[FirstIndex + 1] = rgb_data[SourceIndex + 1];
|
...
|
...
|
@@ -306,14 +307,24 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
|
|
rgb_data[SecondIndex] = rgb_data[SourceIndex];
|
|
|
rgb_data[SecondIndex + 1] = rgb_data[SourceIndex + 1];
|
|
|
rgb_data[SecondIndex + 2] = rgb_data[SourceIndex + 2];
|
|
|
|
|
|
rgb_data[ThirdIndex] = rgb_data[SourceIndex];
|
|
|
rgb_data[ThirdIndex + 1] = rgb_data[SourceIndex + 1];
|
|
|
rgb_data[ThirdIndex + 2] = rgb_data[SourceIndex + 2];
|
|
|
}
|
|
|
|
|
|
//修复右边
|
|
|
for (int y = 0; y <= dealInfo->Height; y++)
|
|
|
// 修复右边
|
|
|
for (int y = 0; y < dealInfo->Height; y++)
|
|
|
{
|
|
|
int SourceIndex = Get_2DImage_PointToArray(dealInfo->Width - 3, y, dealInfo->Width, dealInfo->Height);
|
|
|
int FirstIndex = Get_2DImage_PointToArray(dealInfo->Width - 1, y, dealInfo->Width, dealInfo->Height);
|
|
|
int SecondIndex = Get_2DImage_PointToArray(dealInfo->Width - 2, y, dealInfo->Width, dealInfo->Height);
|
|
|
int SourceIndex = Get_2DImage_PointToArray(dealInfo->Width - 7, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
|
|
|
int FirstIndex = Get_2DImage_PointToArray(dealInfo->Width - 1, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
int SecondIndex = Get_2DImage_PointToArray(dealInfo->Width - 2, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
int ThirdIndex = Get_2DImage_PointToArray(dealInfo->Width - 3, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
int FourthIndex = Get_2DImage_PointToArray(dealInfo->Width - 4, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
int FifthIndex = Get_2DImage_PointToArray(dealInfo->Width - 5, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
int SixthIndex = Get_2DImage_PointToArray(dealInfo->Width - 6, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
int SeventhIndex = Get_2DImage_PointToArray(dealInfo->Width - 7, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
|
|
|
rgb_data[FirstIndex] = rgb_data[SourceIndex];
|
|
|
rgb_data[FirstIndex + 1] = rgb_data[SourceIndex + 1];
|
...
|
...
|
@@ -322,44 +333,66 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
|
|
rgb_data[SecondIndex] = rgb_data[SourceIndex];
|
|
|
rgb_data[SecondIndex + 1] = rgb_data[SourceIndex + 1];
|
|
|
rgb_data[SecondIndex + 2] = rgb_data[SourceIndex + 2];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
// 在rgb图上画图形
|
|
|
rgb_data[ThirdIndex] = rgb_data[SourceIndex];
|
|
|
rgb_data[ThirdIndex + 1] = rgb_data[SourceIndex + 1];
|
|
|
rgb_data[ThirdIndex + 2] = rgb_data[SourceIndex + 2];
|
|
|
|
|
|
//不画
|
|
|
if (dealInfo->RegionMode == 0)
|
|
|
{
|
|
|
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
|
|
}
|
|
|
rgb_data[FourthIndex] = rgb_data[SourceIndex];
|
|
|
rgb_data[FourthIndex + 1] = rgb_data[SourceIndex + 1];
|
|
|
rgb_data[FourthIndex + 2] = rgb_data[SourceIndex + 2];
|
|
|
|
|
|
//画十字
|
|
|
if (dealInfo->RegionMode == 1)
|
|
|
{
|
|
|
Stream_rgb888_WriteCross(rgb_data,
|
|
|
dealInfo->Width, dealInfo->Height,
|
|
|
dealInfo->RegionBox[0],
|
|
|
dealInfo->RegionBox[1],
|
|
|
255, 215, 0, 20, 20);
|
|
|
rgb_data[FifthIndex] = rgb_data[SourceIndex];
|
|
|
rgb_data[FifthIndex + 1] = rgb_data[SourceIndex + 1];
|
|
|
rgb_data[FifthIndex + 2] = rgb_data[SourceIndex + 2];
|
|
|
|
|
|
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
|
|
}
|
|
|
|
|
|
//画十字
|
|
|
if (dealInfo->RegionMode == 2)
|
|
|
{
|
|
|
Stream_rgb888_WriteRectangle(rgb_data,
|
|
|
dealInfo->Width, dealInfo->Height,
|
|
|
dealInfo->RegionBox[0],
|
|
|
dealInfo->RegionBox[1],
|
|
|
dealInfo->RegionBox[2],
|
|
|
dealInfo->RegionBox[3],
|
|
|
255, 215, 0, 1);
|
|
|
rgb_data[SixthIndex] = rgb_data[SourceIndex];
|
|
|
rgb_data[SixthIndex + 1] = rgb_data[SourceIndex + 1];
|
|
|
rgb_data[SixthIndex + 2] = rgb_data[SourceIndex + 2];
|
|
|
|
|
|
rgb_data[SeventhIndex] = rgb_data[SourceIndex];
|
|
|
rgb_data[SeventhIndex + 1] = rgb_data[SourceIndex + 1];
|
|
|
rgb_data[SeventhIndex + 2] = rgb_data[SourceIndex + 2];
|
|
|
}
|
|
|
|
|
|
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 在rgb图上画图形
|
|
|
|
|
|
// //不画
|
|
|
// if (dealInfo->RegionMode == 0)
|
|
|
// {
|
|
|
// return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
|
|
// }
|
|
|
|
|
|
// //画十字
|
|
|
// if (dealInfo->RegionMode == 1)
|
|
|
// {
|
|
|
// Stream_rgb888_WriteCross(rgb_data,
|
|
|
// dealInfo->Width, dealInfo->Height,
|
|
|
// dealInfo->RegionBox[0],
|
|
|
// dealInfo->RegionBox[1],
|
|
|
// 255, 215, 0, 20, 20);
|
|
|
|
|
|
// return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
|
|
// }
|
|
|
|
|
|
// //画十字
|
|
|
// if (dealInfo->RegionMode == 2)
|
|
|
// {
|
|
|
// Stream_rgb888_WriteRectangle(rgb_data,
|
|
|
// dealInfo->Width, dealInfo->Height,
|
|
|
// dealInfo->RegionBox[0],
|
|
|
// dealInfo->RegionBox[1],
|
|
|
// dealInfo->RegionBox[2],
|
|
|
// dealInfo->RegionBox[3],
|
|
|
// 255, 215, 0, 1);
|
|
|
|
|
|
// return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
|
|
// }
|
|
|
|
|
|
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
|
|
}
|
|
|
|
...
|
...
|
|