A High-Precision Method for Segmentation and Recognition of Shopping Mall Plans

Most studies on map segmentation and recognition are focused on architectural floor plans, while there are very few analyses of shopping mall plans. The objective of the work is to accurately segment and recognize the shopping mall plan, obtaining location and semantic information for each room via segmentation and recognition. This work can be used in other applications such as indoor robot navigation, building area and location analysis, and three-dimensional reconstruction. First, we identify and match the catalog of a mall floor plan to obtain matching text, and then we use the two-stage region growth method we proposed to segment the preprocessed floor plan. The room number is then obtained by sending each segmented room section to an OCR (optical character recognition) system for identification. Finally, the system retrieves the matching text to match the room number in order to obtain the room name, and outputs the needed room location and semantic information. It is considered a successful detection when a room region can be successfully segmented and identified. The proposed method is evaluated on a dataset including 1340 rooms. Experimental results show that the accuracy of room segmentation is 92.54%, and the accuracy of room recognition is 90.56%. The total detection accuracy is 83.81%.


Introduction
A floor plan is a graphical representation of the top view of a house or building along with its necessary dimensions. Relevant studies make use of a plan's extensive architectural information to aid their own research [1][2][3]. For instance, ref. [1] focuses on detecting walls from a floor plan based on an alternative patch-based segmentation approach working at a pixel level, concluding that the identified walls can be utilized for a variety of tasks, including three-dimensional (3D) reconstruction and the construction of building boundaries. On the other hand, ref. [2] utilizes a two-dimensional (2D) floorplan to align panorama red-green-blue-depth (RGBD) scans, which can significantly reduce the number of necessary scans with the aid of a floorplan image. Finally, ref. [3] proposes a method for understanding hand-painted planar graphs by using subgraph isomorphism and Hough transform-acknowledging that a plan consists of recognizing building elements (doors, windows, walls, tables, etc.) and their topological properties-so as to propose an alternative computer aided design (CAD) system input technique that allows for the storage and modification of paper-based plans. Two-dimensional floor plan evaluation and information retrieval can help in many applications, e.g., to count the number of rooms and their areas, as well as architectural information recovery. Moreover, indoor robot navigation [4], indoor building area analysis, and position analysis [5] all require analyses of floor plans.

Methods
This section is broken down into two parts to introduce (1) the Directory Text Matching System, which recognizes directories and obtains matched text, and (2) the Shopping Mall Matching System, which preprocesses and segments modules in detail; the recognition module is also discussed. Finally, the system preprocessing algorithm's disadvantage is analyzed, and the multi-epoch detection approach is adopted to address the shortage. Figure 1 depicts our system module. The Directory Text Matching System takes a directory image as input and returns the key value pair (matching text) of each row, with the room number as the key and the room name as the value. The matching text is fed into the Shopping Mall Plan Matching System to help the system finish the room matching operation. The input to the Shopping Mall Plan Matching System is a map corresponding to the directory. The preprocessed binary map is first obtained using the preprocessing module, and it is then segmented using the two-stage region growth approach to produce a region. The region is transferred to the OCR system to be identified and the room number is obtained. Then, the matched text is used to obtain the corresponding room name. Finally, the system generates a marked shopping mall plan, as well as information about the associated region, such as the corresponding room name and coordinate information.
Sensors 2022, 22, x FOR PEER REVIEW 4 of 20 a region. The region is transferred to the OCR system to be identified and the room number is obtained. Then, the matched text is used to obtain the corresponding room name. Finally, the system generates a marked shopping mall plan, as well as information about the associated region, such as the corresponding room name and coordinate information. Finally, the matched text is employed to aid recognition in order to acquire the information for each region.

The Directory Text Matching System
To begin, we recognize the plan's directory and the OCR system returns the semantic information set Ω of all rooms after recognition (room number as the key and semantic information as the value), which is used as the input of the recognition module to assist in completing the matching work. Multiple columns of directory images need to be identified, and the position is usually uncertain. To obtain the text, we must first preprocess each column of the text image for identification and then transmit it to the OCR system. Algorithm 1 represents the implementation of directory text matching system. The captured image may be slanted due to camera instability and inconsistent height between the camera and the picture, as shown in Figure 2a. To solve this problem, we used the perspective transformation algorithm [39] to correct the slanted picture; of course, this step could be skipped if there is no slant in the picture taken. Furthermore, if the room name in the directory is close to the room number, OCR will automatically recognize them as a string, as illustrated in Figure 2c. Thus, a line is drawn between the room Figure 1. The entire procedure for segmenting and recognizing a shopping mall plan is presented. The Directory Text Matching System enters directory pictures to generate matching text, and the shopping mall plan is entered into the Shop Mall Plan Matching System to segment the region. Finally, the matched text is employed to aid recognition in order to acquire the information for each region.

