## 3 Proposed OCC IoMT Platform (Design and Implementation)
### Receiver  
In OCC, the receiver is a crucial element that converts light signals from LEDs into digital data. Receivers typically use camera sensors such as rolling or global shutters found in smartphones, webcams, or CCTV. This study employed a CCTV camera to monitor oxygen saturation, heart rate, temperature, and status of the panic button, and to detect the position/location of several patients based on user SN and ID camera in an indoor environment. Algorithm 2 shows the receiver's algorithm of pseudocode for the receiver in the OCC. This pseudocode is designed to detect and process patient health information using cameras and object recognition technology based on data captured from LED matrix signals.  
```
1:Initialization:
2:Create CSRT trackers and MultiTracker
3:Initialize video capture and YOLOv8 detector
4:Define API endpoint and key for data transmission
5:functionReadLEDs(select_box)
6: Process select_box coordinates
7: Extract and preprocess LED frame
8: Detect contours and calculate LED positions
9: Decode information (oxygen saturation, heart rate, temperature, status of the panic button)
10:return Decoded information and thresholded image
11:endfunction
12:functionProcessSelectBox(select_box)
13: Adjust and convert select_box coordinates
14:return Updated select_box
15:endfunction
16:functionProcessSelectBoxes(select_boxes)
17:for each box in select_boxes do
18: Process each select_box
19:endfor
20:return List of processed select_boxes
21:endfunction
22:functionSendData(channel_id, data, cameraID)
23: Prepare and send data to API
24: Handle response and errors
25:endfunction
26:Main Loop:
27:while Video Capture is Active do
28: Read frame from video capture
29:if First Frame then
30: Detect objects and initialize trackers
31:endif
32:if Re-initialization Condition Met then
33: Re-initialize trackers
34:endif
35: Update trackers and process LED information
36: Display results and periodically send data to API
37:if Termination Condition (ESC or 'q' Key Press) then
38: Terminate and close windows
39:endif
40:endwhile
```  
**Algorithm 2** Pseudocode--\"Receiver\"This system employs the CSRT (Channel and Spatial Reliability Tracker) algorithm for real-time object tracking and the YOLOv8 (You Only Look Once Version 8) detector for identifying specific objects (LED matrix 8 \(\times\) 8) in the video. The algorithm aims to read and analyze LED signals that indicate health data such as oxygen saturation, heart rate, body temperature, and the status of the panic button, and to detect the position/location of several patients based on user SN and ID camera. This information is then processed and sent to an API for further storage and analysis. The main functions of this pseudocode include initializing tracking and detection, processing select boxes that mark detected object areas, processing LED signals for health data extraction, and sending these data to the API. This system operates in a main loop, continuously reading and processing video frames, and periodically sending health data to the API, ultimately offering significant potential for remote health monitoring and telemedicine applications, which provide real-time data crucial for monitoring and clinical decision-making.