## 2 Materials and Methods
### Initial Design of the Device
The ESP32-CAM can be succinctly characterized as a microcomputer that incorporates an optical sensor, encompassing a microprocessor, operating memory, storage capacity, and the capacity to utilize peripheral devices through general-purpose input/output (GPIO) pins. The ESP32-CAM is based on the ESP32-S technology, with the addition of an interface for connecting and exchanging an optical sensor, the OV2460 sensor as standard. The ESP32-CAM employs a Tensilica Xtensa(r) LX6 microprocessor with two 32-bit cores operating at 240 MHz, thereby enabling its utilization for demanding computer vision applications. The ESP32-CAM is equipped with 520 KB of internal RAM operating memory, augmented by 4 MB of external Pseudo-Static Random Access Memory (PSRAM) and 4 MB of internal memory. Additionally, the device can utilize an external MicroSD memory card, thereby expanding its functional scope without the necessity of connectivity to other devices. The device is equipped with an OV2640 optical sensor, offering a resolution of 1600 \(\times\) 1200 pixels (equivalent to 2 megapixels) at a frame rate of 15 to 60 frames per second. It is noteworthy that the ESP32-CAM is compatible with additional optical sensors, thereby expanding its functional capabilities. The ESP32-CAM facilitates connectivity with external devices through Wi-Fi 802.11 b/g/n and Bluetooth v4.2 wireless technologies. The device utilizes a 5 V power supply, with an average current consumption of 80 mAh during operation, 160 mAh during image data transmission, and a maximum of 260 mAh when transmitting video with LED lighting activated. The ESP32-CAM is capable of entering a deep sleep mode, during which it exhibits a current consumption of merely 5\(\upmu\)A. The ESP32-CAM's notable advantages over competing cameras include its compact size, the option to use interchangeable optical sensors with extended connection cables (e.g., 75 mm), enabling the placement of a sensor at a distance from the primary unit, and its relatively low current cost within the range of several tens [22]. Prior to utilization of the ESP32-CAM device, its programming is necessary. It should be noted that the ESP32-CAM device itself does not include a USB port that can be used for programming. Consequently, an external programming device or board is required to facilitate programming via the GPIO interface. An alternative option is to utilize the ESP32-CAM-MB add-on board, which incorporates a Micro USB interface. Once connected to a computer via the Arduino IDE, the program can be loaded into the device. After selecting the appropriate board and port within the Arduino IDE, the CameraWebServer library, which is freely available, can be selected and modified. Initially, it is necessary to select the ESP32-CAM device model by removing the comment from the line reading  
#define CAMERA_MODEL_AI_THINKER. Subsequently, the login credentials for the WiFi router to which the ESP32-CAM devices will connect must be entered. This can be a WiFi router with local network sharing enabled to which both the ESP32-CAM and the computer are connected. The second convenient option is to share the mobile access point with a computer to which the ESP32-CAM devices connect. It is imperative that, upon logging into the local network, the Internet Protocol (IP) addresses of the ESP32-CAM devices can be retrieved from the list of connected devices. These IP addresses will subsequently be utilized in the digitization process. Following the upload of the code to the ESP32-CAM devices and their establishment of a connection within the local network, the cameras become operational through the utilization of a browser-based login interface. This procedure entails entering the IP address of the device into the search bar of a web browser. During the digitization process, it is imperative to maintain a connection with the ESP32-CAM devices within the browser and to have selected the requisite settings from the available menu in the settings panel located on the left side of the browser window.