The Directory Text Matching System
To begin, we recognize the plan's directory and the OCR system returns the semantic information set Ω of all rooms after recognition (room number as the key and semantic information as the value), which is used as the input of the recognition module to assist in completing the matching work. Multiple columns of directory images need to be identified, and the position is usually uncertain. To obtain the text, we must first preprocess each column of the text image for identification and then transmit it to the OCR system. Algorithm 1 represents the implementation of directory text matching system. f l ← i < linepts 9: f r ← i > linepts 10: text l , text r ← f l , f r do OCR 11: Ω = match(text l , text r )

Preprocessing
The captured image may be slanted due to camera instability and inconsistent height between the camera and the picture, as shown in Figure 2a. To solve this problem, we used the perspective transformation algorithm [39] to correct the slanted picture; of course, this step could be skipped if there is no slant in the picture taken. Furthermore, if the room name in the directory is close to the room number, OCR will automatically recognize them as a string, as illustrated in Figure 2c. Thus, a line is drawn between the room name and the room number, and then f is divided into f l and f r photos based on this line, and they are submitted to OCR recognition, respectively.
1 Figure 2. The procedure for the Directory Text Matching System is presented: (a) represents the original image, (b) represents the perspective correction results, (c) represents the unprocessed recognition results, and (d) represents the processed recognition results.

OCR Recognition and Matching
f l and f r are sent into the OCR system to properly detect and collect each string's information (include meaning and location). EasyOCR only supports horizontal text, whereas Baidu OCR can recognize vertical text. Baidu OCR recognizes several vertical room numbers as a string in the experiment, which is inconvenient for text matching. As a result, we used EasyOCR to identify the directory, as illustrated in Figure 2d. Since the room name and number are typically in the same row in the catalog diagram, they can be matched based on the horizontal relationship of their corresponding coordinates. However, they cannot be entirely parallel, due to some flaws in human correction during the preprocessing stage. For matching, the method adopted is depicted in Figure 3. When y r in the right character's center coordinate, satisfies y r ∈ δ = {y l − h l 4 , y l + h l 4 }, it is considered the same row for matching. A key value pair is returned for each text row, in which the room number is the key and the room name is the value. To aid the mall plan matching system, the key value pair supplied by each row of all directories is set as a dictionary for the matching text. name and the room number, and then f is divided into l f and r f photos based on this line, and they are submitted to OCR recognition, respectively.

OCR Recognition and Matching
l f and r f are sent into the OCR system to properly detect and collect each string's information (include meaning and location). EasyOCR only supports horizontal text, whereas Baidu OCR can recognize vertical text. Baidu OCR recognizes several vertical room numbers as a string in the experiment, which is inconvenient for text matching. As a result, we used EasyOCR to identify the directory, as illustrated in Figure 2d. Since the room name and number are typically in the same row in the catalog diagram, they can be matched based on the horizontal relationship of their corresponding coordinates. However, they cannot be entirely parallel, due to some flaws in human correction during the preprocessing stage. For matching, the method adopted is depicted in Figure 3. When r y in the right character's center coordinate, satisfies , it is considered the same row for matching. A key value pair is returned for each text row, in which the room number is the key and the room name is the value. To aid the mall plan matching system, the key value pair supplied by each row of all directories is set as a dictionary for the matching text. . The two boxes represent the detected characters' smallest rectangular box. Using the position of the left character as a guide, when the right character box confirms that y r ∈ δ, it is assumed that the two characters are roughly in the same horizontal position and can be matched.

The Shopping Mall Plan Matching System
Due to the influence of camera angles, lighting changes, complex backgrounds, and dense strings, the recognition accuracy of the entire map will be quite low if only OCR is used. Recognition accuracy may be substantially improved, and the precise location of each region can be determined, if each region is extracted separately and fed into OCR.  . The two boxes represent the detected characters' smallest rectangular box. Using the position of the left character as a guide, when the right character box confirms that δ ∈ r y , it is assumed that the two characters are roughly in the same horizontal position and can be matched.

The Shopping Mall Plan Matching System
Due to the influence of camera angles, lighting changes, complex backgrounds, and dense strings, the recognition accuracy of the entire map will be quite low if only OCR is used. Recognition accuracy may be substantially improved, and the precise location of each region can be determined, if each region is extracted separately and fed into OCR. Figure 4 Figure 4. The entire procedure for the Shopping Mall Plan Matching System is presented. The preprocessing module uses the shopping mall plan as an input to generate a binary picture. In the segmentation module, the binary image is segmented to obtain each region to be identified. Each region is passed to the recognition module, in turn, to identify the room number, and the matching text is then traversed to acquire the corresponding region's room name. After a successful match, the region is marked and the region's information (room name and location) is returned.

Preprocessing Module
To decrease the amount of invalid information in the shopping mall plan, a perspective correction transformation operation that is consistent with directory extraction is required to extract the map independently. Furthermore, to account for varying shooting angles and lighting conditions, the preprocessing module employs a mix of threshold segmentation, Canny edge detection, and exposure point detection.
To accelerate the region growing algorithm, g F is obtained by graying the shopping mall plan 0 F , and the binary graph 1 b F is obtained by utilizing adaptive threshold segmentation for g F . Each pixel is used as the center of the adaptive window Ω , and the pixel's value is determined by calculating the threshold in Ω . The more pixels involved for calculation in Ω when T is bigger, the thicker the overall contour. However, the contour of 1  . The entire procedure for the Shopping Mall Plan Matching System is presented. The preprocessing module uses the shopping mall plan as an input to generate a binary picture. In the segmentation module, the binary image is segmented to obtain each region to be identified. Each region is passed to the recognition module, in turn, to identify the room number, and the matching text is then traversed to acquire the corresponding region's room name. After a successful match, the region is marked and the region's information (room name and location) is returned.

