|
@@ -260,10 +260,10 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
|
@@ -260,10 +260,10 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
260
|
//修复上边
|
260
|
//修复上边
|
261
|
for (x = 2; x <= dealInfo->Width - 2; x++)
|
261
|
for (x = 2; x <= dealInfo->Width - 2; x++)
|
262
|
{
|
262
|
{
|
263
|
- int SourceIndex = Get_2DImage_PointToArray(x, 3, dealInfo->Width, dealInfo->Height);
|
263
|
+ int SourceIndex = Get_2DImage_PointToArray(x, 3, dealInfo->Width, dealInfo->Height) * 3;
|
264
|
|
264
|
|
265
|
- int FirstIndex = Get_2DImage_PointToArray(x, 0, dealInfo->Width, dealInfo->Height);
|
|
|
266
|
- int SecondIndex = Get_2DImage_PointToArray(x, 1, dealInfo->Width, dealInfo->Height);
|
265
|
+ int FirstIndex = Get_2DImage_PointToArray(x, 0, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
266
|
+ int SecondIndex = Get_2DImage_PointToArray(x, 1, dealInfo->Width, dealInfo->Height) * 3;
|
267
|
|
267
|
|
268
|
rgb_data[FirstIndex] = rgb_data[SourceIndex];
|
268
|
rgb_data[FirstIndex] = rgb_data[SourceIndex];
|
269
|
rgb_data[FirstIndex + 1] = rgb_data[SourceIndex + 1];
|
269
|
rgb_data[FirstIndex + 1] = rgb_data[SourceIndex + 1];
|
|
@@ -277,10 +277,10 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
|
@@ -277,10 +277,10 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
277
|
//修复下边
|
277
|
//修复下边
|
278
|
for (x = 2; x <= dealInfo->Width - 2; x++)
|
278
|
for (x = 2; x <= dealInfo->Width - 2; x++)
|
279
|
{
|
279
|
{
|
280
|
- int SourceIndex = Get_2DImage_PointToArray(x, dealInfo->Height - 3, dealInfo->Width, dealInfo->Height);
|
280
|
+ int SourceIndex = Get_2DImage_PointToArray(x, dealInfo->Height - 3, dealInfo->Width, dealInfo->Height) * 3;
|
281
|
|
281
|
|
282
|
- int FirstIndex = Get_2DImage_PointToArray(x, dealInfo->Height - 1, dealInfo->Width, dealInfo->Height);
|
|
|
283
|
- int SecondIndex = Get_2DImage_PointToArray(x, dealInfo->Height - 2, dealInfo->Width, dealInfo->Height);
|
282
|
+ int FirstIndex = Get_2DImage_PointToArray(x, dealInfo->Height - 1, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
283
|
+ int SecondIndex = Get_2DImage_PointToArray(x, dealInfo->Height - 2, dealInfo->Width, dealInfo->Height) * 3;
|
284
|
|
284
|
|
285
|
rgb_data[FirstIndex] = rgb_data[SourceIndex];
|
285
|
rgb_data[FirstIndex] = rgb_data[SourceIndex];
|
286
|
rgb_data[FirstIndex + 1] = rgb_data[SourceIndex + 1];
|
286
|
rgb_data[FirstIndex + 1] = rgb_data[SourceIndex + 1];
|
|
@@ -292,12 +292,13 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
|
@@ -292,12 +292,13 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
292
|
}
|
292
|
}
|
293
|
|
293
|
|
294
|
//修复左边
|
294
|
//修复左边
|
295
|
- for (int y = 0; y <= dealInfo->Height; y++)
|
295
|
+ for (int y = 0; y < dealInfo->Height; y++)
|
296
|
{
|
296
|
{
|
297
|
- int SourceIndex = Get_2DImage_PointToArray(2, y, dealInfo->Width, dealInfo->Height);
|
297
|
+ int SourceIndex = Get_2DImage_PointToArray(3, y, dealInfo->Width, dealInfo->Height) * 3;
|
298
|
|
298
|
|
299
|
- int FirstIndex = Get_2DImage_PointToArray(0, y, dealInfo->Width, dealInfo->Height);
|
|
|
300
|
- int SecondIndex = Get_2DImage_PointToArray(1, y, dealInfo->Width, dealInfo->Height);
|
299
|
+ int FirstIndex = Get_2DImage_PointToArray(0, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
300
|
+ int SecondIndex = Get_2DImage_PointToArray(1, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
301
|
+ int ThirdIndex = Get_2DImage_PointToArray(2, y, dealInfo->Width, dealInfo->Height) * 3;
|
301
|
|
302
|
|
302
|
rgb_data[FirstIndex] = rgb_data[SourceIndex];
|
303
|
rgb_data[FirstIndex] = rgb_data[SourceIndex];
|
303
|
rgb_data[FirstIndex + 1] = rgb_data[SourceIndex + 1];
|
304
|
rgb_data[FirstIndex + 1] = rgb_data[SourceIndex + 1];
|
|
@@ -306,14 +307,24 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
|
@@ -306,14 +307,24 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
306
|
rgb_data[SecondIndex] = rgb_data[SourceIndex];
|
307
|
rgb_data[SecondIndex] = rgb_data[SourceIndex];
|
307
|
rgb_data[SecondIndex + 1] = rgb_data[SourceIndex + 1];
|
308
|
rgb_data[SecondIndex + 1] = rgb_data[SourceIndex + 1];
|
308
|
rgb_data[SecondIndex + 2] = rgb_data[SourceIndex + 2];
|
309
|
rgb_data[SecondIndex + 2] = rgb_data[SourceIndex + 2];
|
|
|
310
|
+
|
|
|
311
|
+ rgb_data[ThirdIndex] = rgb_data[SourceIndex];
|
|
|
312
|
+ rgb_data[ThirdIndex + 1] = rgb_data[SourceIndex + 1];
|
|
|
313
|
+ rgb_data[ThirdIndex + 2] = rgb_data[SourceIndex + 2];
|
309
|
}
|
314
|
}
|
310
|
|
315
|
|
311
|
- //修复右边
|
|
|
312
|
- for (int y = 0; y <= dealInfo->Height; y++)
|
316
|
+ // 修复右边
|
|
|
317
|
+ for (int y = 0; y < dealInfo->Height; y++)
|
313
|
{
|
318
|
{
|
314
|
- int SourceIndex = Get_2DImage_PointToArray(dealInfo->Width - 3, y, dealInfo->Width, dealInfo->Height);
|
|
|
315
|
- int FirstIndex = Get_2DImage_PointToArray(dealInfo->Width - 1, y, dealInfo->Width, dealInfo->Height);
|
|
|
316
|
- int SecondIndex = Get_2DImage_PointToArray(dealInfo->Width - 2, y, dealInfo->Width, dealInfo->Height);
|
319
|
+ int SourceIndex = Get_2DImage_PointToArray(dealInfo->Width - 7, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
320
|
+
|
|
|
321
|
+ int FirstIndex = Get_2DImage_PointToArray(dealInfo->Width - 1, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
322
|
+ int SecondIndex = Get_2DImage_PointToArray(dealInfo->Width - 2, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
323
|
+ int ThirdIndex = Get_2DImage_PointToArray(dealInfo->Width - 3, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
324
|
+ int FourthIndex = Get_2DImage_PointToArray(dealInfo->Width - 4, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
325
|
+ int FifthIndex = Get_2DImage_PointToArray(dealInfo->Width - 5, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
326
|
+ int SixthIndex = Get_2DImage_PointToArray(dealInfo->Width - 6, y, dealInfo->Width, dealInfo->Height) * 3;
|
|
|
327
|
+ int SeventhIndex = Get_2DImage_PointToArray(dealInfo->Width - 7, y, dealInfo->Width, dealInfo->Height) * 3;
|
317
|
|
328
|
|
318
|
rgb_data[FirstIndex] = rgb_data[SourceIndex];
|
329
|
rgb_data[FirstIndex] = rgb_data[SourceIndex];
|
319
|
rgb_data[FirstIndex + 1] = rgb_data[SourceIndex + 1];
|
330
|
rgb_data[FirstIndex + 1] = rgb_data[SourceIndex + 1];
|
|
@@ -322,44 +333,66 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
|
@@ -322,44 +333,66 @@ static T_JZsdkReturnCode IRC_Postdeal(unsigned char *rgb_data, struct IRC_param |
322
|
rgb_data[SecondIndex] = rgb_data[SourceIndex];
|
333
|
rgb_data[SecondIndex] = rgb_data[SourceIndex];
|
323
|
rgb_data[SecondIndex + 1] = rgb_data[SourceIndex + 1];
|
334
|
rgb_data[SecondIndex + 1] = rgb_data[SourceIndex + 1];
|
324
|
rgb_data[SecondIndex + 2] = rgb_data[SourceIndex + 2];
|
335
|
rgb_data[SecondIndex + 2] = rgb_data[SourceIndex + 2];
|
325
|
- }
|
|
|
326
|
- }
|
|
|
327
|
|
336
|
|
|
|
337
|
+ rgb_data[ThirdIndex] = rgb_data[SourceIndex];
|
|
|
338
|
+ rgb_data[ThirdIndex + 1] = rgb_data[SourceIndex + 1];
|
|
|
339
|
+ rgb_data[ThirdIndex + 2] = rgb_data[SourceIndex + 2];
|
328
|
|
340
|
|
329
|
- // 在rgb图上画图形
|
341
|
+ rgb_data[FourthIndex] = rgb_data[SourceIndex];
|
|
|
342
|
+ rgb_data[FourthIndex + 1] = rgb_data[SourceIndex + 1];
|
|
|
343
|
+ rgb_data[FourthIndex + 2] = rgb_data[SourceIndex + 2];
|
330
|
|
344
|
|
331
|
- //不画
|
|
|
332
|
- if (dealInfo->RegionMode == 0)
|
|
|
333
|
- {
|
|
|
334
|
- return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
|
|
335
|
- }
|
345
|
+ rgb_data[FifthIndex] = rgb_data[SourceIndex];
|
|
|
346
|
+ rgb_data[FifthIndex + 1] = rgb_data[SourceIndex + 1];
|
|
|
347
|
+ rgb_data[FifthIndex + 2] = rgb_data[SourceIndex + 2];
|
336
|
|
348
|
|
337
|
- //画十字
|
|
|
338
|
- if (dealInfo->RegionMode == 1)
|
|
|
339
|
- {
|
|
|
340
|
- Stream_rgb888_WriteCross(rgb_data,
|
|
|
341
|
- dealInfo->Width, dealInfo->Height,
|
|
|
342
|
- dealInfo->RegionBox[0],
|
|
|
343
|
- dealInfo->RegionBox[1],
|
|
|
344
|
- 255, 215, 0, 20, 20);
|
349
|
+ rgb_data[SixthIndex] = rgb_data[SourceIndex];
|
|
|
350
|
+ rgb_data[SixthIndex + 1] = rgb_data[SourceIndex + 1];
|
|
|
351
|
+ rgb_data[SixthIndex + 2] = rgb_data[SourceIndex + 2];
|
345
|
|
352
|
|
346
|
- return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
353
|
+ rgb_data[SeventhIndex] = rgb_data[SourceIndex];
|
|
|
354
|
+ rgb_data[SeventhIndex + 1] = rgb_data[SourceIndex + 1];
|
|
|
355
|
+ rgb_data[SeventhIndex + 2] = rgb_data[SourceIndex + 2];
|
347
|
}
|
356
|
}
|
348
|
|
357
|
|
349
|
- //画十字
|
|
|
350
|
- if (dealInfo->RegionMode == 2)
|
|
|
351
|
- {
|
|
|
352
|
- Stream_rgb888_WriteRectangle(rgb_data,
|
|
|
353
|
- dealInfo->Width, dealInfo->Height,
|
|
|
354
|
- dealInfo->RegionBox[0],
|
|
|
355
|
- dealInfo->RegionBox[1],
|
|
|
356
|
- dealInfo->RegionBox[2],
|
|
|
357
|
- dealInfo->RegionBox[3],
|
|
|
358
|
- 255, 215, 0, 1);
|
|
|
359
|
-
|
|
|
360
|
- return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
|
|
361
|
}
|
358
|
}
|
362
|
|
359
|
|
|
|
360
|
+
|
|
|
361
|
+
|
|
|
362
|
+ // 在rgb图上画图形
|
|
|
363
|
+
|
|
|
364
|
+ // //不画
|
|
|
365
|
+ // if (dealInfo->RegionMode == 0)
|
|
|
366
|
+ // {
|
|
|
367
|
+ // return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
|
|
368
|
+ // }
|
|
|
369
|
+
|
|
|
370
|
+ // //画十字
|
|
|
371
|
+ // if (dealInfo->RegionMode == 1)
|
|
|
372
|
+ // {
|
|
|
373
|
+ // Stream_rgb888_WriteCross(rgb_data,
|
|
|
374
|
+ // dealInfo->Width, dealInfo->Height,
|
|
|
375
|
+ // dealInfo->RegionBox[0],
|
|
|
376
|
+ // dealInfo->RegionBox[1],
|
|
|
377
|
+ // 255, 215, 0, 20, 20);
|
|
|
378
|
+
|
|
|
379
|
+ // return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
|
|
380
|
+ // }
|
|
|
381
|
+
|
|
|
382
|
+ // //画十字
|
|
|
383
|
+ // if (dealInfo->RegionMode == 2)
|
|
|
384
|
+ // {
|
|
|
385
|
+ // Stream_rgb888_WriteRectangle(rgb_data,
|
|
|
386
|
+ // dealInfo->Width, dealInfo->Height,
|
|
|
387
|
+ // dealInfo->RegionBox[0],
|
|
|
388
|
+ // dealInfo->RegionBox[1],
|
|
|
389
|
+ // dealInfo->RegionBox[2],
|
|
|
390
|
+ // dealInfo->RegionBox[3],
|
|
|
391
|
+ // 255, 215, 0, 1);
|
|
|
392
|
+
|
|
|
393
|
+ // return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
|
|
394
|
+ // }
|
|
|
395
|
+
|
363
|
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
396
|
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
364
|
}
|
397
|
}
|
365
|
|
398
|
|