A text layout image recognition system for publishing printed teaching materials
By employing technologies such as synchronous acquisition, illumination feature analysis, brightness anomaly detection, and dynamic light source compensation, the problem of paragraph miscutting caused by fluctuations in the scanning light source has been solved. This has enabled stable illumination and accurate identification and reconstruction of the layout structure, thereby improving the digital processing quality of published and printed textbooks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YUNNAN XINHUA PRINTING PLANT NO 2 CO LTD
- Filing Date
- 2026-03-23
- Publication Date
- 2026-06-19
AI Technical Summary
In existing technologies, scanning light sources are susceptible to current fluctuations during long-term operation, causing flickering light intensity, resulting in sudden changes in the brightness of the scanned image, miscutting paragraphs, and damaging the layout structure of the textbook text, thus affecting the accuracy of digital processing.
By using the acquisition synchronization module, illumination feature analysis module, brightness anomaly detection module, and paragraph reorganization and repair module, a record of illumination changes and a list of paragraph miscuts are generated. Combined with the dynamic light source compensation module, the working rhythm of the scanning light source is adjusted, reverse illumination compensation and short-term shading control are performed, the scanning sampling interval is optimized, and the true boundaries of text line spacing are restored.
It achieves quantitative elimination of the impact of light fluctuations, ensures stable page imaging brightness, natural brightness transition between text lines, improves the integrity of layout structure recognition and the accuracy of page reconstruction, and guarantees the logical continuity of text content and the consistency of spatial hierarchy.
Smart Images