Preprocessing Module
To decrease the amount of invalid information in the shopping mall plan, a perspective correction transformation operation that is consistent with directory extraction is required to extract the map independently. Furthermore, to account for varying shooting angles and lighting conditions, the preprocessing module employs a mix of threshold segmentation, Canny edge detection, and exposure point detection.
To accelerate the region growing algorithm, F g is obtained by graying the shopping mall plan F 0 , and the binary graph F b1 is obtained by utilizing adaptive threshold segmentation for F g . Each pixel is used as the center of the adaptive window Ω, and the pixel's value is determined by calculating the threshold in Ω. The more pixels involved for calculation in Ω when T is bigger, the thicker the overall contour. However, the contour of F b1 at the exposure point is broken due to the local focus of indoor lighting in a realistic photo. The local range of such breakpoints is considerable, as illustrated in Figure 5a, and it will cause excessive segmentation. Moreover, the exposure point F g (i, j) is relatively high. An appropriate threshold δ for threshold segmentation makes it easy to locate the exposure point, and the binary figure F b2 can be obtained after the exposure point detection of F g . In addition, as shown in Figure 5b, there are tiny breakpoints at some edges in F g due to the influence of light. To obtain the closed boundary graph, a hierarchy operation is performed on F 0 to separate the three channels F R , F G , F B , and then a Canny edge detection operation is performed to obtain F Rg , F Gg , F Bg . To obtain a closed border graph, F b3 , F Rg , F Gg , and F Bg are combined. Finally, the preprocessing result graph F 1 is created by combining F b1 , F b2 , and F b3 . After the above procedure, there are still some weak breakpoints. To obtain the final result F 1 , the 3 × 3 rectangular symmetric structural element S is used to carry out the morphological dilation of F 1 . Figure 5 depicts the preprocessing result.
1 Figure 5. The preprocessing result is presented: (a,b) represent a partial enlarged view taken from F 0 , (c) denotes the shopping mall plan F 0 , (d) denotes the preprocessing result F 1 , (e) denotes the result of exposure point detection F b2 , (f) denotes the result of canny edge detection F b3 , and (g) denotes the result of adaptive threshold segmentation F b1 .

Segmentation Module
The preprocessed picture is segmented in the segmentation module using our proposed two-stage region growth algorithm, and the segmented region is then sent to the recognition module for matching. Algorithm 2 represents the implementation of two-stage region growth method. Algorithm 2 Two-stage region growing algorithm As shown in Figure 6a, after acquiring white region R 1 by region growing, the smallest rectangular frame R 1 (m × n) of R 1 is taken and projected on F 0 (M × N × 3) to obtain R 1(RGB) . However, the pixels of the letter "C37" are not merged into R 1 , resulting in the room region not being entirely segmented and OCR being unable to effectively recognize R 1(RGB) to gain room semantic information. As a result, we proposed the two-stage region growing algorithm. As shown in Figure 6b, on the basis of obtaining R 1 (m × n) by region growing, first reverse R 1 (m × n) to get R 1 (m × n), then carry out region growing for the white region at the border of R 1 (m × n) to obtain the growth region R 2 (m × n), and finally reverse to obtain R 2 (m × n) combining R 1 and internal character pixels; R 2 (m × n) is projected onto F 0 (M × N × 3) to obtain R 2(RGB) , and R 2(RGB) is then submitted to the OCR system for recognition. It was discovered that R 2 keeps the growing region R 1 while also combining internal character pixels, allowing the room area to be efficiently segmented and OCR to effectively recognize R 2(RGB) . On the basis of region growth, the two-stage region growing method retains the growing region R 1 and merges all the internal non-growing regions to generate the connected solid region R 2 . We can successfully segment all of the effective regions in the room in meeting our objectives, and R 2(RGB) is easier to identify than R 1(RGB) in the recognition module to collect room semantic information.
, and 2 ( ) RGB R is then submitted to the OCR system for recognition. It was discovered that 2 R keeps the growing region 1 R while also combining internal character pixels, allowing the room area to be efficiently segmented and OCR to effectively recognize 2 ( ) RGB R . On the basis of region growth, the two-stage region growing method retains the growing region We can successfully segment all of the effective regions in the room in meeting our objectives, and 2 ( ) RGB R is easier to identify than 1( ) RGB R in the recognition module to collect room semantic information.  Since the shopping mall plan includes a broad corridor, which is not our region of interest, when Formula (1) is met, it may be assumed that R is a corridor and not transmitted to the OCR system by judging the proportion of 1 ( ) R m n × and 1 ( ) F M N × . When τ is 0.6, it can fulfill the accuracy criteria after numerous tests. Figure 7 depicts the corridor. (1) Figure 6. Schematic diagram of two-stage region growing algorithm, taking the "C37" region as an example. (a) represents the traditional region growing process, and (b) represents the two-stage region growing process.
Since the shopping mall plan includes a broad corridor, which is not our region of interest, when Formula (1) is met, it may be assumed that R is a corridor and not transmitted to the OCR system by judging the proportion of R 1 (m × n) and F 1 (M × N). When τ is 0.6, it can fulfill the accuracy criteria after numerous tests. Figure 7 depicts the corridor.

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω, and eventually output F 2 (M × N × 3) labelled the room name and highlighted the pixel of the room region in the recognition module, which takes R 2(RGB) obtained via two-stage region growing method as input. Table 1 details the results of four kinds of R 2(RGB) . All the examples in Table 1 are identified by using Baidu OCR, highlighting R 2 1 as purple in F 0 if R 2(RGB) 1 is correctly recognized and matched. Due to an error in OCR induced by inadequate segmentation, R 2(RGB) 2 and R 2(RGB) 3 could not be successfully matched, since all pixels of R 2 can be obtained after two-stage region growing; F 0 is cropped to obtain R 3(RGB) after traversing the pixels to obtain the maximum and minimum coordinates. If R 3(RGB) can be successfully identified and matched, it is considered to be a valid target, and R 2 2 , R 2 3 is highlighted in red in F 0 ; otherwise, it is considered to be a non-target, and will not be marked. The highlighted F 0 serves as the recognition module's output F 2 . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees. Table 1. Results of four input types of recognition module.
and m, n denote the corridor's minimum rectangle size.

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees. Table 1. Results of four input types of recognition module.

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region and m, n denote the corridor's minimum rectangle size.

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees. Table 1. Results of four input types of recognition module.

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region and m, n denote the corridor's minimum rectangle size.

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees. Table 1. Results of four input types of recognition module.

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region √ √ C37: cafes None None and m, n denote the corridor's minimum rectangle size.

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees. Table 1. Results of four input types of recognition module.

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region 2

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees.

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees.

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees.

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees. The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region C17: dress shops

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees. The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region 3

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees. The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees. The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees.

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region √ Partly ×

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees.

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region CK02: EBGames

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees.

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region 4

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees.

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees.

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees.

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region × √ ×

