# Experimental Study on Multi-Cell Counting Using an Inertial Microfluidic Device
## 2 Materials and Methods
### Experimental Variables and Setup
#### 2.5.3 Counting Technique  
The particle counting process was carefully designed to ensure the accurate quantification of particles within the microfluidic chip. The procedure utilized advanced imaging and image processing techniques to monitor and analyze the behavior of particles as they traversed through the microchannel. The counting technique is illustrated in Figure 3 and involves a series of methodical steps to capture, process, and analyze the particle flow. Step 1: Image Acquisition and Video Recording  
A fluorescent microscope equipped with a camera was used to capture real-time video recordings of the microfluidic device in operation. The fluorescent microscope provided enhanced contrast for better visualization of the microparticles, allowing for clearer differentiation between the particles and the background. These recordings captured the dynamic flow of particles within the microchannel and were saved in video format for subsequent analysis. Step 2: Data Conversion and Frame Extraction  
The recorded videos were then converted into individual frames to facilitate a detailed analysis of particle movement. This conversion process was essential to capture the sequential flow of particles at different time points, providing a comprehensive dataset for analysis. The frames were extracted at a specific frame rate (fps) to ensure adequate temporal resolution for observing particle interactions and behavior within the channel. Step 3: Image Preprocessing  
Each extracted frame underwent preprocessing, where they were converted to grayscale using Python 3.11 coding (Figure 4) This conversion reduced the complexity of the images by eliminating color information, focusing solely on the intensity values that represent the particles. Grayscale conversion is crucial for enhancing the contrast between particles and the background, which aids in subsequent image processing steps. Figure 4: Cell counting technique. Step 4: Image Processing and Calibration  
Post-processing of the grayscale images was conducted using ImageJ 1.54p, a robust image analysis software. The first step in this process involved adjusting the brightness and contrast settings to further enhance the visibility of the particles, ensuring that even those with minimal contrast to the background were detected. Calibration was performed using a reference scale corresponding to the microscope's magnification level, allowing for the accurate measurement of particle dimensions in real-world units. This calibration is critical for determining particle sizes and ensuring the accuracy of the counting process. Step 5: Thresholding and Binary Conversion  
To isolate the particles from the background, a thresholding technique was applied to each calibrated image (Figure 4). This technique involved setting a threshold level that differentiated particles from the background based on their intensity values. The images were then converted into binary format, where particles were represented as white (foreground) against a black (background) setting. This binary conversion effectively removed background noise and simplified the image, leaving only the particles for analysis. Step 6: Automated Particle Counting  
After obtaining the binary images, ImageJ's automated particle counting feature was utilized to quantify the particles. The software analyzed the binary images to identify and count particles based on their size and area as shown in Figure 5. It provided a detailed count of the total number of particles as well as their distribution based on size categories. This automated counting process ensured a high level of accuracy and efficiency, minimizing the potential for human error in manual counting. Step 7: Data Compilation and Analysis  
The results from the automated counting were compiled to provide a detailed overview of the particle distribution within the microchannel. The data included the total particle count, size distribution, and any observed patterns in particle behavior.