The invention discloses a
connected component marking method and device,
electronic equipment and a storage medium, and the method comprises the steps: building a corresponding row run length index table and a
run length coding table for obtained image data; scanning the run length index table from top to bottom, and
processing the run length line by line; traversing the
run length coding table, and for the currently traversed run length, judging whether the run length is adjacent to the first run length of the previous row; if the run length is adjacent to the first run length of the last row, the
connected component mark of the first run length is given to the run length, and for other run lengths adjacent to the run length after the first run length in the last row, the
connected component mark of the first run length is given to the connected component mark of the first run length; establishing an equivalence relationship between the connected component mark of the current run and the connected component marks of the other runs, and updating an equivalence class table; and traversing the
run length coding table again, if the connected component mark of the currently traversed run length is 0, creating a new connected component mark for the run length, otherwise, updating the connected component mark of the run length by using the mark in the equivalence class table. According to the technical scheme provided by the invention, the connected component marking method based on run length coding is higher in efficiency and less in occupied resources.