Recognition Module
We utilized two traditional OCR systems, EasyOCR and Baidu OCR, to recognize a room number and match it with the directory dictionary Ω , and eventually output labelled the room name and highlighted the pixel of the room region in the recognition module, which takes 2 ( ) RGB R obtained via two-stage region growing method as input. , R R is highlighted in red in 0 F ; otherwise, it is considered to be a non-target, and will not be marked.
The highlighted 0 F serves as the recognition module's output 2 F . If there is no result after OCR, since the character is in the vertical direction, it should be rotated 90 degrees.

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of ' 1 F is carried out, mostly to avoid overgrowth during two-stage region None None

Multi-Epoch Segmentation and Recognition Algorithm
The first three sections of this study detail the entire fulfillment of a shopping mall plan's segmentation and recognition. However, if the character pixel is too close to the region boundary, they will be merged together, resulting in the OCR being unable to properly identify the character, as shown in 2 and 3 in Table 1. The fundamental cause is that, in the preprocessing module, the adaptive window Ω is relatively large and a dilation operation of F 1 is carried out, mostly to avoid overgrowth during two-stage region growing due to contour fracture. Such troublesome regions make up a small percentage of the total region to be identified in the map, but they account for the majority of the remaining undetected regions.
We used a multi-epoch segmentation and recognition strategy to solve this problem. The preprocessing techniques described in Section 2.2.1 were used in the first epoch, with T = 25 in the adaptive window Ω and δ = 230 in the exposure point detection. Morphological dilation was canceled in the second epoch, and T = 5. Most crucially, F detected_mask = 1 was set to record the detected region and corridor that were successfully marked in the first epoch; that is, F detected_mask (i, j) = 0, where (i, j) belongs to the detected region and corridor, and then the 5 × 5 rectangular symmetric structural element S was utilized to perform morphological dilation on F detected_mask , which was joined with the preprocessing result F 2 to generate the final preprocessing result F 2 , as illustrated in Figure 8.   ( ) a ( ) b Figure 10. (a) representation of the raw picture, and (b) representation of the outcomes of segmentation and recognition, following two epochs of segmentation and recognition. The regions of successful segmentation and recognition is filled with purple and labeled with the associated room number, whereas the successful segmentation (incomplete segmentation) but incorrect recognition area is labeled with red.

Experimental Process and Results
This section initially provides the precision performance evaluation metric, as well as experimental data. Using that information, numerous experiments were carried out to confirm the algorithm's effectiveness. Figure 10. (a) representation of the raw picture, and (b) representation of the outcomes of segmentation and recognition, following two epochs of segmentation and recognition. The regions of successful segmentation and recognition is filled with purple and labeled with the associated room number, whereas the successful segmentation (incomplete segmentation) but incorrect recognition area is labeled with red.