Figure CN122244871A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the relevant technical field, and in particular to a text layout image recognition system for publishing and printing textbooks. Background Technology
[0002] The text layout image recognition system for printed textbooks is a comprehensive processing system combining image recognition, text analysis, and intelligent layout reconstruction technologies, specifically designed for the digitization and intelligent proofreading of printed textbooks. This system acquires images of printed textbook pages using a high-precision image acquisition device, automatically separates layout elements such as body text, titles, page numbers, tables, and illustrations using deep learning text recognition algorithms, and reconstructs the original layout logic through a layout structure analysis model. During the recognition process, the system not only extracts character content but also simultaneously extracts layout parameters such as character spacing, paragraph hierarchy, and row / column alignment, generating editable digital documents or publishing templates, thus achieving automated conversion from image-based textbooks to typesetting electronic textbooks. This system is widely used in textbook reprints, digitization of old books, intelligent proofreading, and the digitization of educational publishing data resources, representing a typical application of artificial intelligence in the printing and publishing industry.
[0003] Existing technologies have the following shortcomings: In existing technologies, the scanning light source is susceptible to current fluctuations during long-term operation, causing periodic flickering of the light intensity and resulting in brightness jumps between adjacent lines in the scanned image. Since text layout image recognition algorithms typically rely on brightness changes to determine line spacing and paragraph separation, these brightness jumps can easily be misinterpreted as genuine dividing lines, thus incorrectly segmenting originally continuous paragraphs into multiple independent segments. This missegmentation problem not only disrupts the layout structure of the textbook text but also causes disordered text logic and confusion of paragraph hierarchy, further affecting the accuracy of subsequent layout reconstruction and semantic recognition, and seriously interfering with the digitization of printed textbooks. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a text layout image recognition system for publishing and printing textbooks.
[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is: a text layout image recognition system for publishing and printing textbooks, comprising a data acquisition synchronization module, an illumination feature analysis module, a brightness anomaly detection module, a paragraph recombination and repair module, and a light source dynamic compensation module.
[0006] The acquisition synchronization module acquires the light source current waveform, scanning light intensity changes, page line spacing marks and imaging clock information during the text layout image recognition process, and generates an acquisition draft containing a complete scanning time series, which is used to establish a time reference for illumination stability analysis.
[0007] The illumination feature analysis module extracts the time correspondence between light intensity fluctuations and current fluctuations based on the collected manuscript, generates a record of illumination changes, and outputs a brightness fluctuation index, providing illumination interference feature basis for the text layout and image recognition stage.
[0008] The brightness anomaly detection module detects abnormal brightness areas between adjacent text lines based on the brightness fluctuation index, determines the location of suspected dividing lines, generates a list of paragraph missegments, and provides positional reference information for the logical reorganization of text layout.
[0009] The paragraph reorganization and repair module compares the continuity of text content with the list of paragraph miscuts, aligns the miscut positions in time and space, generates a paragraph misalignment diagram and forms a repair rhythm draft, and provides a dynamic recovery reference for lighting compensation control.
[0010] The dynamic light source compensation module adjusts the working rhythm of the scanning light source based on the repair rhythm draft. During the text layout image recognition process, it performs reverse illumination compensation and short-term shading control. By adjusting the rhythm of light source brightness changes, it reduces flicker interference and simultaneously optimizes the scanning sampling interval to restore the true boundary of text line spacing, thus achieving continuous layout recognition and accurate page reconstruction.
[0011] Preferably, the steps for generating the collected draft are as follows:
[0012] In the process of text layout image recognition, a time synchronization environment is established, and the light source driving signal, scanning motion control signal and imaging clock signal are triggered in a unified manner. The time zero point is taken as the moment when the light source is powered on, and the light source current waveform is recorded at a fixed sampling interval.
[0013] During the recording process, the current sampling points are correlated with the scanning motion control signal and the imaging clock signal to form a time mapping between the light source energy output and the scanning position;
[0014] Synchronously collect changes in scanning light intensity and match them one-to-one with the current waveform; set page line spacing markers to record the brightness distribution of text lines.
[0015] The light source current waveform, scanning light intensity changes, page line spacing marks, and imaging clock information are integrated according to the imaging time sequence to generate a complete time-series acquisition draft containing light source energy, page brightness, and text line spacing.
[0016] Preferably, the brightness fluctuation index output steps are as follows:
[0017] After generating the acquisition data, the time reference is unified by processing the light source current waveform data and the scanning light intensity change data. The current sampling point and the light intensity sampling point are matched on the same time axis with the imaging clock trigger signal as the time axis.
[0018] When establishing the time correspondence, the light intensity change range is extracted according to the rising, stabilizing and falling phases of the current waveform, and the light intensity change value, duration and corresponding current sampling value are recorded.
[0019] Once time synchronization is complete, a record of light changes is generated, combining light intensity change data, current fluctuation data, and page brightness data to form a time series.
[0020] When generating the illumination change record, the brightness fluctuation index is extracted from the record, the amplitude of the light source current fluctuation, the amplitude of illumination change and the imaging clock time are recorded, the illumination fluctuation feature distribution is established and the illumination interference feature basis is output.
[0021] Preferably, when extracting the brightness fluctuation index, the brightness fluctuation index points are arranged in the order of the page scanning path, and the amplitude of the light source current fluctuation, the magnitude of the illumination change, and the imaging clock time are synchronously associated to form a continuous time series of illumination fluctuations. The time interval between adjacent brightness fluctuation index points is then correlated with the line spacing of the page text to establish a time correspondence between illumination changes and page structure.
[0022] Preferably, the steps for generating the paragraph missegmentation list are as follows:
[0023] When extracting the brightness fluctuation index, the data of adjacent text lines in the page image are synchronized in time and space. The time nodes of the brightness fluctuation index are matched with the brightness curves of each line point by point to form a continuous brightness correspondence sequence.
[0024] When time and space are synchronized, the brightness difference between adjacent text lines is compared in chronological order to extract continuous brightness change intervals and record the characteristics of light fluctuation interference.
[0025] When identifying abnormal brightness intervals, the time period is mapped to page space coordinates, and the position of the center line of the abnormal area is determined based on the extreme value of the brightness difference, and the suspected dividing line landing point is generated.
[0026] When locating suspected dividing lines, the landing points that are continuous in time and adjacent in space are classified and organized to form a list of paragraph erroneous segments that includes page number, line number range, brightness range and time range.
[0027] Preferably, when generating the list of incorrectly segmented paragraphs, the time marker, vertical coordinate position, brightness difference value and text line number of the suspected dividing line landing point are associated, arranged according to the scanning order and vertical position of the page, and the spatial range of consecutive landing points are merged to generate a record of incorrectly segmented paragraphs with temporal continuity and spatial correspondence, which is used for subsequent paragraph logical comparison and position reference.
[0028] Preferably, the steps for creating a revised rhythmic draft are as follows:
[0029] When obtaining the list of incorrectly segmented paragraphs, the text content of each incorrectly segmented area is continuously identified. Adjacent text segments are compared based on font shape, character spacing, indentation ratio, and line alignment to determine the logical interruption position of the text and its correspondence with the illumination fluctuation range.
[0030] When determining logical continuity, the imaging clock time is used as a reference to match and arrange the start and end times of the erroneous cut area to form a time sequence of logical breaks in the segment.
[0031] When establishing the time series, the spatial location of the miscut area is mapped to the page coordinates, and the line number, vertical coordinate and brightness change range are marked to generate a paragraph misalignment diagram;
[0032] When the paragraph misalignment diagram is formed, a repair rhythm draft is generated by combining the time nodes of light fluctuations, and the synchronization relationship between the logical recovery nodes and light fluctuations is recorded to provide a dynamic recovery reference for light compensation control.
[0033] Preferably, the steps for adjusting the scanning light source's working rhythm based on the repaired draft, performing reverse illumination compensation and short-term shading control, and simultaneously optimizing the scanning sampling interval to restore the true boundaries of text line spacing are as follows:
[0034] When the rhythm draft is being repaired, the time nodes of light fluctuation, paragraph logic recovery points, text line range, page vertical coordinates and light intensity change parameters are read to establish the working sequence of the scanning light source and correspond the time of light source brightness change with the page scanning path position.
[0035] When establishing the light source timing, reverse illumination compensation is performed based on the direction and amplitude of illumination fluctuations. The light source output is reduced during the brightness increase phase and increased during the brightness decrease phase, while maintaining a smooth brightness curve.
[0036] When reverse lighting compensation is executed, short-term shading control is triggered based on the peak time of light fluctuation, and the output intensity of the light source is adjusted to maintain the balance of page illuminance.
[0037] Once the shading control is complete, the scanning sampling interval is optimized based on the time nodes of the repaired draft, so that the sampling trigger time corresponds to the light source brightness cycle, restoring the true boundary of text line spacing and maintaining the continuity of typesetting.
[0038] The beneficial effects of this invention are:
[0039] This invention achieves precise correspondence between light source brightness changes and scanning sequence by introducing synchronous acquisition of illumination and current, along with illumination feature analysis, during the text layout image recognition process. This quantifies and effectively eliminates the impact of illumination fluctuations in the scanned image. By establishing a record of illumination changes and an index of brightness fluctuations, it can identify illumination interference features in real time and dynamically correct brightness jumps, thereby ensuring stable brightness distribution in page imaging and natural brightness transitions between text lines. This maintains the continuity of the image recognition process, solves the problem of paragraph missegmentation caused by unstable illumination, and significantly improves the completeness of layout structure recognition and the accuracy of text content extraction.
[0040] This invention utilizes the synergistic effect of paragraph reconstruction and repair with dynamic light source compensation to synchronize the brightness adjustment of the scanning light source with the paragraph logic restoration, forming a closed-loop control mechanism from illumination detection to page reconstruction. Through precise coordination of reverse illumination compensation and short-term shading control, light flicker interference is suppressed during scanning. Combined with adaptive optimization of the scanning sampling interval, it ensures accurate restoration of text line spacing boundaries. This solution not only improves the continuity of typesetting recognition but also guarantees the consistency of page reconstruction with the original printed textbook in terms of spatial hierarchy and content logic. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of a text layout image recognition system for publishing and printing textbooks according to the present invention. Detailed Implementation
[0042] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings. It should be noted that these descriptions are for the purpose of aiding understanding the present invention, but do not constitute a limitation thereof. Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0043] This invention provides, for example Figure 1 The illustrated text layout image recognition system for publishing and printing textbooks includes a data acquisition synchronization module, an illumination feature analysis module, a brightness anomaly detection module, a paragraph recombination and repair module, and a light source dynamic compensation module.
[0044] The acquisition synchronization module acquires the light source current waveform, scanning light intensity changes, page line spacing marks and imaging clock information during the text layout image recognition process, and generates an acquisition draft containing a complete scanning time series, which is used to establish a time reference for illumination stability analysis.
[0045] In the process of text layout image recognition, in order to ensure that the light source current waveform, scanning light intensity changes, page line spacing marks, and imaging clock information can be completely recorded under a unified time reference, thereby providing a sufficient data foundation for illumination stability analysis, the specific implementation steps are as follows:
[0046] Before scanning begins, a time synchronization environment is established and initialized to ensure that the light source drive signal, scanning motion control signal, and imaging clock signal are triggered uniformly under the same time reference. Upon scanning startup, the initial power-on time of the light source is set as time zero, and from this point onwards, the light source current waveform is continuously recorded at fixed sampling intervals. During recording, each current sampling point corresponds to the scanning motion control signal, ensuring that changes in light source energy output are synchronized with the scanning position. Simultaneously, as the scanning head moves along the page, the imaging clock trigger signal is time-matched with the current sampling points, ensuring that each imaging exposure precisely corresponds to the light source output state. This synchronous acquisition method establishes a consistent time mapping between the current waveform, scanning motion, and imaging clock, providing a complete time frame for subsequent illumination intensity recording.
[0047] After establishing a time reference, changes in scanning light intensity are synchronously acquired. As the scanning head moves along the page, it senses changes in the reflected light intensity from the page surface using photosensitive elements, and establishes a one-to-one correspondence between the light intensity value at each time point and the current waveform sampling point obtained in the previous step. To ensure that the acquired light intensity changes are correlated with the page structure, line spacing markers are preset along the scanning path according to the page content layout format to identify the vertical spacing and brightness distribution within each line of text. During scanning, the start and end positions, average brightness within the line, local brightness fluctuations, and interval values between adjacent lines of each line of text are recorded and synchronized with the imaging clock trigger signal. This synchronization method ensures that the light source current output, page reflected brightness, line spacing distribution, and imaging timing maintain a consistent relationship in the time dimension. All light intensity change data correspond to the light source current waveform and scanning position signal, thereby constructing a time mapping relationship between the light source output and page brightness.
[0048] After acquiring data on light intensity changes and line spacing markings, the light source current waveform, scanning light intensity changes, page line spacing markings, and imaging clock information are integrated to form a complete dataset with a dual temporal and spatial correspondence. In this process, the imaging clock signal serves as the core time axis, matching each sampling point of the current waveform with its corresponding light intensity sampling point. This ensures that each imaging time interval includes information on the light source energy state, page reflectivity, and text line spacing. During the scanning head's movement, when a line of text is scanned and the next line begins, the clock signal indicating the end of the current line and the clock signal indicating the start of the next line are recorded. The interval between these two time points is used as the time span for the page line spacing, and the continuity of light intensity changes is simultaneously marked. By continuously recording the end time of each line of text and the start time of the next line, a complete line spacing change curve can be formed, ensuring the continuity of the light source energy state, page reflectivity characteristics, and text layout structure in the scanning process over time. The final acquired data draft contains each data record with a light source current sampling value, the corresponding light intensity value, page line spacing parameters, and the precise time point of the imaging clock.
[0049] All acquired data were chronologically organized and integrated to create a continuous record of light source current waveforms, illumination intensity changes, page line spacing markers, and imaging clock information within a time frame. During the organization process, the current waveform data and illumination intensity sampling values were arranged chronologically, based on the trigger sequence of the imaging clock, ensuring a complete correspondence between the light source state, illumination intensity, and page line spacing information for each frame. This integration method creates a continuous trajectory of light source energy changes and page reflectance brightness within the acquired document, preserving the temporal regularity of illumination changes throughout the scanning process. After time-series organization, the acquired document contains not only the complete curve of the light source current waveform but also the illumination intensity data, line spacing marker data, and imaging clock information corresponding to each moment, thus achieving a unified correspondence between illumination changes, scanning motion, and imaging exposure in the time dimension. This acquired document comprehensively reflects the correspondence between light source current fluctuations, illumination intensity changes, page line spacing structure, and imaging timing, providing a complete temporal reference basis for illumination stability analysis and providing ample data support for subsequent analysis of illumination change characteristics and layout structure reconstruction in text layout image recognition.
[0050] The illumination feature analysis module extracts the time correspondence between light intensity fluctuations and current fluctuations based on the collected manuscript, generates a record of illumination changes, and outputs a brightness fluctuation index, providing illumination interference feature basis for the text layout and image recognition stage.
[0051] To ensure that the change in light intensity corresponds to the fluctuation in the light source current over time, and to fully express the characteristics of light change over time and create a record of light change, the specific implementation steps are as follows:
[0052] After generating the acquisition draft, the light source current waveform data and scanning light intensity change data in the draft are processed to unify the time reference. Using the imaging clock trigger signal recorded in the acquisition draft as the time axis, the sampling points of the light source current waveform are rearranged according to chronological order, and the sampling points of the scanning light intensity change are matched according to the trigger order of the imaging clock. In this way, the current fluctuation curve and the light intensity change curve maintain a correspondence on the same time axis. To ensure the continuity of time correspondence, the imaging clock trigger interval is checked frame by frame to ensure that each current sampling point corresponds to a light intensity sampling point within the same time period. When the scanning light source is powered on, the changes in the current waveform are continuously recorded, and the changes in the light intensity of the reflected light from the page are synchronously captured, ensuring that the trajectory of light intensity change is consistent with the process of light source energy output change. Through this time matching method, a precise one-to-one correspondence is established between the current waveform and the light intensity change, providing a basic time reference for the generation of subsequent light intensity change records.
[0053] After establishing the time correspondence, a detailed analysis of the fluctuations in light intensity within each time period is performed to ensure that changes in light intensity comprehensively reflect the dynamic changes in current fluctuations. Using the time axis as the core reference, the rising, stable, and falling phases of the light source current waveform are matched segment by segment with the corresponding light intensity variation intervals within each time period. For the rising phase of the current waveform, the corresponding brightening intervals in the light intensity variation are extracted, and the process of light intensity change from its initial value to its peak and its duration are recorded. For the stable phase of the current waveform, the time period during which the light intensity remains stable and its average brightness level are recorded. For the falling phase of the current waveform, the trajectory of light intensity change from its peak to its final value is recorded. Through this continuous time-segment matching method, a precise mapping relationship between light intensity and current fluctuations can be established. Simultaneously, the start time, end time, light source current sampling value, and light intensity change value of each time period are recorded and arranged sequentially according to the imaging clock trigger order, ensuring strict consistency between light source energy changes, light intensity fluctuations, and imaging time.
[0054] After synchronizing the time of light intensity changes and current fluctuations, a light change log is generated to comprehensively describe the temporal pattern of light changes during the scanning process. The light change log uses the imaging clock as a time index, combining light intensity change data, current fluctuation data, and page reflectivity data for each time interval to form a complete time series of light changes. Each line of data in the log includes the imaging clock trigger time, current sampling value, light intensity value, and direction of light change. For peaks in the light source current waveform, the corresponding peak light intensity and its occurrence time are recorded; for troughs in the current waveform, the corresponding minimum light intensity and its occurrence time are recorded; for continuously changing intervals in the current waveform, the amplitude and duration of the light intensity change are recorded. In this way, the light change log can completely reflect the correspondence between light source current fluctuations and page light changes, allowing the temporal pattern of light changes to be continuously expressed in the log. During the recording process, the consistency of the time sequence is maintained to ensure that the light source state, page brightness state, and direction of light change at each imaging moment are completely preserved.
[0055] After the illumination change log is generated, a brightness fluctuation index is extracted from it to describe the key temporal characteristics of illumination changes. Based on the time series in the illumination change log, the brightness fluctuation index extracts and calibrates comprehensive information on the rate of light intensity change, current fluctuation frequency, and duration of illumination changes within continuous time periods. Each brightness fluctuation index point includes the amplitude of the light source current fluctuation, the corresponding illumination change amplitude, and the trigger time of the imaging clock, thus establishing a characteristic distribution of illumination fluctuations in the time dimension. During the extraction process, the start and end points of light intensity changes in the illumination change log are first determined, and then each brightness change stage is identified in chronological order to ensure that the illumination fluctuation index accurately reflects the trend of light intensity change over time. For multiple brightness fluctuation index points in the same scanning path, they are arranged according to the page structure order so that the temporal distribution of illumination interference corresponds to the layout logic of the page text. The completed illumination change log contains complete current waveform data, light intensity change data, imaging clock information, and a brightness fluctuation index, providing a temporal characteristic basis for illumination interference in the text layout and image recognition stage. Through this continuous process of extraction, matching, recording, and organization, the dynamic correspondence between light intensity fluctuations and current fluctuations can be fully reflected in the time dimension, enabling the light change record to have a complete ability to express light changes, and providing reliable basic data for subsequent light interference analysis and layout structure restoration in text typesetting image recognition.
[0056] The brightness anomaly detection module detects abnormal brightness areas between adjacent text lines based on the brightness fluctuation index, determines the location of suspected dividing lines, generates a list of paragraph missegments, and provides positional reference information for the logical reorganization of text layout.
[0057] To accurately identify non-realistic segmentation lines caused by light source fluctuations under unstable lighting conditions, distinguish abnormal brightness areas from true paragraph boundaries, and provide accurate data for generating a list of incorrectly segmented paragraphs, brightness anomaly detection can be performed based on a brightness fluctuation index. The specific implementation steps are as follows:
[0058] After extracting the brightness fluctuation index, adjacent text lines in the page image are synchronized and aligned to ensure complete consistency between the temporal and spatial sequences. The text layout image is recorded during scanning according to a fixed line spacing order, and the brightness distribution data for each text line includes the trajectory of light intensity changes over time. To create a comparable analysis dataset, the time nodes recorded in the brightness fluctuation index are matched point-by-point with the brightness curve of each text line, ensuring a one-to-one correspondence between the brightness information at each time point and adjacent lines. Specifically, the brightness sampling points of the previous and next text lines are arranged according to the trigger time of the imaging clock, ensuring that the brightness data corresponding to the two text lines exist synchronously within the same time range. This dual temporal and spatial synchronization method forms a continuous brightness correspondence sequence, providing a foundation for subsequent brightness difference analysis. To prevent line spacing errors caused by page curvature or displacement during scanning, the page line spacing markers are jointly referenced with the imaging clock signal, ensuring that each pair of adjacent text lines maintains a strict vertical correspondence in spatial position, thereby guaranteeing spatial consistency in brightness difference calculation.
[0059] After achieving temporal and spatial synchronization, continuous analysis of brightness differences between adjacent text lines is performed to identify abnormal brightness changes caused by light source fluctuations. During the analysis, brightness sampling points of adjacent lines are compared point-by-point in chronological order, calculating the brightness difference between corresponding time points and recording the trend of these differences over time. When the lighting environment is stable, the brightness difference between adjacent text lines typically remains relatively flat, with fluctuations within a controllable range. However, when fluctuations in the light source current cause periodic flickering, the brightness difference between adjacent lines may exhibit significant abrupt changes within certain time periods—that is, the brightness of one line increases while the brightness of adjacent lines decreases, or vice versa. In such cases, these intervals of brightness abrupt changes are considered potential abnormal areas. To avoid interference from short-term noise, during the difference analysis, a sustained increase or decrease in brightness difference across three or more consecutive time points is used as a criterion to ensure that the identified brightness anomalies have continuous characteristics. This difference analysis generates a brightness difference change curve over time, clearly reflecting the interference trend of lighting fluctuations on the brightness distribution between adjacent lines.
[0060] After identifying the time intervals where brightness anomalies occur, these abnormal time periods are mapped to spatial coordinates on the page based on the scanning direction and the spatial position of the text lines to determine the actual location of the brightness anomaly area. Specifically, the start and end times of each abnormal time period are mapped to specific positions along the scanning path, and combined with the trigger information of the imaging clock, these time points are converted into coordinate values in the vertical direction of the page. The vertical coordinate range corresponding to each abnormal time period is the initial location range of the brightness anomaly area. During spatial mapping, the consistency between the scanning path and the page text layout direction is maintained, ensuring that the abnormal area accurately corresponds to the specific text line position. To refine the location of the abnormal area, the extreme points in the brightness difference curve are used as the center of the area, and their vertical position and line spacing ratio on the page are calculated to determine the centerline position of the abnormal area. This centerline position reflects the main area affected by brightness jumps caused by illumination fluctuations and can be considered as the landing point of a suspected dividing line. Each suspected dividing line landing point is accompanied by a time identifier, vertical coordinate position, brightness difference value, and corresponding text line number for subsequent analysis and reorganization of paragraph logic.
[0061] After spatially locating all suspected dividing line points, these points are organized and categorized to form a list of incorrectly segmented paragraphs. The generation of this list is based on a dual sorting principle of time and space, arranging all suspected dividing line points sequentially according to page scanning order and vertical position. During the organization process, multiple points that are temporally continuous and spatially adjacent are merged, serving as different reference points for the same incorrectly segmented paragraph area. The time range, spatial range, and corresponding line number of each area are recorded. When multiple incorrectly segmented areas exist on a page, they are sequentially numbered according to page order for later location retrieval during reconstruction. Each incorrectly segmented paragraph record includes the page number, line number range, abnormal brightness interval, time range, brightness difference magnitude, and suspected dividing line position. This list comprehensively reflects the distribution of non-realistic dividing lines caused by lighting fluctuations on the page, recorded in a dual coordinate system of time and space. The completed incorrectly segmented paragraph list can directly serve as the basic data source for the text layout logic reconstruction stage, used to determine which paragraphs are incorrectly segmented due to lighting interference and to provide positional references for the logical restoration of text content. Through this continuous process of alignment, analysis, positioning, and organization, the abnormal brightness variation caused by light fluctuations can be fully restored in both time and space dimensions. This allows the impact of light interference to be accurately depicted in a data-driven form, thus providing a complete foundation for paragraph recognition, line spacing restoration, and page structure reconstruction in the text typesetting image recognition process.
[0062] The paragraph reorganization and repair module compares the continuity of text content with the list of paragraph miscuts, aligns the miscut positions in time and space, generates a paragraph misalignment diagram and forms a repair rhythm draft, and provides a dynamic recovery reference for lighting compensation control.
[0063] To ensure the logical continuity of text content is restored even when paragraphs are mistakenly cut due to lighting fluctuations, and to realign paragraph structure, text order, and page layout hierarchy, while providing a dynamic reference for scanning rhythm adjustments during the lighting compensation phase, a list of mistakenly cut paragraphs can be used to compare the continuity of text content. The mistakenly cut locations can be aligned temporally and spatially, and this process generates a paragraph misalignment diagram and a revised rhythm draft. The specific implementation steps are as follows:
[0064] After obtaining the list of incorrectly segmented paragraphs, the text content of each incorrectly segmented area is continuously identified to determine the specific location where the text logic is interrupted and its preceding and following relationships. The list of incorrectly segmented paragraphs includes the time period of incorrect segmentation caused by lighting fluctuations, the vertical position of the page, and the corresponding text line range, thus allowing the extraction of text content from these areas from the original text image. During the extraction process, the text fragments before and after the incorrectly segmented area are compared, following the page scanning order. The comparison includes the font style, inline character spacing, indentation ratio of the first line of text, the blank space at the beginning and end of the paragraph, and the line alignment. By comparing these features, it can be determined whether adjacent text fragments belong to the same paragraph structure. When adjacent text fragments are consistent in line spacing continuity, character layout direction, text structure hierarchy, and visual alignment, it can be determined that these fragments should logically be a complete paragraph, only incorrectly segmented due to brightness anomalies caused by lighting fluctuations. After identifying logically continuous text fragments, they are mapped to the lighting fluctuation intervals in the incorrect segmentation list in the time dimension, ensuring that the logical break in the text content is consistent with the impact nodes of lighting changes. This process establishes a logical continuity in the text content, providing a clear basis for subsequent temporal and spatial alignment.
[0065] After determining the logical continuity of the text content, time alignment is performed on the erroneous cut locations to ensure that the logical break points of paragraphs correspond one-to-one with the illumination fluctuation nodes in the time dimension. Time alignment is based on the imaging clock times recorded in the paragraph erroneous cut list, matching the start and end times of each erroneous cut area with the timestamps of the text content. For erroneous cut areas of different paragraphs on the same page, they are arranged sequentially according to the imaging order, and the time interval between every two consecutive erroneous cut areas is recorded. To ensure the continuity of time correspondence, the start and end times of the text content are synchronized with the peak times of illumination fluctuations, ensuring that the logical break points of the text and the illumination change nodes are consistent on the time axis. When multiple erroneous cut areas occur in adjacent time periods, these time periods are merged into a continuous erroneous cut time interval, and its duration is marked on the time axis, thus obtaining a complete erroneous cut time sequence. After time alignment, each erroneous cut area has a unique start and end identifier on the time axis, ensuring that the logical break points of paragraphs are completely consistent with the order of occurrence of illumination fluctuations.
[0066] After time alignment, the spatial positions of the erroneously cut areas on the page are mapped to generate a paragraph misalignment diagram reflecting the logical misalignment of the text. During the mapping process, based on the page line numbers, vertical coordinates, and text area ranges recorded in the erroneous cut list, the positions of all erroneously cut paragraphs are redrawn in a unified spatial coordinate system according to the page layout direction. Each erroneously cut text segment is represented by a rectangular area in the misalignment diagram, with its vertical boundary corresponding to the page line number range and its horizontal boundary corresponding to the left and right layout widths of the paragraph. For text segments that logically belong to the same paragraph but are broken due to lighting fluctuations, they are connected by continuous line segments in the misalignment diagram to represent their logical continuity. Simultaneously, the brightness curve of the lighting fluctuations is superimposed on the misalignment diagram to reflect the correspondence between lighting changes and paragraph breaks. For each erroneously cut area, the starting line number, ending line number, page vertical coordinate position, time marker, and brightness change amplitude are marked in the misalignment diagram. Through this mapping method, the paragraph misalignment diagram can intuitively reflect the distribution of paragraph misalignment on the page and clearly show the corresponding characteristics between text logic and lighting fluctuations, providing a spatial reference basis for paragraph repair.
[0067] After generating the paragraph misalignment diagram, a repair rhythm draft is created based on the restoration order of text logic and the temporal characteristics of illumination fluctuations, providing a dynamic restoration reference for subsequent illumination compensation control. The repair rhythm draft is generated along a timeline, mapping the logical break information in the paragraph misalignment diagram to the time nodes of illumination fluctuations. Specifically, the start time, end time, spatial location, and peak illumination fluctuation time of each miscut paragraph are matched, recording the time interval between illumination changes and text logic restoration. Each record in the repair rhythm draft includes the page number, paragraph number, time range of the miscut area, time node of the logic restoration point, corresponding vertical coordinate position, and intensity change of illumination fluctuations. This method establishes a synchronous relationship between illumination changes and paragraph logic restoration over time. For multiple consecutive miscut paragraphs, their restoration nodes are arranged chronologically in the repair rhythm draft, matching the restoration rhythm of text logic with the rhythm of illumination changes, thus providing a clear dynamic adjustment reference for illumination compensation control. The final repair rhythm draft not only contains the sequence information of paragraph logic restoration but also the dynamic characteristics of illumination changes, providing a complete control basis for the illumination compensation stage. Through the aforementioned continuous steps of text content recognition, time alignment, spatial mapping, and rhythm formation, the logical continuity of text content can be restored in both time and space dimensions. This establishes a correspondence between the logical relationships of paragraph structures and the changing patterns of illumination fluctuations, thereby providing a unified data reference for illumination adjustment and paragraph reorganization in text layout image recognition, ensuring the continuity of text recognition and the accuracy of page reconstruction.
[0068] The dynamic light source compensation module adjusts the working rhythm of the scanning light source based on the repair rhythm draft. During the text layout image recognition process, it performs reverse illumination compensation and short-term shading control. By adjusting the rhythm of light source brightness changes, it reduces flicker interference and simultaneously optimizes the scanning sampling interval to restore the true boundary of text line spacing, thus achieving continuous layout recognition and accurate page reconstruction.
[0069] To eliminate periodic brightness variations caused by current fluctuations during light source operation, ensure stable output from the scanning light source, and maintain consistent line spacing with the actual layout structure during page scanning, the operating rhythm of the scanning light source can be adjusted based on the revised draft. This allows for reverse illumination compensation and short-term shading control during scanning, and optimization of the sampling interval during scanning motion, achieving stable illumination, accurate line spacing, and continuous page structure. The specific implementation steps are as follows:
[0070] After the restoration rhythm draft is created, the recorded time nodes of illumination fluctuations, paragraph logic restoration points, text line ranges, page vertical coordinates, and illumination intensity change parameters are read from the restoration rhythm draft, and a time sequence for the scanning light source's operation is established accordingly. Each record in the restoration rhythm draft reflects the specific time of illumination fluctuation, the corresponding page area position, and the restoration order of text paragraphs. To ensure that the light source operation process is synchronized with the text logic restoration, the time sequence in the restoration rhythm draft is imported into the light source control flow according to the page scanning direction and imaging order. Based on this, a light source operation rhythm table is established, mapping the time points of light source brightness changes to their spatial positions on the page scanning path. Each rhythm node corresponds to a scanning area, recording the start and end times of illumination adjustment and the target brightness value for that area. The light source's start time is referenced to the imaging clock trigger signal, ensuring that the light source output rhythm is synchronized with the movement of the scanning head, thus forming a dynamic time correspondence between the scanning light source and the page line spacing. In this way, a unified time control benchmark can be provided for light source brightness changes, enabling the illumination adjustment process to accurately correspond to the arrangement position of text lines.
[0071] After the light source timing sequence is established, reverse illumination compensation is performed on the scanning light source based on the direction and amplitude of illumination fluctuations recorded in the restoration template to counteract illumination fluctuations caused by current fluctuations. The execution of reverse illumination compensation is based on the illumination fluctuation curve in the restoration template. When illumination fluctuations manifest as an increase in brightness, the light source output gradually decreases in brightness within the corresponding time period to maintain the page's reflected light intensity within a stable range. When illumination fluctuations manifest as a decrease in brightness, the light source output gradually increases in brightness within the same time period to maintain constant page illuminance. During the reverse illumination compensation process, the start time of each brightness change is synchronously calibrated with the scanning head's movement trajectory, ensuring that each stage of light source brightness adjustment corresponds to a specific position on the page. To ensure the continuity of brightness compensation, transition periods are inserted between the rising and falling intervals of illumination changes, creating a smooth curve for light source brightness changes and avoiding uneven local exposure caused by sudden brightness changes. Through this continuous compensation process, the light source output can maintain a stable state matching the page's reflected brightness throughout the entire scanning cycle, eliminating the impact of illumination fluctuations on text recognition.
[0072] While performing reverse illumination compensation, a short-term shading control is applied to the scanning light source to ensure a smooth transition during peak illumination fluctuations, preventing uneven imaging brightness caused by excessive or insufficient illumination. The trigger time for the short-term shading control is referenced to the peak illumination fluctuation time recorded in the repair rhythm document. When the illumination fluctuation reaches its peak or trough, the light source output intensity is briefly reduced to maintain a relatively balanced illumination in the imaging area at the critical moment of the fluctuation. The duration of the shading control is dynamically adjusted according to the illumination fluctuation cycle to match the shading period with the fluctuation duration. During the shading period, the scanning motion speed is kept constant to prevent interference with the scanning process. To prevent localized underexposure of the page during the shading phase, the light source brightness is gradually restored after the shading ends, returning the page illumination to a normal level. Throughout the shading process, the changes in light source brightness are synchronized with the trigger frequency of the imaging clock, ensuring that each shading operation is consistent with the scanning acquisition rhythm. This short-term shading method effectively eliminates instantaneous illumination jumps caused by light source brightness fluctuations, resulting in a smooth brightness transition between text lines on the page, thereby preventing false dividing lines during subsequent text layout and recognition.
[0073] After completing light source brightness compensation and short-term shading control, the scanning sampling interval was optimized to restore the true boundaries of text line spacing and maintain the continuity of the layout structure. The sampling interval optimization was based on the time nodes in the revised draft, corresponding the trigger time of scanning sampling to the light source brightness change cycle. When the light fluctuation frequency was high, the time interval between adjacent sampling points was shortened, making the scanning data more concentrated within the brightness change range, thus accurately capturing subtle brightness differences during the light change process. When the light fluctuation frequency was slowed down, the sampling interval was extended, allowing the collected data to cover the entire light change cycle, ensuring stable and continuous sampling results. During the sampling interval adjustment, the imaging clock was used as the timeline, maintaining a constant scanning speed and ensuring a fixed ratio between the spatial movement of the scanning path and the sampling time interval. This ensured that the spatial and temporal accuracy of the page scanning remained consistent under the same benchmark. The optimized sampling interval ensured that the brightness differences between text lines were fully recorded, the boundary transitions of each line of text were natural, and the line spacing remained consistent, thus restoring the true layout structure. Throughout the scanning process, the adjustment of light source brightness, the execution of short-term shading, and the optimization of sampling intervals work together to ensure balanced page illumination, clear text outlines, accurate line spacing, and continuous paragraphs, providing a stable foundation for page reconstruction.
[0074] This invention achieves precise correspondence between light source brightness changes and scanning sequence by introducing synchronous acquisition of illumination and current, along with illumination feature analysis, during the text layout image recognition process. This quantifies and effectively eliminates the impact of illumination fluctuations in the scanned image. By establishing a record of illumination changes and an index of brightness fluctuations, it can identify illumination interference features in real time and dynamically correct brightness jumps, thereby ensuring stable brightness distribution in page imaging and natural brightness transitions between text lines. This maintains the continuity of the image recognition process, solves the problem of paragraph missegmentation caused by unstable illumination, and significantly improves the completeness of layout structure recognition and the accuracy of text content extraction.
[0075] This invention utilizes the synergistic effect of paragraph reconstruction and repair with dynamic light source compensation to synchronize the brightness adjustment of the scanning light source with the paragraph logic restoration, forming a closed-loop control mechanism from illumination detection to page reconstruction. Through precise coordination of reverse illumination compensation and short-term shading control, light flicker interference is suppressed during scanning. Combined with adaptive optimization of the scanning sampling interval, it ensures accurate restoration of text line spacing boundaries. This solution not only improves the continuity of typesetting recognition but also guarantees the consistency of page reconstruction with the original printed textbook in terms of spatial hierarchy and content logic.
[0076] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and these variations still fall within the protection scope of the present invention.
Claims
1. A text layout image recognition system for publishing printed teaching materials, characterized by, It includes a data acquisition synchronization module, an illumination feature analysis module, a brightness anomaly detection module, a paragraph reconstruction and repair module, and a light source dynamic compensation module. The acquisition synchronization module acquires the light source current waveform, scanning light intensity changes, page line spacing marks and imaging clock information during the text layout image recognition process, and generates an acquisition draft containing a complete scanning time sequence. The illumination feature analysis module extracts the time correspondence between light intensity fluctuations and current fluctuations based on the collected data, generates an illumination change record, and outputs a brightness fluctuation index. The brightness anomaly detection module detects areas of abnormal brightness between adjacent text lines based on the brightness fluctuation index, determines the location of suspected dividing lines, and generates a list of paragraph missegments. The paragraph reorganization and repair module compares the continuity of text content with the list of paragraph miscuts, aligns the miscut positions in time and space, generates a paragraph misalignment diagram, and forms a repair rhythm draft. The dynamic light source compensation module adjusts the working rhythm of the scanning light source based on the repaired rhythm draft. During the text layout image recognition process, it performs reverse illumination compensation and short-term shading control. By adjusting the rhythm of light source brightness changes, it reduces flicker interference and simultaneously optimizes the scanning sampling interval to restore the true boundary of text line spacing.
2. A text layout image recognition system for publishing printed teaching materials according to claim 1, wherein, The steps to generate a collected draft are as follows: In the process of text layout image recognition, a time synchronization environment is established, and the light source driving signal, scanning motion control signal and imaging clock signal are triggered in a unified manner. The time zero point is taken as the moment when the light source is powered on, and the light source current waveform is recorded at a fixed sampling interval. During the recording process, the current sampling points are correlated with the scanning motion control signal and the imaging clock signal to form a time mapping between the light source energy output and the scanning position; Synchronously collect changes in scanning light intensity and match them one-to-one with the current waveform; set page line spacing markers to record the brightness distribution of text lines. The light source current waveform, scanning light intensity changes, page line spacing marks, and imaging clock information are integrated according to the imaging time sequence to generate a complete time-series acquisition draft containing light source energy, page brightness, and text line spacing.
3. A text layout image recognition system for published and printed textbooks according to claim 2, characterized in that, The steps for outputting the brightness fluctuation index are as follows: After generating the acquisition data, the time reference is unified by processing the light source current waveform data and the scanning light intensity change data. The current sampling point and the light intensity sampling point are matched on the same time axis with the imaging clock trigger signal as the time axis. When establishing the time correspondence, the light intensity change range is extracted according to the rising, stabilizing and falling phases of the current waveform, and the light intensity change value, duration and corresponding current sampling value are recorded. Once time synchronization is complete, a record of light changes is generated, combining light intensity change data, current fluctuation data, and page brightness data to form a time series. When generating the illumination change record, the brightness fluctuation index is extracted from the record, the amplitude of the light source current fluctuation, the amplitude of illumination change and the imaging clock time are recorded, the illumination fluctuation feature distribution is established and the illumination interference feature basis is output.
4. A text layout image recognition system for published and printed textbooks according to claim 3, characterized in that, When extracting the brightness fluctuation index, the brightness fluctuation index points are arranged in the order of the page scanning path. The amplitude of the light source current fluctuation, the magnitude of the illumination change, and the imaging clock time are synchronously associated to form a continuous time series of illumination fluctuations. The time interval between adjacent brightness fluctuation index points is also associated with the line spacing of the text on the page to establish a time correspondence between illumination changes and page structure.
5. A text layout image recognition system for published and printed textbooks according to claim 3, characterized in that, The steps to generate a list of incorrectly segmented paragraphs are as follows: When extracting the brightness fluctuation index, the data of adjacent text lines in the page image are synchronized in time and space. The time nodes of the brightness fluctuation index are matched with the brightness curves of each line point by point to form a continuous brightness correspondence sequence. When time and space are synchronized, the brightness difference between adjacent text lines is compared in chronological order to extract continuous brightness change intervals and record the characteristics of light fluctuation interference. When identifying abnormal brightness intervals, the time period is mapped to page space coordinates, and the position of the center line of the abnormal area is determined based on the extreme value of the brightness difference, and the suspected dividing line landing point is generated. When locating suspected dividing lines, the landing points that are continuous in time and adjacent in space are classified and organized to form a list of paragraph erroneous segments that includes page number, line number range, brightness range and time range.
6. A text layout image recognition system for published and printed textbooks according to claim 5, characterized in that, When generating a list of incorrectly segmented paragraphs, the time stamp, vertical coordinate position, brightness difference value, and text line number of the suspected dividing line landing point are associated, arranged according to the scanning order and vertical position of the page, and the spatial range of consecutive landing points is merged to generate a record of incorrectly segmented paragraphs with temporal continuity and spatial correspondence, which is used for subsequent paragraph logical comparison and position reference.
7. A text layout image recognition system for published and printed textbooks according to claim 5, characterized in that, The steps for creating a revised rhythm draft are as follows: When obtaining the list of incorrectly segmented paragraphs, the text content of each incorrectly segmented area is continuously identified. Adjacent text segments are compared based on font shape, character spacing, indentation ratio, and line alignment to determine the logical interruption position of the text and its correspondence with the illumination fluctuation range. When determining logical continuity, the imaging clock time is used as a reference to match and arrange the start and end times of the erroneous cut area to form a time sequence of logical breaks in the segment. When establishing the time series, the spatial location of the miscut area is mapped to the page coordinates, and the line number, vertical coordinate and brightness change range are marked to generate a paragraph misalignment diagram; When the paragraph misalignment diagram is formed, a repair rhythm draft is generated by combining the time nodes of light fluctuations, and the synchronization relationship between the logical recovery nodes and light fluctuations is recorded to provide a dynamic recovery reference for light compensation control.
8. A text layout image recognition system for published and printed textbooks according to claim 7, characterized in that, The steps are as follows: Based on the revised draft, the scanning light source's working rhythm is adjusted, reverse illumination compensation and short-term shading control are performed, and the scanning sampling interval is simultaneously optimized to restore the true boundary of text line spacing: When the rhythm draft is being repaired, the time nodes of light fluctuation, paragraph logic recovery points, text line range, page vertical coordinates and light intensity change parameters are read to establish the working sequence of the scanning light source and correspond the time of light source brightness change with the page scanning path position. When establishing the light source timing, reverse illumination compensation is performed based on the direction and amplitude of illumination fluctuations. The light source output is reduced during the brightness increase phase and increased during the brightness decrease phase, while maintaining a smooth brightness curve. When reverse lighting compensation is executed, short-term shading control is triggered based on the peak time of light fluctuation, and the output intensity of the light source is adjusted to maintain the balance of page illuminance. Once the shading control is complete, the scanning sampling interval is optimized based on the time nodes of the repaired draft, so that the sampling trigger time corresponds to the light source brightness cycle, restoring the true boundary of text line spacing and maintaining the continuity of typesetting.