ClassFlowTakeImage.cpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. #include <regex>
  5. #include "ClassFlowTakeImage.h"
  6. #include "Helper.h"
  7. #include "ClassLogFile.h"
  8. #include "CImageBasis.h"
  9. #include "ClassControllCamera.h"
  10. #include "MainFlowControl.h"
  11. #include "esp_wifi.h"
  12. #include "esp_log.h"
  13. #include "../../include/defines.h"
  14. #include "psram.h"
  15. #include <time.h>
  16. // #define DEBUG_DETAIL_ON
  17. // #define WIFITURNOFF
  18. static const char *TAG = "TAKEIMAGE";
  19. esp_err_t ClassFlowTakeImage::camera_capture(void)
  20. {
  21. string nm = namerawimage;
  22. Camera.CaptureToFile(nm);
  23. time(&TimeImageTaken);
  24. localtime(&TimeImageTaken);
  25. return ESP_OK;
  26. }
  27. void ClassFlowTakeImage::takePictureWithFlash(int flash_duration)
  28. {
  29. // in case the image is flipped, it must be reset here //
  30. rawImage->width = CCstatus.ImageWidth;
  31. rawImage->height = CCstatus.ImageHeight;
  32. ESP_LOGD(TAG, "flash_duration: %d", flash_duration);
  33. Camera.CaptureToBasisImage(rawImage, flash_duration);
  34. time(&TimeImageTaken);
  35. localtime(&TimeImageTaken);
  36. if (CCstatus.SaveAllFiles)
  37. {
  38. rawImage->SaveToFile(namerawimage);
  39. }
  40. }
  41. void ClassFlowTakeImage::SetInitialParameter(void)
  42. {
  43. TimeImageTaken = 0;
  44. rawImage = NULL;
  45. disabled = false;
  46. namerawimage = "/sdcard/img_tmp/raw.jpg";
  47. }
  48. // auslesen der Kameraeinstellungen aus der config.ini
  49. // wird beim Start aufgerufen
  50. bool ClassFlowTakeImage::ReadParameter(FILE *pfile, string &aktparamgraph)
  51. {
  52. Camera.getSensorDatenToCCstatus(); // Kamera >>> CCstatus
  53. std::vector<string> splitted;
  54. aktparamgraph = trim(aktparamgraph);
  55. if (aktparamgraph.size() == 0)
  56. {
  57. if (!this->GetNextParagraph(pfile, aktparamgraph))
  58. {
  59. return false;
  60. }
  61. }
  62. if (aktparamgraph.compare("[TakeImage]") != 0)
  63. {
  64. // Paragraph does not fit TakeImage
  65. return false;
  66. }
  67. while (this->getNextLine(pfile, &aktparamgraph) && !this->isNewParagraph(aktparamgraph))
  68. {
  69. splitted = ZerlegeZeile(aktparamgraph);
  70. if ((toUpper(splitted[0]) == "RAWIMAGESLOCATION") && (splitted.size() > 1))
  71. {
  72. imagesLocation = "/sdcard" + splitted[1];
  73. isLogImage = true;
  74. }
  75. else if ((toUpper(splitted[0]) == "RAWIMAGESRETENTION") && (splitted.size() > 1))
  76. {
  77. if (isStringNumeric(splitted[1]))
  78. {
  79. this->imagesRetention = std::stod(splitted[1]);
  80. }
  81. }
  82. else if ((toUpper(splitted[0]) == "SAVEALLFILES") && (splitted.size() > 1))
  83. {
  84. CCstatus.SaveAllFiles = alphanumericToBoolean(splitted[1]);
  85. }
  86. else if ((toUpper(splitted[0]) == "WAITBEFORETAKINGPICTURE") && (splitted.size() > 1))
  87. {
  88. if (isStringNumeric(splitted[1]))
  89. {
  90. int _WaitBeforePicture = std::stoi(splitted[1]);
  91. if (_WaitBeforePicture != 0)
  92. {
  93. CCstatus.WaitBeforePicture = _WaitBeforePicture;
  94. }
  95. else
  96. {
  97. CCstatus.WaitBeforePicture = 2;
  98. }
  99. }
  100. }
  101. else if ((toUpper(splitted[0]) == "CAMGAINCEILING") && (splitted.size() > 1))
  102. {
  103. std::string _ImageGainceiling = toUpper(splitted[1]);
  104. if (isStringNumeric(_ImageGainceiling))
  105. {
  106. int _ImageGainceiling_ = std::stoi(_ImageGainceiling);
  107. switch (_ImageGainceiling_)
  108. {
  109. case 1:
  110. CFstatus.ImageGainceiling = GAINCEILING_4X;
  111. break;
  112. case 2:
  113. CFstatus.ImageGainceiling = GAINCEILING_8X;
  114. break;
  115. case 3:
  116. CFstatus.ImageGainceiling = GAINCEILING_16X;
  117. break;
  118. case 4:
  119. CFstatus.ImageGainceiling = GAINCEILING_32X;
  120. break;
  121. case 5:
  122. CFstatus.ImageGainceiling = GAINCEILING_64X;
  123. break;
  124. case 6:
  125. CFstatus.ImageGainceiling = GAINCEILING_128X;
  126. break;
  127. default:
  128. CFstatus.ImageGainceiling = GAINCEILING_2X;
  129. }
  130. }
  131. else
  132. {
  133. if (_ImageGainceiling == "X4")
  134. {
  135. CCstatus.ImageGainceiling = GAINCEILING_4X;
  136. }
  137. else if (_ImageGainceiling == "X8")
  138. {
  139. CCstatus.ImageGainceiling = GAINCEILING_8X;
  140. }
  141. else if (_ImageGainceiling == "X16")
  142. {
  143. CCstatus.ImageGainceiling = GAINCEILING_16X;
  144. }
  145. else if (_ImageGainceiling == "X32")
  146. {
  147. CCstatus.ImageGainceiling = GAINCEILING_32X;
  148. }
  149. else if (_ImageGainceiling == "X64")
  150. {
  151. CCstatus.ImageGainceiling = GAINCEILING_64X;
  152. }
  153. else if (_ImageGainceiling == "X128")
  154. {
  155. CCstatus.ImageGainceiling = GAINCEILING_128X;
  156. }
  157. else
  158. {
  159. CCstatus.ImageGainceiling = GAINCEILING_2X;
  160. }
  161. }
  162. }
  163. else if ((toUpper(splitted[0]) == "CAMQUALITY") && (splitted.size() > 1))
  164. {
  165. if (isStringNumeric(splitted[1]))
  166. {
  167. int _ImageQuality = std::stoi(splitted[1]);
  168. CCstatus.ImageQuality = clipInt(_ImageQuality, 63, 6);
  169. }
  170. }
  171. else if ((toUpper(splitted[0]) == "CAMBRIGHTNESS") && (splitted.size() > 1))
  172. {
  173. if (isStringNumeric(splitted[1]))
  174. {
  175. int _ImageBrightness = std::stoi(splitted[1]);
  176. CCstatus.ImageBrightness = clipInt(_ImageBrightness, 2, -2);
  177. }
  178. }
  179. else if ((toUpper(splitted[0]) == "CAMCONTRAST") && (splitted.size() > 1))
  180. {
  181. if (isStringNumeric(splitted[1]))
  182. {
  183. int _ImageContrast = std::stoi(splitted[1]);
  184. CCstatus.ImageContrast = clipInt(_ImageContrast, 2, -2);
  185. }
  186. }
  187. else if ((toUpper(splitted[0]) == "CAMSATURATION") && (splitted.size() > 1))
  188. {
  189. if (isStringNumeric(splitted[1]))
  190. {
  191. int _ImageSaturation = std::stoi(splitted[1]);
  192. CCstatus.ImageSaturation = clipInt(_ImageSaturation, 2, -2);
  193. }
  194. }
  195. else if ((toUpper(splitted[0]) == "CAMSHARPNESS") && (splitted.size() > 1))
  196. {
  197. if (isStringNumeric(splitted[1]))
  198. {
  199. int _ImageSharpness = std::stoi(splitted[1]);
  200. if (CCstatus.CamSensor_id == OV2640_PID)
  201. {
  202. CCstatus.ImageSharpness = clipInt(_ImageSharpness, 2, -2);
  203. }
  204. else
  205. {
  206. CCstatus.ImageSharpness = clipInt(_ImageSharpness, 3, -3);
  207. }
  208. }
  209. }
  210. else if ((toUpper(splitted[0]) == "CAMAUTOSHARPNESS") && (splitted.size() > 1))
  211. {
  212. CCstatus.ImageAutoSharpness = alphanumericToBoolean(splitted[1]);
  213. }
  214. else if ((toUpper(splitted[0]) == "CAMSPECIALEFFECT") && (splitted.size() > 1))
  215. {
  216. std::string _ImageSpecialEffect = toUpper(splitted[1]);
  217. if (isStringNumeric(_ImageSpecialEffect))
  218. {
  219. int _ImageSpecialEffect_ = std::stoi(_ImageSpecialEffect);
  220. CFstatus.ImageSpecialEffect = clipInt(_ImageSpecialEffect_, 6, 0);
  221. }
  222. else
  223. {
  224. if (_ImageSpecialEffect == "NEGATIVE")
  225. {
  226. CCstatus.ImageSpecialEffect = 1;
  227. }
  228. else if (_ImageSpecialEffect == "GRAYSCALE")
  229. {
  230. CCstatus.ImageSpecialEffect = 2;
  231. }
  232. else if (_ImageSpecialEffect == "RED")
  233. {
  234. CCstatus.ImageSpecialEffect = 3;
  235. }
  236. else if (_ImageSpecialEffect == "GREEN")
  237. {
  238. CCstatus.ImageSpecialEffect = 4;
  239. }
  240. else if (_ImageSpecialEffect == "BLUE")
  241. {
  242. CCstatus.ImageSpecialEffect = 5;
  243. }
  244. else if (_ImageSpecialEffect == "RETRO")
  245. {
  246. CCstatus.ImageSpecialEffect = 6;
  247. }
  248. else
  249. {
  250. CCstatus.ImageSpecialEffect = 0;
  251. }
  252. }
  253. }
  254. else if ((toUpper(splitted[0]) == "CAMWBMODE") && (splitted.size() > 1))
  255. {
  256. std::string _ImageWbMode = toUpper(splitted[1]);
  257. if (isStringNumeric(_ImageWbMode))
  258. {
  259. int _ImageWbMode_ = std::stoi(_ImageWbMode);
  260. CFstatus.ImageWbMode = clipInt(_ImageWbMode_, 4, 0);
  261. }
  262. else
  263. {
  264. if (_ImageWbMode == "SUNNY")
  265. {
  266. CCstatus.ImageWbMode = 1;
  267. }
  268. else if (_ImageWbMode == "CLOUDY")
  269. {
  270. CCstatus.ImageWbMode = 2;
  271. }
  272. else if (_ImageWbMode == "OFFICE")
  273. {
  274. CCstatus.ImageWbMode = 3;
  275. }
  276. else if (_ImageWbMode == "HOME")
  277. {
  278. CCstatus.ImageWbMode = 4;
  279. }
  280. else
  281. {
  282. CCstatus.ImageWbMode = 0;
  283. }
  284. }
  285. }
  286. else if ((toUpper(splitted[0]) == "CAMAWB") && (splitted.size() > 1))
  287. {
  288. CCstatus.ImageAwb = alphanumericToBoolean(splitted[1]);
  289. }
  290. else if ((toUpper(splitted[0]) == "CAMAWBGAIN") && (splitted.size() > 1))
  291. {
  292. CCstatus.ImageAwbGain = alphanumericToBoolean(splitted[1]);
  293. }
  294. else if ((toUpper(splitted[0]) == "CAMAEC") && (splitted.size() > 1))
  295. {
  296. CCstatus.ImageAec = alphanumericToBoolean(splitted[1]);
  297. }
  298. else if ((toUpper(splitted[0]) == "CAMAEC2") && (splitted.size() > 1))
  299. {
  300. CCstatus.ImageAec2 = alphanumericToBoolean(splitted[1]);
  301. }
  302. else if ((toUpper(splitted[0]) == "CAMAELEVEL") && (splitted.size() > 1))
  303. {
  304. if (isStringNumeric(splitted[1]))
  305. {
  306. int _ImageAeLevel = std::stoi(splitted[1]);
  307. if (CCstatus.CamSensor_id == OV2640_PID)
  308. {
  309. CCstatus.ImageAeLevel = clipInt(_ImageAeLevel, 2, -2);
  310. }
  311. else
  312. {
  313. CCstatus.ImageAeLevel = clipInt(_ImageAeLevel, 5, -5);
  314. }
  315. }
  316. }
  317. else if ((toUpper(splitted[0]) == "CAMAECVALUE") && (splitted.size() > 1))
  318. {
  319. if (isStringNumeric(splitted[1]))
  320. {
  321. int _ImageAecValue = std::stoi(splitted[1]);
  322. CCstatus.ImageAecValue = clipInt(_ImageAecValue, 1200, 0);
  323. }
  324. }
  325. else if ((toUpper(splitted[0]) == "CAMAGC") && (splitted.size() > 1))
  326. {
  327. CCstatus.ImageAgc = alphanumericToBoolean(splitted[1]);
  328. }
  329. else if ((toUpper(splitted[0]) == "CAMAGCGAIN") && (splitted.size() > 1))
  330. {
  331. if (isStringNumeric(splitted[1]))
  332. {
  333. int _ImageAgcGain = std::stoi(splitted[1]);
  334. CCstatus.ImageAgcGain = clipInt(_ImageAgcGain, 30, 0);
  335. }
  336. }
  337. else if ((toUpper(splitted[0]) == "CAMBPC") && (splitted.size() > 1))
  338. {
  339. CCstatus.ImageBpc = alphanumericToBoolean(splitted[1]);
  340. }
  341. else if ((toUpper(splitted[0]) == "CAMWPC") && (splitted.size() > 1))
  342. {
  343. CCstatus.ImageWpc = alphanumericToBoolean(splitted[1]);
  344. }
  345. else if ((toUpper(splitted[0]) == "CAMRAWGMA") && (splitted.size() > 1))
  346. {
  347. CCstatus.ImageRawGma = alphanumericToBoolean(splitted[1]);
  348. }
  349. else if ((toUpper(splitted[0]) == "CAMLENC") && (splitted.size() > 1))
  350. {
  351. CCstatus.ImageLenc = alphanumericToBoolean(splitted[1]);
  352. }
  353. else if ((toUpper(splitted[0]) == "CAMHMIRROR") && (splitted.size() > 1))
  354. {
  355. CCstatus.ImageHmirror = alphanumericToBoolean(splitted[1]);
  356. }
  357. else if ((toUpper(splitted[0]) == "CAMVFLIP") && (splitted.size() > 1))
  358. {
  359. CCstatus.ImageVflip = alphanumericToBoolean(splitted[1]);
  360. }
  361. else if ((toUpper(splitted[0]) == "CAMDCW") && (splitted.size() > 1))
  362. {
  363. CCstatus.ImageDcw = alphanumericToBoolean(splitted[1]);
  364. }
  365. else if ((toUpper(splitted[0]) == "CAMDENOISE") && (splitted.size() > 1))
  366. {
  367. if (isStringNumeric(splitted[1]))
  368. {
  369. int _ImageDenoiseLevel = std::stoi(splitted[1]);
  370. if (CCstatus.CamSensor_id == OV2640_PID)
  371. {
  372. CCstatus.ImageDenoiseLevel = 0;
  373. }
  374. else
  375. {
  376. CCstatus.ImageDenoiseLevel = clipInt(_ImageDenoiseLevel, 8, 0);
  377. }
  378. }
  379. }
  380. else if ((toUpper(splitted[0]) == "CAMZOOM") && (splitted.size() > 1))
  381. {
  382. CCstatus.ImageZoomEnabled = alphanumericToBoolean(splitted[1]);
  383. }
  384. else if ((toUpper(splitted[0]) == "CAMZOOMOFFSETX") && (splitted.size() > 1))
  385. {
  386. if (isStringNumeric(splitted[1]))
  387. {
  388. int _ImageZoomOffsetX = std::stoi(splitted[1]);
  389. if (CCstatus.CamSensor_id == OV2640_PID)
  390. {
  391. CCstatus.ImageZoomOffsetX = clipInt(_ImageZoomOffsetX, 480, -480);
  392. }
  393. else if (CCstatus.CamSensor_id == OV3660_PID)
  394. {
  395. CCstatus.ImageZoomOffsetX = clipInt(_ImageZoomOffsetX, 704, -704);
  396. }
  397. else if (CCstatus.CamSensor_id == OV5640_PID)
  398. {
  399. CCstatus.ImageZoomOffsetX = clipInt(_ImageZoomOffsetX, 960, -960);
  400. }
  401. }
  402. }
  403. else if ((toUpper(splitted[0]) == "CAMZOOMOFFSETY") && (splitted.size() > 1))
  404. {
  405. if (isStringNumeric(splitted[1]))
  406. {
  407. int _ImageZoomOffsetY = std::stoi(splitted[1]);
  408. if (CCstatus.CamSensor_id == OV2640_PID)
  409. {
  410. CCstatus.ImageZoomOffsetY = clipInt(_ImageZoomOffsetY, 360, -360);
  411. }
  412. else if (CCstatus.CamSensor_id == OV3660_PID)
  413. {
  414. CCstatus.ImageZoomOffsetY = clipInt(_ImageZoomOffsetY, 528, -528);
  415. }
  416. else if (CCstatus.CamSensor_id == OV5640_PID)
  417. {
  418. CCstatus.ImageZoomOffsetY = clipInt(_ImageZoomOffsetY, 720, -720);
  419. }
  420. }
  421. }
  422. else if ((toUpper(splitted[0]) == "CAMZOOMSIZE") && (splitted.size() > 1))
  423. {
  424. if (isStringNumeric(splitted[1]))
  425. {
  426. int _ImageZoomSize = std::stoi(splitted[1]);
  427. if (CCstatus.CamSensor_id == OV2640_PID)
  428. {
  429. CCstatus.ImageZoomSize = clipInt(_ImageZoomSize, 29, 0);
  430. }
  431. else if (CCstatus.CamSensor_id == OV3660_PID)
  432. {
  433. CCstatus.ImageZoomSize = clipInt(_ImageZoomSize, 43, 0);
  434. }
  435. else if (CCstatus.CamSensor_id == OV5640_PID)
  436. {
  437. CCstatus.ImageZoomSize = clipInt(_ImageZoomSize, 59, 0);
  438. }
  439. }
  440. }
  441. else if ((toUpper(splitted[0]) == "LEDINTENSITY") && (splitted.size() > 1))
  442. {
  443. if (isStringNumeric(splitted[1]))
  444. {
  445. float ledintensity = std::stof(splitted[1]);
  446. Camera.SetLEDIntensity(ledintensity);
  447. }
  448. }
  449. else if ((toUpper(splitted[0]) == "DEMO") && (splitted.size() > 1))
  450. {
  451. CCstatus.DemoMode = alphanumericToBoolean(splitted[1]);
  452. if (CCstatus.DemoMode == true)
  453. {
  454. Camera.useDemoMode();
  455. }
  456. }
  457. }
  458. Camera.setSensorDatenFromCCstatus(); // CCstatus >>> Kamera
  459. Camera.SetQualityZoomSize(CCstatus.ImageQuality, CCstatus.ImageFrameSize, CCstatus.ImageZoomEnabled, CCstatus.ImageZoomOffsetX, CCstatus.ImageZoomOffsetY, CCstatus.ImageZoomSize, CCstatus.ImageVflip);
  460. rawImage = new CImageBasis("rawImage");
  461. rawImage->CreateEmptyImage(CCstatus.ImageWidth, CCstatus.ImageHeight, 3);
  462. return true;
  463. }
  464. ClassFlowTakeImage::ClassFlowTakeImage(std::vector<ClassFlow *> *lfc) : ClassFlowImage(lfc, TAG)
  465. {
  466. imagesLocation = "/log/source";
  467. imagesRetention = 5;
  468. SetInitialParameter();
  469. }
  470. string ClassFlowTakeImage::getHTMLSingleStep(string host)
  471. {
  472. string result;
  473. result = "Raw Image: <br>\n<img src=\"" + host + "/img_tmp/raw.jpg\">\n";
  474. return result;
  475. }
  476. // wird bei jeder Auswertrunde aufgerufen
  477. bool ClassFlowTakeImage::doFlow(string zwtime)
  478. {
  479. psram_init_shared_memory_for_take_image_step();
  480. string logPath = CreateLogFolder(zwtime);
  481. int flash_duration = (int)(CCstatus.WaitBeforePicture * 1000);
  482. #ifdef DEBUG_DETAIL_ON
  483. LogFile.WriteHeapInfo("ClassFlowTakeImage::doFlow - Before takePictureWithFlash");
  484. #endif
  485. #ifdef WIFITURNOFF
  486. esp_wifi_stop(); // to save power usage and
  487. #endif
  488. // wenn die Kameraeinstellungen durch Erstellen eines neuen Referenzbildes verändert wurden, müssen sie neu gesetzt werden
  489. if (CFstatus.changedCameraSettings)
  490. {
  491. Camera.setSensorDatenFromCCstatus(); // CCstatus >>> Kamera
  492. Camera.SetQualityZoomSize(CCstatus.ImageQuality, CCstatus.ImageFrameSize, CCstatus.ImageZoomEnabled, CCstatus.ImageZoomOffsetX, CCstatus.ImageZoomOffsetY, CCstatus.ImageZoomSize, CCstatus.ImageVflip);
  493. CFstatus.changedCameraSettings = false;
  494. }
  495. takePictureWithFlash(flash_duration);
  496. #ifdef WIFITURNOFF
  497. esp_wifi_start();
  498. #endif
  499. #ifdef DEBUG_DETAIL_ON
  500. LogFile.WriteHeapInfo("ClassFlowTakeImage::doFlow - After takePictureWithFlash");
  501. #endif
  502. LogImage(logPath, "raw", NULL, NULL, zwtime, rawImage);
  503. RemoveOldLogs();
  504. #ifdef DEBUG_DETAIL_ON
  505. LogFile.WriteHeapInfo("ClassFlowTakeImage::doFlow - After RemoveOldLogs");
  506. #endif
  507. psram_deinit_shared_memory_for_take_image_step();
  508. return true;
  509. }
  510. esp_err_t ClassFlowTakeImage::SendRawJPG(httpd_req_t *req)
  511. {
  512. int flash_duration = (int)(CCstatus.WaitBeforePicture * 1000);
  513. time(&TimeImageTaken);
  514. localtime(&TimeImageTaken);
  515. return Camera.CaptureToHTTP(req, flash_duration);
  516. }
  517. ImageData *ClassFlowTakeImage::SendRawImage(void)
  518. {
  519. CImageBasis *zw = new CImageBasis("SendRawImage", rawImage);
  520. ImageData *id;
  521. int flash_duration = (int)(CCstatus.WaitBeforePicture * 1000);
  522. Camera.CaptureToBasisImage(zw, flash_duration);
  523. time(&TimeImageTaken);
  524. localtime(&TimeImageTaken);
  525. id = zw->writeToMemoryAsJPG();
  526. delete zw;
  527. return id;
  528. }
  529. time_t ClassFlowTakeImage::getTimeImageTaken(void)
  530. {
  531. return TimeImageTaken;
  532. }
  533. ClassFlowTakeImage::~ClassFlowTakeImage(void)
  534. {
  535. delete rawImage;
  536. }