Experimental Process and Results
This section initially provides the precision performance evaluation metric, as well as experimental data. Using that information, numerous experiments were carried out to confirm the algorithm's effectiveness.

Introduction of Experimental Evaluation Criteria and Experimental Data
The accuracy performance assessment index has two components: segmentation precision and OCR precision. A detection is considered successful when a region can be successfully segmented and identified. As a result, the complete system's accuracy index is based on detection precision. The following analysis provides a detailed definition of the evaluation index. Table 2 serves as an illustration of the experimental evaluation criteria. In Formula (2), the total number of rooms in the image to be identified is represented by Ω. True positive (TP) denotes the number of regions that have been correctly segmented and recognized. False Positive 0 (FP 0 ) denotes the number of regions that are correctly segmented but result in matching mistakes as a result of recognition errors (affected by the accuracy of OCR system). False Positive 1 (FP 1 ) denotes the number of areas that are partly segmented and failed to recognize. False Negative (FN) denotes the number of areas that are not segmented successfully. segmented but result in matching mistakes as a result of recognition errors (affected by the accuracy of OCR system).

Test samples
Test results The precision performance evaluation metric for this work was determined using the statistical quantization results TP , 0 FP , 1 FP , and FN . In Equation (3), the SSR (the segmentation success rate, i.e., the proportion of successfully segmented regions to the total number of regions) is used to assess the two-stage region growing algorithm's segmentation accuracy. The OCR accuracy is measured using the ISR (identification success rate, i.e., in the number of successfully segmented regions, the proportion of the number of successfully identified regions) in Equation (4). The whole performance of the proposed system is measured using the DSR (detection success rate, i.e., the proportion of successfully segmented and identified regions to the total number of regions, easy to determine as = × DSR SSR ISR ), as stated in Equation (5). The precision performance evaluation metric of the whole system in this paper is mainly reflected by the calculated DSR. We used σ (second) to represent the entire time consumption of the segmentation and recognition algorithm. To minimize the effect of differing resolutions, we employed bilinear interpolation to scale the input image to approximate resolution. To maintain the original aspect ratio, the ' h and the ' w of the scaled image were determined using the following formula: segmented but result in matching mistakes as a result of recognition errors (affected by the accuracy of OCR system).

Test samples
Test results The precision performance evaluation metric for this work was determined using the statistical quantization results TP , 0 FP , 1 FP , and FN . In Equation (3), the SSR (the segmentation success rate, i.e., the proportion of successfully segmented regions to the total number of regions) is used to assess the two-stage region growing algorithm's segmentation accuracy. The OCR accuracy is measured using the ISR (identification success rate, i.e., in the number of successfully segmented regions, the proportion of the number of successfully identified regions) in Equation (4). The whole performance of the proposed system is measured using the DSR (detection success rate, i.e., the proportion of successfully segmented and identified regions to the total number of regions, easy to determine as = × DSR SSR ISR ), as stated in Equation (5). The precision performance evaluation metric of the whole system in this paper is mainly reflected by the calculated DSR. We used σ (second) to represent the entire time consumption of the segmentation and recognition algorithm. To minimize the effect of differing resolutions, we employed bilinear interpolation to scale the input image to approximate resolution. To maintain the original aspect ratio, the ' h and the ' w of the scaled image were determined using the following formula: segmented but result in matching mistakes as a result of recognition errors (affected by the accuracy of OCR system).

Test samples
Test results The precision performance evaluation metric for this work was determined using the statistical quantization results TP , 0 FP , 1 FP , and FN . In Equation (3), the SSR (the segmentation success rate, i.e., the proportion of successfully segmented regions to the total number of regions) is used to assess the two-stage region growing algorithm's segmentation accuracy. The OCR accuracy is measured using the ISR (identification success rate, i.e., in the number of successfully segmented regions, the proportion of the number of successfully identified regions) in Equation (4). The whole performance of the proposed system is measured using the DSR (detection success rate, i.e., the proportion of successfully segmented and identified regions to the total number of regions, easy to determine as = × DSR SSR ISR ), as stated in Equation (5). The precision performance evaluation metric of the whole system in this paper is mainly reflected by the calculated DSR. We used σ (second) to represent the entire time consumption of the segmentation and recognition algorithm. To minimize the effect of differing resolutions, we employed bilinear interpolation to scale the input image to approximate resolution. To maintain the original aspect ratio, the ' h and the ' w of the scaled image were determined using the following formula: segmented but result in matching mistakes as a result of recognition errors (affected by the accuracy of OCR system).

