## 3 High-Speed RoI Extraction through Grid Virtual Division
### Grid Virtual Division Scheme
Therefore, this step then entails calling the IMAGECOMPOSE function in Algorithm 1 to store the coordinate orientation of the block merged by \"11\" and \"17\". If there are subsequent consecutive block numbers for the current block number in the container, it is considered the second case. For example, the block marked \"26\" in Figure 4c has contiguous right adjacent blocks of \"27\", \"28\", and \"29\", so it is necessary to call the IMAGECOMPOSE function in Algorithm 1 to store the coordinates of its constituent blocks. If all the above operation results are present, it is considered the third case. For example, the block marked \"4\" in Figure 4b has both a right adjacent block \"5\" and a lower adjacent block \"10\". At the same time, its right adjacent block exists above block \"11\", and its lower adjacent block exists on the left side of block \"11\". Thus, this step needs to use the IMAGECOMPOSE function in Algorithm 1 to record the coordinate orientation of the block synthesized by these four blocks after determining the block situation. Finally, if none of the above results is present, it is considered the fourth case, in which no stitching operation is required. It is worth mentioning that parts of the RoI may be missed during the image combination process. For example, block number 22 in Figure 4b is not detected because the area occupied by the stripes is too small. To deal with this situation, after obtaining the coordinate orientation of the merged block, we need to extend a few pixels on both sides of the block before performing subsequent operations. Step 4--Demodulation and Decoding: Once the coordinates are obtained, this step involves converting the grayscale to bits and recovering the transmitted data. To be more specific, the demodulator first samples a single row or column of pixels from the acquired area to form a grayscale sequence for demodulation. In order to identify the start of a transmission session, the demodulator first uses a coarse-grained threshold to distinguish the preamble, which is defined as several consecutive bright symbols in the packet. Subsequently, fine-grained thresholds are fitted using the grayscale information of the identified preambles to further convert the grayscale information between two adjacent preambles into logical data. Finally, the receiver recovers the sent messages and completes the decoding process of a whole frame. In a nutshell, the above four-step implementation enables the OCC system to locate RoIs with high grayscale values without traversing all pixels. Since it is necessary to traverse the container storing the block numbers of high grayscale values, the time complexity of the algorithm can be calculated as \(O(n)\) according to the following equation:  
\[T[n]=O(f(n)), \tag{4}\]  
where \(T[n]\) denotes the execution time of the code, \(n\) denotes the size of the data and \(f(n)\) denotes the sum of the execution times of each line of code. Furthermore, the algorithm's memory space required to be opened up does not vary with \(n\), so the space complexity is \(O(1)\). From a subjective point of view, this scheme can effectively alleviate the decoding delay of the OCC receiver and promote the communication capacity of the OCC. Thissatisfies the functional assumption of Section 2. In order to draw the convinced conclusions, extensive experiments are also conducted in the subsequent sections to verify the robustness of the proposed scheme.