Test samples
Test results The precision performance evaluation metric for this work was determined using the statistical quantization results TP , 0 FP , 1 FP , and FN . In Equation (3), the SSR (the segmentation success rate, i.e., the proportion of successfully segmented regions to the total number of regions) is used to assess the two-stage region growing algorithm's segmentation accuracy. The OCR accuracy is measured using the ISR (identification success rate, i.e., in the number of successfully segmented regions, the proportion of the number of successfully identified regions) in Equation (4). The whole performance of the proposed system is measured using the DSR (detection success rate, i.e., the proportion of successfully segmented and identified regions to the total number of regions, easy to determine as = × DSR SSR ISR ), as stated in Equation (5). The precision performance evaluation metric of the whole system in this paper is mainly reflected by the calculated DSR. We used σ (second) to represent the entire time consumption of the segmentation and recognition algorithm. To minimize the effect of differing resolutions, we employed bilinear interpolation to scale the input image to approximate resolution. To maintain the original aspect ratio, the ' h and the ' w of the scaled image were determined using the following formula: Test results the accuracy of OCR system).

Test samples
Test results The precision performance evaluation metric for this work was determined using the statistical quantization results TP , 0 FP , 1 FP , and FN . In Equation (3), the SSR (the segmentation success rate, i.e., the proportion of successfully segmented regions to the total number of regions) is used to assess the two-stage region growing algorithm's segmentation accuracy. The OCR accuracy is measured using the ISR (identification success rate, i.e., in the number of successfully segmented regions, the proportion of the number of successfully identified regions) in Equation (4). The whole performance of the proposed system is measured using the DSR (detection success rate, i.e., the proportion of successfully segmented and identified regions to the total number of regions, easy to determine as = × DSR SSR ISR ), as stated in Equation (5). The precision performance evaluation metric of the whole system in this paper is mainly reflected by the calculated DSR. We used σ (second) to represent the entire time consumption of the segmentation and recognition algorithm. To minimize the effect of differing resolutions, we employed bilinear interpolation to scale the input image to approximate resolution. To maintain the original aspect ratio, the ' h and the ' w of the scaled image were determined using the following formula: the accuracy of OCR system).

Test samples
Test results The precision performance evaluation metric for this work was determined using the statistical quantization results TP , 0 FP , 1 FP , and FN . In Equation (3), the SSR (the segmentation success rate, i.e., the proportion of successfully segmented regions to the total number of regions) is used to assess the two-stage region growing algorithm's segmentation accuracy. The OCR accuracy is measured using the ISR (identification success rate, i.e., in the number of successfully segmented regions, the proportion of the number of successfully identified regions) in Equation (4). The whole performance of the proposed system is measured using the DSR (detection success rate, i.e., the proportion of successfully segmented and identified regions to the total number of regions, easy to determine as = × DSR SSR ISR ), as stated in Equation (5). The precision performance evaluation metric of the whole system in this paper is mainly reflected by the calculated DSR. We used σ (second) to represent the entire time consumption of the segmentation and recognition algorithm. To minimize the effect of differing resolutions, we employed bilinear interpolation to scale the input image to approximate resolution. To maintain the original aspect ratio, the ' h and the ' w of the scaled image were determined using the following formula: the accuracy of OCR system).

Test samples
Test results The precision performance evaluation metric for this work was determined using the statistical quantization results TP , 0 FP , 1 FP , and FN . In Equation (3), the SSR (the segmentation success rate, i.e., the proportion of successfully segmented regions to the total number of regions) is used to assess the two-stage region growing algorithm's segmentation accuracy. The OCR accuracy is measured using the ISR (identification success rate, i.e., in the number of successfully segmented regions, the proportion of the number of successfully identified regions) in Equation (4). The whole performance of the proposed system is measured using the DSR (detection success rate, i.e., the proportion of successfully segmented and identified regions to the total number of regions, easy to determine as = × DSR SSR ISR ), as stated in Equation (5). The precision performance evaluation metric of the whole system in this paper is mainly reflected by the calculated DSR. We used σ (second) to represent the entire time consumption of the segmentation and recognition algorithm. To minimize the effect of differing resolutions, we employed bilinear interpolation to scale the input image to approximate resolution. To maintain the original aspect ratio, the ' h and the ' w of the scaled image were determined using the following formula: the accuracy of OCR system).

Test samples
Test results The precision performance evaluation metric for this work was determined using the statistical quantization results TP , 0 FP , 1 FP , and FN . In Equation (3), the SSR (the segmentation success rate, i.e., the proportion of successfully segmented regions to the total number of regions) is used to assess the two-stage region growing algorithm's segmentation accuracy. The OCR accuracy is measured using the ISR (identification success rate, i.e., in the number of successfully segmented regions, the proportion of the number of successfully identified regions) in Equation (4). The whole performance of the proposed system is measured using the DSR (detection success rate, i.e., the proportion of successfully segmented and identified regions to the total number of regions, easy to determine as = × DSR SSR ISR ), as stated in Equation (5). The precision performance evaluation metric of the whole system in this paper is mainly reflected by the calculated DSR.
We used σ (second) to represent the entire time consumption of the segmentation and recognition algorithm. To minimize the effect of differing resolutions, we employed bilinear interpolation to scale the input image to approximate resolution. To maintain the original aspect ratio, the ' h and the ' w of the scaled image were determined using the following formula: The precision performance evaluation metric for this work was determined using the statistical quantization results TP, FP 0 , FP 1 , and FN. In Equation (3), the SSR (the segmentation success rate, i.e., the proportion of successfully segmented regions to the total number of regions) is used to assess the two-stage region growing algorithm's segmentation accuracy. The OCR accuracy is measured using the ISR (identification success rate, i.e., in the number of successfully segmented regions, the proportion of the number of successfully identified regions) in Equation (4). The whole performance of the proposed system is measured using the DSR (detection success rate, i.e., the proportion of successfully segmented and identified regions to the total number of regions, easy to determine as DSR = SSR × ISR), as stated in Equation (5). The precision performance evaluation metric of the whole system in this paper is mainly reflected by the calculated DSR.
We used σ(second) to represent the entire time consumption of the segmentation and recognition algorithm. To minimize the effect of differing resolutions, we employed bilinear interpolation to scale the input image to approximate resolution. To maintain the original aspect ratio, the h and the w of the scaled image were determined using the following formula: Using Figure 11 as an example, we downloaded the appropriate mall plan from the official website of 25 retail malls as the dataset. This information can be downloaded at https://github.com/Staylorm13/shopping-mall-plans-dataset (accessed on 10 October 2021). In the statistical tables of the following three experimental results, Image 1 represents Figure 10a, including 44 rooms; Image 2 represents Figure 11, including 111 rooms; and the dataset represents the sum of 25 pictures, including 1340 rooms. The accuracy analysis of this algorithm is based on the experimental results of the dataset.

Experiment with Different OCR Systems
The conditions in which an OCR system is different, for example, Baidu OCR, can only be utilized by calling the appropriate API online. EasyOCR, unlike Baidu OCR, must utilize CUDA to identify locally without networking, and its recognition efficiency is dependent on system setup. Our experimental operating equipment was a personal computer with the following configurations: Windows 11 (8G RAM) with an NVIDIA GTX 1660s GPU and an Intel Core i5-10600 CPU.
In different scenarios, different OCR systems have variable recognition accuracy. We first performed OCR comparison tests to identify which OCR was used in the following studies in order to adapt to our application scenarios and select a superior OCR system. Table 3 shows the outcomes of the experiments utilizing various OCR technologies.  Table 3 shows that, when an OCR system is used alone, Baidu OCR's recognition accuracy is 71.96%, higher than EasyOCR's 61.96%, but the time consumption is also larger, since Baidu OCR must call the API online for recognition, and the speed is easily affected by network speed, whereas EasyOCR can be used locally by downloading the detection and recognition models in advance. The EasyOCR model is lighter than the Baidu OCR model; however, its recognition accuracy is lower. When we used EasyOCR and Baidu OCR simultaneously (the BOTH columns in the table show that both EasyOCR and Baidu OCR are used at the same time), the recognition accuracy was 83.64%, greater than that of using any OCR system alone, and the speed was equivalent to that of Baidu OCR. The complementary use of EasyOCR and Baidu OCR jointly improves the overall recognition accuracy. As a result, in the following tests, the OCR system integrating EasyOCR and Baidu OCR was employed as the recognition module.

Experiment of Two-Stage Region Growing
We proposed a new approach in Section 2.2.2, i.e., the two-stage region growth method, which is based on region growth, keeping the region that has grown while merging all the internal regions that have not grown to produce solid regions. We could successfully segment all effective zones in the room in our task. Moreover, the segmented region created by two-stage region growth is simpler to use in recognizing and collecting room semantic information in the recognition module, improving OCR recognition accuracy. The effectiveness of the two-stage region growth algorithm in improving the accuracy of OCR in the recognition module was verified by using the region growth algorithm and the two-stage region growth algorithm, respectively, in the segmentation module. The comparative experimental results are shown in Table 4. The experimental results show that the system's overall recognition rate is just 5.4%, and its total detection rate is only 4.1% when the region growth method is utilized. The system's recognition accuracy increased to 83.6%, with a total detection rate of 66.8%, after employing the two-stage region growth technique. The experimental results revealed that the two-stage region growth technique can considerably increase the system recognition module's recognition accuracy and overall detection rate, and the pixels in each room can be obtained. The two-stage region growth technique is thus an essential component of map segmentation and recognition.

Experiment of Multi-Epoch Segmentation and Recognition
We discussed the influence of morphological dilatation operation and adaptive window size on image segmentation in Section 2.2.4. There will be a connection between string pixels and contour edges during the preprocessing stage, resulting in a decline in segmentation accuracy. As a result, we present a method of multi-epoch segmentation and recognition. The fundamental goal of this method is to improve the algorithm's segmentation accuracy. Tables 5-7 illustrate the experimental results of the two-epoch algorithm in verifying the effectiveness of multi-epoch segmentation and recognition.  The purpose of Epoch Two is to make up for the system's omission in Epoch One. On the basis of the experiment in Section 3.3, we continued the Epoch Two experiment; Tables 5  and 6 are two-epoch experiments with region growing and two-stage region growing, respectively. The segmentation rate increased from 75.97% to 90.74% when Epoch Two of detection was performed, as shown in Table 5. Table 6 shows that, when only one epoch was performed, the segmentation accuracy was 79.85%, and the total detection accuracy was only 66.79%. When Epoch Two was performed, the system's segmentation accuracy improved to 92.53%, and the total detection accuracy rose to 83.81%. To accelerate Epoch Two's computational speed, the concept was carried out by integrating the detected regions recorded for Epoch One with the preprocessing results of Epoch Two. Table 6 shows that the average computational speed of Epoch Two was σ 2 = 121 s, which is 10 s quicker than that of Epoch One, σ 1 = 132 s. The speed of Epoch Two in Image 1 and Image 2 was nearly twice as fast as the speed in Epoch One; Epoch Two only needs to discover the remaining undetected regions after Epoch One has detected the majority of them. The experimental results demonstrated that multi-epoch segmentation and recognition can significantly improve the system's segmentation accuracy and overall detection accuracy. Table 7 shows the experimental results of two-epoch segmentation and recognition utilizing two-stage region growing. Figure 12 represents the experimental results of Figure 11, which correspond to the experimental data of Image 2 in Tables 5-7. The purple-filled region denotes a room that has been successfully segmented and identified, whereas the red-filled area denotes a room that has been successfully segmented but incorrectly recognized. Rooms that are not successfully segmented still retain the colors in the original picture (without red and purple filling).
As shown in Figure 12a,b use the traditional region growth method, while Figure 12c,d use our two-stage region growth method. The room and the words are not connected when using traditional region growth, since the pixel values of words and room regions are not consistent, which is not convenient for OCR recognition, while our method solves this problem; Figure 12c,d has higher accuracy (more purple-filled rooms) compared with Figure 12a,b, which shows that our method is better than the traditional region growing algorithm. Furthermore, Figure 12a,c employ one-epoch detection, whereas Figure 12b,d employ two-epoch detection; Figure 12b,d has a higher segmentation accuracy (more rooms marked with color) than Figure 12a,c, indicating that the two-epoch detection method can improve segmentation accuracy.

Discussion
To validate the system's efficacy, we ran a significant number of tests on the dataset including 1340 rooms. The segmentation accuracy was 92.54%, the recognition accuracy was 90.56%, and the overall detection rate was 83.81%. The two-stage region growing method we proposed can successfully segment all effective regions in the room and is favorable to OCR recognition, thus improving the overall detection accuracy. Our multi-epoch segmentation and recognition method effectively improves the system's segmentation accuracy. Our system separates each room individually before identifying the segmented room and extracting the room's semantic content. However, in a special case, where a room area is too tiny to display the room number (Figure 13a, "49" in Case 1), our system cannot properly segment and identify it, which is the main drawback of our approach in such a circumstance. However, after further investigation, we discovered that nearly all of the plan's room numbers are included in the room area. Since Case 1 accounts for less than 5% of all rooms, our approach is effective in the majority of them. Furthermore, if the position of the room number and other irrelevant characters is close (Figure 13b, "C06" and "&" in Case 2), the OCR system will recognize the irrelevant characters and the room number as a string, and the "& C06" in Case 2 cannot be retrieved in the directory; thus, it cannot be successfully matched. In essence, this issue is still caused by OCR recognition errors, as it is easy for OCR to recognize characters that are close together. Case 2 may exist if two room numbers are present in the same room, although this only accounts for a minor fraction of the overall picture.
Finally, we presented the plan with the lowest precision in the dataset (Figure 13c, Case 3). The challenge of this plan is that it has numerous lines, many invalid regions, and the room number is contained in a circle, all of which make the OCR system's recognition more difficult. Furthermore, the number's location is quite close to the room's edge, making room segmentation more difficult. Despite this, our algorithm detected 46 rooms (out of a total of 67) with a total accuracy of 68.65%. Our algorithm still needs to be developed to increase the detection accuracy of complex images and to adapt to more special circumstances (such as most numbers being outside the room) in order to tackle the challenges mentioned above. The recognition accuracy of the system's OCR module has the largest effect on the overall system's recognition accuracy. Follow-up research should examine better OCR technology to enhance the mall plan's overall accuracy.
1 Figure 13. Special case analysis. (a) represents the room number outside the room. (b) represents that the room number that is connected with irrelevant characters. (c) represents the plan with the lowest accuracy in the dataset, and the purple area represents the rooms successfully segmented and identified.

Conclusions
We proposed a comprehensive method for automated room segmentation and recognition, based on a shopping mall plan, to obtain the location and semantic information of each room, which can aid indoor robot navigation, building area and location analysis, and three-dimensional reconstruction. To extract and identify the room information, the system employs a number of structural and semantic analysis modules. The matching text is first collected from the directory. The mall plan map is then preprocessed, and the binary map is utilized for the two-stage region growing method to produce each segmented region, which information is then provided to the OCR system for identification to obtain the room number corresponding to the region. Finally, the matching text is retrieved to obtain the region information so as to obtain the high-precision automatic segmentation and recognition system. According to the results of the experiments, our method is capable of accurately segmenting and identifying each room; however, it does have some limitations. As a result, we will concentrate on algorithm improvement and detailed processing in the future to make the approach more practical.

Conflicts of Interest:
The authors declare no conflict of interest.