Constitution identification method and system based on tongue appearance collection domain backstepping
Patent Information
- Application Number
- CN202611074373.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]然而,在实际采集中,舌面唾液膜、轻微吐舌位移、拍摄角度变化和外部光源方向会共同改变局部反射位置,使同一舌象视频中的亮斑并不总是固定覆盖真实舌苔结构;同时,真实苔质纹理与反射亮斑在图像表现上均可能呈现浅色或高亮特征
[0020] This application divides the bright candidate area into a wet reflective pollution area, a moss retention area, and a re-verification area by combining the cross-frame position change, the degree of region preservation, and the texture stability characteristics of the same tongue body at a fixed coordinate position. This avoids directly deleting or retaining bright areas based solely on single-frame brightness anomalies, and reduces the risk of wet reflective areas being mistaken for true moss color and true light-colored moss being misjudged as invalid areas.
Smart Images

Figure CN122928764A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image extraction technology, and more specifically, this application relates to a method and system for constitution identification based on tongue image acquisition domain inversion. Background Technology
[0002] With the development of mobile terminal image acquisition, computer vision, and TCM tongue image analysis technologies, extracting visual features such as tongue color, coating color, texture, and shape from tongue images and using them for constitution identification has become a common technical approach in TCM information technology scenarios. These methods typically rely on the color accuracy and local texture discernibility of the acquired images; therefore, the acquisition environment, lighting conditions, tongue surface moisture level, and shooting angle directly affect the subsequent feature extraction results.
[0003] In existing technologies, the common practice is to first acquire an image of the tongue of the target object in a tongue-out state, and then perform tongue segmentation, tongue coating region identification, highlight region processing, and color feature statistics. For local bright spots on the tongue surface, the conventional approach is to remove, mask, smooth, or filter based on the brightness anomalies in a single frame. This processing assumes that the local highlights are just acquisition noise, and that the remaining area after removal can still stably represent the true tongue coating color.
[0004] However, in actual data collection, factors such as the salivary film on the tongue surface, slight tongue movement, changes in shooting angle, and the direction of external light sources can all alter the local reflection position, causing bright spots in the same tongue image video to not always consistently cover the actual tongue coating structure. Simultaneously, both the actual tongue coating texture and the reflected bright spots may appear as light-colored or brighter features in the image. If single-frame brightness anomalies are directly deleted or retained, it's easy to mistake reflections for changes in tongue coating color, or to misjudge actual light-colored tongue coating as invalid areas. This leads to contamination or excessive cropping of the tongue coating color sampling range, resulting in distortion of the tongue coating color features entering subsequent constitution candidate analysis. Therefore, a crucial technical problem that existing tongue image-assisted analysis techniques urgently need to solve is: how to reduce the interference of moist reflections on the tongue surface on the extraction of tongue coating color features under conventional mobile acquisition conditions. Summary of the Invention
[0005] To address the aforementioned technical problems, this technical solution provides a method and system for constitution identification based on tongue image acquisition domain inference, which solves the problems mentioned in the background technology.
[0006] To achieve the above objectives, the technical solution of the present invention is as follows:
[0007] Firstly, this application provides a constitution identification auxiliary method based on tongue image acquisition domain inference, including:
[0008] A continuous tongue image frame sequence is acquired, tongue region recognition is performed and mapped to a fixed tongue coordinate system to obtain a registered tongue image frame sequence. Image extraction is performed on the registered tongue image frame sequence to obtain a tongue coating candidate area with a limited range of coating color sampling.
[0009] Within the tongue coating candidate region of the registered tongue image frame, the brightness difference and chromaticity dispersion between the pixel and its neighbor are calculated. Connected regions that meet the brightness anomaly condition and chromaticity compression condition are identified as high brightness candidate regions. The high brightness candidate regions corresponding to cross frames are associated to obtain the high brightness migration trajectory.
[0010] In the fixed coordinate system of the tongue, the regions with cross-frame texture response differences of the same coordinate index that meet the texture preservation conditions form texture stable features. Based on the highlight migration trajectory and texture stable features, the highlight candidate areas that meet the cross-frame migration conditions are identified as wet reflective pollution areas, the highlight candidate areas that meet the texture preservation conditions are identified as moss preservation areas, and the remaining highlight candidate areas are identified as areas to be re-examined.
[0011] The area overlapping with the moist reflective pollution area in the candidate area of tongue coating is taken as the stripping area, the area overlapping with the area to be re-examined is taken as the compensation area, and the remaining area is taken as the retention area.
[0012] Based on the Lab color statistics of the retained range and the Lab color statistics of the range to be compensated in other registered tongue image frames when the same coordinate index is not covered by the wet reflective pollution area, a moss color field and a field qualification status are generated. The moss color field is then controlled to enter the preset constitution candidate identification model according to the field qualification status, and auxiliary candidate results for prompting are output.
[0013] Secondly, this application provides a constitution identification auxiliary system based on tongue image acquisition domain inversion, used to implement the constitution identification auxiliary method based on tongue image acquisition domain inversion as described in any of the above claims, including:
[0014] The frame sequence acquisition and registration processing module is used to acquire a continuous tongue image frame sequence, perform tongue region recognition and map it to a fixed tongue coordinate system to obtain a registered tongue image frame sequence, perform image extraction on the registered tongue image frame sequence, and obtain a tongue coating candidate area with a limited range of coating color sampling.
[0015] The highlight determination and trajectory generation module is used to calculate the brightness difference and chromaticity dispersion of pixels and their neighbors in the tongue coating candidate area of the registered tongue image frame, determine the connected regions that meet the brightness anomaly condition and chromaticity compression condition as the highlight candidate area, associate the corresponding highlight candidate areas across frames, and obtain the highlight migration trajectory.
[0016] The texture stabilization generation and coupling partitioning module is used to form texture stabilization features in regions where the cross-frame texture response difference with the same coordinate index in the tongue fixed coordinate system meets the texture preservation condition. Based on the highlight migration trajectory and texture stabilization features, the highlight candidate areas that meet the cross-frame migration condition are identified as wet reflective pollution areas, the highlight candidate areas that meet the texture preservation condition are identified as moss preservation areas, and the remaining highlight candidate areas are identified as areas to be re-examined.
[0017] The range division module is used to define the range that overlaps with the moist reflective pollution area in the tongue coating candidate area as the stripping range, the range that overlaps with the area to be re-examined as the compensation range, and the remaining range as the retention range.
[0018] The moss color field processing and candidate output module is used to generate a moss color field and a field eligibility status based on the Lab color statistics of the retained range and the Lab color statistics of the range to be compensated when the same coordinate index in other registered tongue image frames is not covered by the wet reflective pollution area. Based on the field eligibility status, the moss color field is controlled to enter the preset constitution candidate identification model, and auxiliary candidate results for prompting are output.
[0019] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0020] This application divides the bright candidate area into a wet reflective pollution area, a moss retention area, and a re-verification area by combining the cross-frame position change, the degree of region preservation, and the texture stability characteristics of the same tongue body at a fixed coordinate position. This avoids directly deleting or retaining bright areas based solely on single-frame brightness anomalies, and reduces the risk of wet reflective areas being mistaken for true moss color and true light-colored moss being misjudged as invalid areas.
[0021] This application transforms the moist reflective pollution area, the moss retention area, and the area to be re-certified into the stripping range, the retention range, and the compensation range, respectively. It also uses the color information of the same tongue body at a fixed coordinate position in other registered tongue image frames when it is not affected by moist reflective pollution to generate the moss color to be compensated. This makes the moss color field no longer dependent on the static color statistics of a single frame. It can retain the usable tongue coating color information while stripping the polluted color, thereby reducing the distortion of the moss color field.
[0022] This application differentiates moss fields with different levels of confidence by performing valid input, duplicate input, or blocked input on the moss field based on the coverage ratio of the wet reflective pollution area, the generation status of the moss color to be compensated, and the field qualification status. This prevents unreliable moss fields from directly entering the preset physical condition candidate identification model and improves the reliability of information prompts for auxiliary candidate results. Attached Figure Description
[0023] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. Wherein:
[0024] Figure 1 This is a flowchart of the constitution identification auxiliary method based on tongue image acquisition domain inference in this invention;
[0025] Figure 2 This is a schematic diagram of the constitution identification auxiliary system based on tongue image acquisition domain in this invention. Detailed Implementation
[0026] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.
[0027] In the information analysis of tongue appearance in Traditional Chinese Medicine (TCM), tongue color, tongue coating color, tongue coating texture, and tongue surface morphology are often used as important image features to aid in constitution identification. The reliability of the tongue coating color feature depends on whether the color information in the acquired image truly reflects the tongue coating itself, rather than being affected by moisture reflection, local bright spots, or mixed boundary areas. Therefore, before the tongue coating color field enters the subsequent constitution candidate identification process, it is necessary to ensure that the sampling range of the tongue coating color has sufficient authenticity and stability.
[0028] Existing tongue image-assisted analysis methods mostly process single-frame tongue images. They typically first identify the tongue body and tongue coating regions, then remove, mask, or smooth highlighted areas based on brightness, color, or texture features. These methods assume that local highlights are simply noise and that the remaining areas after removing highlights will still represent the true tongue coating color. However, in real-world mobile capture scenarios, the subject's tongue may shift slightly when protruding, causing the salivary film on the tongue surface to reflect in varying positions due to changes in the tongue's curvature, light source direction, and shooting angle. This means that local highlights do not consistently cover the same tongue coating location across consecutive frames; simultaneously, areas of true light-colored or thin tongue coating may also exhibit similar highlighting characteristics.
[0029] For example, when capturing tongue images on a mobile device, moist reflections may migrate across consecutive frames as the tongue's posture changes, while the actual texture of the tongue coating usually remains relatively stable along with the tongue itself. If the system directly isolates the bright areas based solely on single-frame brightness anomalies, it may misjudge the actual light-colored coating as reflections; if the system retains the bright areas based solely on color similarity, it may use the color contaminated by moist reflections as the basis for coating color sampling. Furthermore, when the reflective area is located at the edge of the tongue coating or in a thin coating area, the color of the tongue's base color and the color of the coating layer will jointly affect the apparent Lab color statistics, making it difficult to determine the source of the color based solely on static color statistics.
[0030] Therefore, the main problem with existing technologies is not merely insufficient accuracy in identifying highlighted areas, but rather the lack of a continuous discrimination mechanism in the routine tongue image acquisition process to determine the relationship between the migration of moist reflections, the stability of tongue coating texture, and the eligibility of the tongue coating color field input. If this problem is not addressed, color information contaminated by moist reflections may enter the tongue coating color field, and genuine light-colored tongue coating may be excessively stripped away, leading to distortion of the tongue coating color field and affecting the reliability of subsequent auxiliary constitution candidate results.
[0031] Example 1:
[0032] like Figure 1 As shown, this application introduces a constitution identification auxiliary method based on tongue image acquisition domain inference, including:
[0033] S1. Obtain a continuous tongue image frame sequence, perform tongue region recognition and map it to a fixed tongue coordinate system to obtain a registered tongue image frame sequence, perform image extraction on the registered tongue image frame sequence to obtain a tongue coating candidate area with a limited range of coating color sampling.
[0034] The process of obtaining the registered tongue image frame sequence and tongue coating candidate region includes:
[0035] Perform tongue region recognition on each frame of a continuous tongue image frame sequence to obtain the tongue region;
[0036] Based on the tongue outline, tongue tip position and tongue surface texture points in the tongue region, each frame of tongue image is mapped to a fixed tongue coordinate system to obtain a registered tongue image frame sequence.
[0037] The tongue regions in the registered tongue image frame sequence that meet the preset tongue coating color conditions and preset tongue coating texture conditions are identified as tongue coating candidate regions.
[0038] Specifically, the continuous tongue image frame sequence includes multiple tongue image frames arranged according to acquisition time. Each tongue image frame includes at least RGB pixel color information and acquisition time information. Tongue region recognition is performed on each tongue image frame to obtain a tongue region defined by the tongue contour. The tongue region includes the tongue contour, the position of the tongue tip, and the texture points on the tongue surface.
[0039] Tongue images that satisfy the conditions of tongue region integrity and texture point quantity are selected as reference frames from a continuous tongue image frame sequence. The tongue region integrity condition includes: the ratio of the area of the largest connected component in the tongue region to the total area of the tongue region is not less than a preset integrity threshold; the texture point quantity condition includes: the number of texture points on the tongue surface is not less than a texture point quantity threshold determined based on the area of the tongue region. For example, at a resolution of 1280×720, the preset integrity threshold can be 0.90, and the texture point quantity threshold can be 80; at other resolutions, the texture point quantity threshold can be adjusted according to the area of the tongue region.
[0040] Based on the correspondences between each tongue image frame and the reference frame regarding the tongue contour, tongue tip position, and tongue surface texture points, a spatial transformation relationship is generated from each tongue image frame to the same fixed coordinate system of the tongue body. This spatial transformation relationship is then used to map each tongue image frame to obtain a registered tongue image frame sequence. This registered tongue image frame sequence is used to compare color and texture changes at the same fixed coordinate position of the tongue body.
[0041] After obtaining the registered tongue image frame sequence, local sampling units are divided within the tongue body region, and the RGB pixel color information within the local sampling units is converted into Lab color components. The proportion of pixels within the local sampling units that satisfy the range of the tongue coating color components is statistically analyzed and used as the basis for judging the preset tongue coating color conditions; and the gradient amplitude and grayscale standard deviation of the grayscale image within the local sampling units are used as the basis for judging the preset tongue coating texture conditions.
[0042] In one implementation, the range of the moss color components can be set as follows: luminance component L = 55-92, red-green component a = -8 to 22, and yellow-blue component b = -6 to 48. When the proportion of pixels satisfying the moss color component range within a local sampling unit is not less than 60%, it is determined that it meets the preset tongue coating color condition. Pixels with a gradient amplitude of not less than 15 in the grayscale image are determined as texture response pixels. When the proportion of texture response pixels within a local sampling unit is not less than 8%, and the grayscale standard deviation is 6-45, it is determined that it meets the preset tongue coating texture condition. The above values can be adjusted according to the statistical results of the labeled tongue coating area samples and are not considered as the only limitation.
[0043] The tongue region that simultaneously meets the preset tongue coating color condition and the preset tongue coating texture condition is determined as the tongue coating candidate area. The tongue coating candidate area is used to limit the subsequent tongue coating color sampling range.
[0044] For example, 15 frames of tongue images with a resolution of 1280×720 were acquired at an interval of 0.1s. The ratio of the maximum connected region area to the total area of the tongue body in the 8th frame of the tongue image was 0.94, and the number of texture points on the tongue surface was 132. Therefore, the 8th frame was used as the reference frame, and the remaining frames were mapped to the fixed coordinate system of the tongue body corresponding to the 8th frame to obtain the registered tongue image frame sequence. Statistical analysis was performed using 32×32 pixels as local sampling units. Among them, the proportion of pixels in the posterior region of the tongue body that met the color component range of the tongue coating was 76%, the proportion of texture response pixels was 18%, and the grayscale standard deviation was 14.2. Therefore, this region was determined as the candidate area for tongue coating.
[0045] Through the above technical solution, this application solves the problem of incomparable positions across frames caused by tongue displacement and shooting shake between consecutive tongue image frames. First, the tongue image frames are uniformly mapped to a fixed coordinate system of the tongue body, which not only ensures that subsequent changes in brightness, color and texture can be compared at the same tongue body position, but also limits the sampling range of subsequent tongue coating color by limiting the tongue coating candidate area, avoiding non-tongue coating areas from entering the tongue coating color analysis process.
[0046] S2. Within the tongue coating candidate region of the registered tongue image frame, calculate the brightness difference and chromaticity dispersion between the pixel and its neighborhood. Determine the connected regions that meet the brightness anomaly condition and chromaticity compression condition as high brightness candidate regions. Associate the high brightness candidate regions across frames to obtain the high brightness migration trajectory that characterizes the cross-frame position change and the degree of region preservation.
[0047] The process of determining the candidate highlight region includes:
[0048] Obtain the luminance and chrominance components of the tongue region in the registered tongue image frame sequence;
[0049] Local luminance differences are obtained based on luminance components, and chrominance dispersion is obtained based on chrominance components.
[0050] When the local brightness difference is higher than the preset brightness difference threshold and the chromaticity dispersion is lower than the preset chromaticity dispersion threshold, the corresponding connected region is determined as a bright candidate region.
[0051] The process of obtaining the highlighted migration trajectory includes:
[0052] Obtain the center coordinates, region mask, and region area of the highlight candidate region in the fixed coordinate system of the tongue;
[0053] Based on the center distance, regional overlap and area change of the bright candidate regions in adjacent registered tongue image frames, the bright candidate regions corresponding to the cross frames are associated to obtain the trajectory of the bright region;
[0054] In the highlighted area trajectory, the migration intensity is generated based on the distance between the center coordinates in adjacent registered tongue image frames and normalized according to the area of the tongue region.
[0055] Migration strength satisfies: ;
[0056] in, The value represents the migration intensity of the k-th highlighted region trajectory, and n represents the number of registered tongue image frames involved in the calculation. This represents the center coordinates of the k-th highlight candidate region in the t-th frame. Indicates the area of the tongue body. Represents distance operation;
[0057] In the highlighted area trajectory, the region overlap stability is generated based on the number of intersection pixels and the number of union pixels between the region masks in adjacent registered tongue image frames.
[0058] The region overlap stability satisfies: ;
[0059] in, This indicates the regional overlap stability of the k-th highlighted region trajectory. This represents the region mask of the k-th highlight candidate region in frame t. Indicates the intersection of regions. Represents the union of regions. Indicates the number of pixels in the region;
[0060] Furthermore, migration intensity and regional overlap stability are incorporated as components of the highlighted migration trajectory.
[0061] Specifically, the luminance and chromaticity components of each registered tongue image frame in the registered tongue image frame sequence are obtained. The luminance component is used to characterize the brightness of each pixel in the tongue region, and the chromaticity component is used to characterize the color difference of each pixel in the tongue region. Based on the difference between the luminance component of the target pixel and the luminance components of its neighboring pixels, the local luminance difference is obtained; and based on the dispersion of the chromaticity component in the neighborhood of the target pixel, the chromaticity dispersion is obtained.
[0062] When the local brightness difference exceeds a preset brightness difference threshold and the chromaticity dispersion is lower than a preset chromaticity dispersion threshold, the corresponding connected region is identified as a candidate region for high brightness. For example, in the Lab color space, the preset brightness difference threshold can be 18-30, and the preset chromaticity dispersion threshold can be 4-10; in one implementation, the preset brightness difference threshold is 22, and the preset chromaticity dispersion threshold is 6. These thresholds can be determined based on the statistical differences between reflective and non-reflective light-colored moss regions in the labeled tongue image sample, and are not the only limiting factor.
[0063] The center coordinates, region mask, and region area of the highlight candidate region in the fixed coordinate system of the tongue are obtained. Based on the center distance, region overlap, and area change relationship of the highlight candidate regions in adjacent registered tongue image frames, region association is performed on the corresponding highlight candidate regions across frames to obtain the highlight region trajectory. Specifically, when the center distance between two highlight candidate regions in two adjacent frames is lower than a preset center distance threshold, the region mask intersection-union ratio is higher than a preset association threshold, and the region area ratio is within a preset area change range, the two are determined as adjacent highlight candidate regions on the same highlight region trajectory. For example, the preset center distance threshold can be set to 0.04-0.08 times the square root of the tongue region area, the preset association threshold can be set to 0.10-0.25, and the preset area change range can be set to 0.5-2.0; in one implementation, the preset center distance threshold is set to 0.06 times the square root of the tongue region area, the preset association threshold is set to 0.15, and the preset area change range is set to 0.6-1.8. For example, when the tongue region has an area of 186,000 pixels, the preset center distance threshold is approximately 26 pixels. The preset association threshold allows the wet reflective area to migrate between adjacent frames, while excluding highly unrelated bright areas. The preset area variation range allows the wet reflective area to fluctuate due to changes in the tongue's angle, while excluding non-homogeneous bright areas with excessively large area abrupt changes.
[0064] The migration intensity and regional overlap stability are generated based on the highlight region trajectory, and these two parameters are incorporated as components of the highlight migration trajectory. The migration intensity characterizes the degree of positional change of the highlight candidate region across frames in the tongue's fixed coordinate system, while the regional overlap stability characterizes the degree to which the highlight candidate region is preserved across frames.
[0065] For example, in a 15-frame registered tongue image sequence, a highlighted area trajectory is obtained from frame 6 to frame 12. The average center displacement of this highlighted area trajectory is 18.5 pixels, the tongue area is 186,000 pixels, and the normalized migration intensity is 0.043; the regional overlap stability of this highlighted area trajectory is 0.31. The above migration intensity and regional overlap stability are entered into S3 to determine whether the highlighted candidate area belongs to a moist reflective pollution area, a moss-preserved area, or an area to be re-examined.
[0066] Through the above technical solution, this application solves the problem that it is difficult to distinguish between reflective and light-colored moss in a single frame of bright areas. By using brightness anomaly and chromaticity compression to screen bright candidate areas, it not only eliminates areas that are simply light in color but not reflective, but also generates bright migration trajectories by associating cross-frame areas, so that the cross-frame position change and the degree of area preservation of bright areas become the basis for subsequent reflection judgment.
[0067] S3. Regions with cross-frame texture response differences at the same coordinate index in the tongue body fixed coordinate system that meet the texture preservation condition are formed into texture stable features. Based on the highlight migration trajectory and texture stable features, the highlight candidate areas that meet the cross-frame migration condition are identified as wet reflective pollution areas, the highlight candidate areas that do not meet the cross-frame migration condition but meet the texture preservation condition are identified as moss preservation areas, and the remaining highlight candidate areas are identified as areas to be re-examined.
[0068] The cross-frame migration conditions include: the migration intensity is higher than the preset migration threshold, and the regional overlap stability is lower than the preset overlap stability threshold; the texture preservation conditions include: the amount of texture response change of the same coordinate index in adjacent registered tongue image frames is lower than the preset texture fluctuation threshold, and the amount of texture direction change is lower than the preset direction change threshold.
[0069] Specifically, in a fixed coordinate system for the tongue, the texture response of the same fixed coordinate position of the tongue is obtained in multiple registered tongue image frames. The texture response may include grayscale gradient magnitude, texture orientation angle, or local grayscale standard deviation. Based on the changes in texture response and texture orientation of the same fixed coordinate position of the tongue in consecutive frames, texture-stable features are generated.
[0070] In one implementation, the difference in grayscale gradient magnitude between adjacent frames at the same fixed coordinate position of the tongue body is used as the texture response change, and the difference in texture direction angle between adjacent frames is used as the texture direction change. When the texture response change is lower than a preset texture fluctuation threshold and the texture direction change is lower than a preset direction change threshold, the position is determined to meet the preset texture stability condition. For example, the preset texture fluctuation threshold can be 8-15, and the preset direction change threshold can be 10°-25°; in one implementation, the preset texture fluctuation threshold is 10, and the preset direction change threshold is 15°. The above thresholds can be determined based on the cross-frame texture change statistics of the labeled tongue area samples and are not the only limitation.
[0071] Based on the migration intensity and regional overlap stability obtained in S2, and the texture stability features obtained in this step, the highlight candidate regions are classified into three categories. When the migration intensity is higher than a preset migration threshold and the regional overlap stability is lower than a preset overlap stability threshold, the corresponding highlight candidate region is identified as a wet reflective contamination region. When the migration intensity is not higher than a preset migration threshold and the texture stability features meet a preset texture stability condition, the corresponding highlight candidate region is identified as a moss-preserving region. When the highlight candidate region does not meet the conditions for both wet reflective contamination and moss-preserving regions, the corresponding highlight candidate region is identified as a region requiring re-verification.
[0072] It should be noted that the "area to be re-verified" includes both bright candidate areas with insufficient evidence and static bright areas that remain stable in position across consecutive registered tongue images but do not meet the texture preservation condition. For these static bright areas, since they do not exhibit obvious cross-frame migration features, they are not directly identified as wet reflective pollution areas; however, because their texture response is covered or disturbed by highlights, they are not identified as moss-preserving areas either. Instead, they are classified as areas to be re-verified and transformed into compensation ranges in subsequent steps. Therefore, static bright areas will not be directly entered into the moss color field as valid moss color. Instead, they are compensated using the Lab color statistics when the same coordinate index in other registered tongue images is not covered by wet reflective pollution areas. If cross-frame compensation color information cannot be obtained, they are downgraded to a "to be re-verified" state or a "frozen" state based on the field eligibility status. This process avoids static reflective spots being mistakenly identified as true moss color, while not requiring all reflective areas to be directly identified as wet reflective pollution areas through migration features.
[0073] For example, the preset migration threshold can be set to 0.03-0.06, and the preset overlap stability threshold can be set to 0.45-0.65; in one implementation, the preset migration threshold is set to 0.035, and the preset overlap stability threshold is set to 0.50. If the migration intensity of a certain bright area trajectory is 0.043 and the regional overlap stability is 0.31, then the bright candidate area is determined as a wet reflective pollution area. If the migration intensity of another bright candidate area is 0.018, and the texture response change at its location is 6.4 and the texture direction change is 9°, then it is determined as a moss-preserving area.
[0074] Through the above technical solution, this application solves the problem of misjudgment of moss color caused by simply deleting or simply retaining the highlighted areas in the existing methods. By coupling the highlight migration trajectory with the texture stability features for judgment, it can identify the highlighted areas that migrate with the frame and have a low degree of regional retention as wet reflective pollution areas, while retaining the real moss areas with stable texture. At the same time, it divides the areas with insufficient evidence into areas that need to be re-examined, forming a regional diversion result that is more consistent with the actual tongue image collection.
[0075] S4. The area overlapping with the moist reflective pollution area in the candidate area of tongue coating is taken as the stripping area, the area overlapping with the area to be re-examined is taken as the compensation area, and the remaining area is taken as the retention area.
[0076] Specifically, the tongue coating candidate area obtained in S1 is used as the subsequent tongue coating color sampling range, and the wet reflective pollution area, the tongue coating retention area, and the area to be re-examined obtained in S3 are respectively calculated to overlap with the tongue coating candidate area. The regional overlap calculation can be achieved by the pixel intersection between regional masks.
[0077] When a localized area within the candidate area for tongue coating overlaps with a moist, reflective contamination area, that localized area is designated as the stripping area. The stripping area does not directly participate in the color statistics of the tongue coating field; it is used to reduce the contamination of tongue coating sampling by moist reflections.
[0078] When a local area in the tongue coating candidate region overlaps with the moss retention region, that local area is determined as the retention area. The retention area retains its color information and is used to generate the subsequent moss color field.
[0079] When a local area in the candidate tongue coating region overlaps with the area to be re-verified, that local area is identified as the area to be compensated. The area to be compensated is used to find the color information of the same tongue body at a fixed coordinate position in other registered tongue image frames when it is not covered by the moist reflective pollution area.
[0080] To avoid omitting normal tongue coating areas, in one implementation, the portion of the tongue coating candidate area that does not overlap with the moist reflective contamination area or the area to be re-examined is included in the retention range. Therefore, the retention range includes the area corresponding to the tongue coating retention area and the range of tongue coating candidate areas that are not contaminated or marked for re-examination.
[0081] For example, the candidate area of tongue coating in a certain frame of registered tongue image is 62,400 pixels, of which 8,200 pixels overlap with the moist reflective pollution area, 5,100 pixels overlap with the area to be re-examined, and the remaining 49,100 pixels are determined as the retention area. The area corresponding to the 8,200 pixels is used as the stripping area, the area corresponding to the 5,100 pixels is used as the compensation area, and the area corresponding to the 49,100 pixels is used as the retention area, and these three types of areas are input into S5.
[0082] Through the above technical solution, this application solves the problem of the lack of connection between the three types of region division results and the generation of moss color field. The wet reflective pollution area, moss preservation area and area to be re-verified are mapped to the stripping range, preservation range and compensation range, respectively. This not only avoids the pollution area from directly participating in the moss color statistics, but also preserves the usable moss color information, and provides clear sampling objects for subsequent cross-frame compensation.
[0083] S5. Based on the Lab color statistics of the retained range and the Lab color statistics of the range to be compensated in other registered tongue image frames when the same coordinate index is not covered by the wet reflective pollution area, generate the moss color field and the field qualification status, and control the moss color field to enter the preset constitution candidate identification model according to the field qualification status, and output the auxiliary candidate results for prompting.
[0084] The process of generating the moss field and the field eligibility status includes:
[0085] The extent of stripping is not included in the moss color statistics;
[0086] The Lab color statistics within the retention range are obtained as the direct sampling source for the moss field; specifically, mean statistics, median statistics, or distribution statistics are performed on the Lab color components within the retention range to obtain the Lab color statistics within the retention range, which are then used as the direct sampling source for the moss field.
[0087] When the same coordinate index of the area to be compensated is not covered by the wet reflective contamination area in other registered tongue image frames, the corresponding Lab color statistical value is used as the cross-frame compensation color information; if the same coordinate index meets the condition of not being covered by the wet reflective contamination area in multiple registered tongue image frames, the median value statistics or weighted fusion can be performed on the Lab color components in multiple registered tongue image frames to obtain the cross-frame compensation color information corresponding to the same coordinate index.
[0088] The moss field is generated based on the Lab color statistics of the retained range and the cross-frame compensation color information, and the field qualification status is generated based on the stripping range, the range to be compensated, and the acquisition status of the cross-frame compensation color information.
[0089] The process of generating the moss field based on the Lab color statistics of the retention range and cross-frame compensated color information includes:
[0090] Obtain the Lab color components at each sampling location within the retention range, and statistically analyze the Lab color values within the retention range.
[0091] The Lab color component of the area to be compensated is obtained when the same coordinate index of the area to be compensated is not covered by the wet reflective pollution area in other registered tongue image frames, and is used as cross-frame compensation color information.
[0092] Based on the number of samples of Lab color statistics within the retention range and cross-frame compensation color information, the proportion of retention sources and the proportion of compensation sources are determined.
[0093] Based on the proportion of retained sources and the proportion of compensated sources, a weighted fusion is performed on the Lab color statistics and cross-frame compensated color information within the retained range to generate the moss field.
[0094] The sampling quantity can be either the number of sampling locations participating in the moss color statistics or the number of effective pixels participating in the statistics. The sampling location is a preset sampling unit in the fixed coordinate system of the tongue body; for example, the preset sampling unit can be a local area of 16×16 pixels, 24×24 pixels, or 32×32 pixels. When the sampling location quantity is used to determine the proportion of retained sources and the proportion of compensated sources, the proportion of retained sources is the ratio between the number of sampling locations participating in the statistics within the retained range and the total number of sampling locations participating in the generation of the moss color field; the proportion of compensated sources is the ratio between the number of sampling locations within the range to be compensated that have obtained cross-frame compensated color information and the total number of sampling locations participating in the generation of the moss color field. When the number of effective pixels is used to determine the proportion of retained sources and the proportion of compensated sources, the above proportions are calculated according to the corresponding number of effective pixels.
[0095] Furthermore, the tongue coating color field is not limited to the global Lab color statistics. To preserve the spatial distribution information of tongue coating color in a fixed coordinate system, the candidate tongue coating area can be divided into multiple preset tongue coating partitions according to the tip, middle, root, left, and right sides of the tongue, and the Lab color statistics within each preset tongue coating partition can be calculated separately. The resulting tongue coating color field can include the global Lab color statistics, the partition Lab color statistics, the proportion of retained sources, the proportion of compensated sources, and the field qualification status code. In this way, the tongue coating color field can both represent the overall tongue coating color and preserve the differences in tongue coating color distribution at different locations, avoiding the loss of spatial distribution information caused by using only the global average color.
[0096] The process of generating field eligibility status based on the acquisition status of the stripping range, the range to be compensated, and the cross-frame compensation color information includes:
[0097] The peeling coverage ratio is obtained based on the area ratio of the peeling range in the candidate area of tongue coating;
[0098] Based on the area of the region in the range to be compensated that has obtained cross-frame compensation color information and the area of the region that has not obtained cross-frame compensation color information, the compensation completion ratio and the compensation missing ratio are obtained.
[0099] When the stripping coverage ratio is lower than the preset first coverage threshold and the compensation missing ratio is lower than the preset missing threshold, the field qualification status is determined to be valid.
[0100] When the stripping coverage ratio is not lower than the preset first coverage threshold and the compensation completion ratio meets the preset compensation completion conditions, the field qualification status is determined to be a compensation valid status.
[0101] When the compensation for the missing proportion meets the preset conditions for re-certification, the field eligibility status will be determined as a state of re-certification.
[0102] When the stripping coverage ratio is higher than the preset second coverage threshold and the compensation completion ratio does not meet the preset compensation completion conditions, the field qualification status will be determined to be frozen.
[0103] When the eligibility status of a field is frozen, the moss color field is blocked from entering the preset constitution candidate identification model. However, this blocking only applies to the moss color field itself and does not indicate that the entire auxiliary candidate result output process is terminated. In one implementation, the frozen state encoding, re-acquisition prompt, or low-confidence marker can be used as input constraint information, and combined with at least one of the tongue color field, tongue shape field, and tongue surface texture field to continue outputting auxiliary candidate results for information prompts. The re-acquisition prompt can be used to prompt the re-acquisition of the tongue image frame sequence, and the low-confidence marker is used to characterize that the current auxiliary candidate result does not use the reliable moss color field. Therefore, in scenarios with large-area wet reflection or full tongue reflection, the system does not completely fail, but rather blocks the unreliable moss color field through the frozen state and reduces the impact of erroneous input on the auxiliary candidate results with the low-confidence marker or re-acquisition prompt.
[0104] Among them, the preset second coverage threshold is higher than the preset first coverage threshold;
[0105] The eligibility status of a field is determined based on the priority of its status as frozen, pending recertification, valid compensation, and valid.
[0106] For example, the preset first coverage threshold can be 10%-20%, the preset second coverage threshold can be 35%-50%, the preset missing threshold can be 15%-25%, and the preset compensation completion condition can be set to a compensation completion rate of not less than 70%-85%. In one implementation, the preset first coverage threshold is 15%, the preset second coverage threshold is 40%, the preset missing threshold is 20%, and the preset compensation completion condition is a compensation completion rate of not less than 80%. The above thresholds can be adjusted according to the statistical results of the labeled tongue image samples and the engineering collection samples, and are not the only limitation.
[0107] When the proportion of compensated missing information is not lower than a preset threshold for repeated verification, the proportion of compensated missing information is determined to meet the preset condition for repeated verification. For example, the preset threshold for repeated verification can be 15%-30%; in one implementation, the preset threshold for repeated verification is 20%. In another implementation, when regions that have not obtained cross-frame compensated color information form continuous missing regions, and the maximum width of these continuous missing regions is not less than 10% of the width of the tongue coating candidate area, the preset condition for repeated verification is also determined to be met. The above proportion thresholds can be statistically determined based on the impact of compensated missing regions on the stability of the tongue coating color field in the annotated tongue image samples, and are not considered the only limiting factor.
[0108] The process of obtaining cross-frame compensated color information includes:
[0109] Based on the region mask of the area to be compensated, the area, number of connections and distance relationship between the area to be compensated and the boundary of the tongue coating candidate area are determined, and the area to be compensated is determined as a discrete point range, a continuous band range or a boundary transition range.
[0110] The determination of the boundary transition range takes precedence over the continuous band range, and the determination of the continuous band range takes precedence over the discrete point range.
[0111] When the range to be compensated is a discrete point range, select the registered tongue image frame whose acquisition time interval meets the preset time proximity condition and whose same coordinate index is not covered by the wet reflective pollution area.
[0112] When the area to be compensated is a continuous strip, select a registered tongue image frame where the overlap ratio between the wet reflective pollution area and the area to be compensated is lower than the preset migration ratio threshold.
[0113] When the area to be compensated is the boundary transition area, select the registered tongue image frame with the same coordinate index that meets the texture preservation condition and is not covered by the wet reflective pollution area.
[0114] Cross-frame compensated color information is generated based on the Lab color statistics in the selected registered tongue image frame.
[0115] The process of determining the area to be compensated as a discrete point range, a continuous band range, or a boundary transition range includes:
[0116] Based on the region mask of the area to be compensated, obtain the total area of the area to be compensated, the number of connected regions, the area of the largest connected region, the aspect ratio of the bounding rectangle of the largest connected region, and the minimum distance from the area to be compensated to the boundary of the tongue coating candidate area.
[0117] When the number of connected regions is not less than the preset connected number threshold, and the ratio of the area of the largest connected region to the total area of the range to be compensated is less than the preset point proportion threshold, the range to be compensated is determined as a discrete point range. For example, the preset connected number threshold can be 2-4, and the preset point proportion threshold can be 50%-65%. In one implementation, the preset connected number threshold is 3, and the preset point proportion threshold is 60%.
[0118] When the ratio of the area of the largest connected region to the total area of the range to be compensated is not less than a preset continuous proportion threshold, and the aspect ratio of the bounding rectangle of the largest connected region is not less than a preset strip proportion threshold, the range to be compensated is determined as a continuous strip range; for example, the preset continuous proportion threshold can be 70%-85%, and the preset strip proportion threshold can be 2.5-4.0; in one implementation, the preset continuous proportion threshold is 75%, and the preset strip proportion threshold is 3.0.
[0119] When the minimum distance from the compensation range to the boundary of the tongue coating candidate area is not higher than the preset boundary distance threshold, the compensation range is determined as the boundary transition range. For example, the preset boundary distance threshold can be 3%-8% of the equivalent width of the tongue coating candidate area. In one implementation, the preset boundary distance threshold is 5% of the equivalent width of the tongue coating candidate area.
[0120] Among them, the determination of the boundary transition range takes priority over the continuous band range, and the determination of the continuous band range takes priority over the discrete point range.
[0121] For example, the candidate area of the tongue coating is 62,400 pixels, the area of the stripped area is 8,200 pixels, the area of the area to be compensated is 5,100 pixels, and the area of the retained area is 49,100 pixels. The Lab color statistics of the retained area are L=70.6, a=5.2, b=20.1; 4,100 pixels in the area to be compensated have Lab color components obtained from other registered tongue image frames when they are not covered by the moist reflective pollution area, resulting in cross-frame compensated color information of L=70.4, a=5.1, b=20.0. Based on the sampling quantity of the retained area and the compensated area, the retention source ratio is determined to be 92.3%, and the compensation source ratio is 7.7%, and the two are weighted and fused to generate the tongue coating color field. Since the stripping coverage ratio is 13.1% and the compensation missing ratio is 19.6%, under the above threshold conditions, the field qualification status is determined to be valid, and the tongue coating color field is controlled to enter the valid input state of the preset constitution candidate identification model, outputting auxiliary candidate results for information prompts.
[0122] The aforementioned preset thresholds for brightness difference, color dispersion, migration, overlap stability, texture fluctuation, direction change, missing information, missing information requiring re-examination, tongue body contribution, and tongue coating contribution can be determined based on labeled tongue image samples. Specifically, labeled tongue image samples containing moist reflective areas, true tongue coating areas, thin tongue coating areas, areas requiring compensation, and areas requiring re-examination can be obtained. The brightness difference, color dispersion, migration intensity, regional overlap stability, texture response change, texture direction change, compensation missing information ratio, continuous translucent area area ratio, and tongue coating colored area area ratio corresponding to each type of area can be statistically analyzed. The corresponding thresholds are then determined based on the statistical distribution differences between different types of samples. In one implementation, the threshold can be determined using ROC curves, Youden's index maximization, F1 score maximization, or cross-validation. In another implementation, the threshold can be determined based on the quantile range of the labeled samples. The above threshold determination methods are merely examples and not the only limitations.
[0123] Through the above technical solution, this application can perform cross-frame color compensation on the range to be compensated while stripping the wet reflective pollution color, and generate field qualification status according to the stripping coverage ratio, compensation completion ratio and compensation missing ratio, so that the moss field does not directly enter the model as a single color statistical result, but carries a qualification status that can be used for input control, thereby reducing the impact of distorted moss field on auxiliary candidate results.
[0124] This application further proposes that, after generating the field eligibility status and before executing input control, it also includes generating an estimated value of tongue base color, residual color of tongue layer, tongue contribution feature and tongue layer contribution feature based on the registered tongue image frame sequence, and updating the field eligibility status based on the above features.
[0125] Based on the registration of tongue image frame sequence, the low-coating reference area is identified. The low-coating reference area is the area of the tongue body that is not covered by the moist reflective pollution area and meets the preset low-coating difference conditions.
[0126] Specifically, after excluding areas contaminated by moist reflection, the tongue body region is divided into reference units, and the Lab color statistics and texture response pixel ratio of each reference unit are statistically analyzed. When the Lab color difference between a reference unit and its adjacent tongue body regions is not higher than a preset low-coating color difference threshold, and the texture response pixel ratio within the reference unit is not higher than a preset low-coating texture threshold, the reference unit is determined as a low-coating reference area. For example, the preset low-coating color difference threshold can be 6-12, and the preset low-coating texture threshold can be 5%-10%; in one implementation, the preset low-coating color difference threshold is 8, and the preset low-coating texture threshold is 6%.
[0127] Obtain the Lab color statistics of the low-coating reference area in the fixed coordinate system of the tongue body, and obtain the apparent Lab color statistics of the target sampling position in the tongue coating candidate area;
[0128] Based on the spatial distance between the low-coated reference area and the target sampling location, a low-coated reference area that meets the preset adjacency condition is determined as the reference source; for example, the preset adjacency condition can be set to the distance between the low-coated reference area and the target sampling location not exceeding 20% of the width of the tongue region, or a preset number of low-coated reference areas can be selected according to the distance from near to far.
[0129] Color matching weights are determined based on the difference in Lab color components between the reference source and the target sampling location, and spatial adjacency weights are determined based on the spatial distance between the reference source and the target sampling location. The smaller the difference in Lab color components, the greater the color matching weight; the smaller the spatial distance, the greater the spatial adjacency weight.
[0130] Based on color matching weight and spatial adjacency weight, the Lab color statistics of the reference source are weighted and fused to obtain the tongue base color estimate corresponding to the target sampling location; the tongue base color estimate is used to characterize the tongue base color that may be visible at the target sampling location in a low or thin coating state.
[0131] In one implementation, the estimated value of the tongue's base color satisfies: ;
[0132] in, This represents the estimated value of the tongue body background color at position x in the tongue coating candidate area; This represents the set of locations of low-moss reference zones adjacent to location x; This indicates the color information of position y in the low moss reference area; This represents the spatial weight of position y relative to position x. The estimated tongue base color is used in subsequent steps to compare with the apparent Lab color statistics of the tongue coating candidate area.
[0133] Based on the difference between the statistical values of the apparent Lab color of the tongue coating candidate area and the estimated value of the tongue body background color, a translucent residual of the coating layer is generated; the translucent residual of the coating layer is used to characterize the color components in the apparent color of the tongue coating candidate area that are different from the tongue body background color.
[0134] In one implementation, the moss translucency residual satisfies: ;
[0135] in, This represents the moss translucency residual at position x; This represents the apparent Lab color statistics value at position x in the candidate area of tongue coating; This represents the estimated base color of the tongue at position x. Further calculations can be performed. The residual amplitude is used to determine whether the location is closer to the influence of tongue color transmission or the influence of tongue coating color.
[0136] Tongue contribution features are generated based on regions that meet preset continuous color transmission conditions in the moss layer color transmission residuals, and moss layer contribution features are generated based on regions that meet preset moss layer color development conditions.
[0137] The preset continuous translucency condition may include: the translucency residual of the moss layer continuously changes along the direction from the tongue coating candidate area to the low-coating reference area, and the difference in residual amplitude between adjacent sampling positions is not higher than a preset continuous threshold; the preset moss color development condition may include: the residual amplitude of the translucency residual of the moss layer is not lower than a preset color development threshold, and the corresponding area is located within the tongue coating candidate area. For example, the preset continuous threshold can be 5-10, and in one implementation, it is 8; the preset color development threshold can be 10-18, and in one implementation, it is 12.
[0138] The eligibility status of the field is updated based on the tongue body contribution feature and the moss layer contribution feature.
[0139] For example, in a set of registered tongue image frames, a low-coating reference area of 18,500 pixels was identified. For the target sampling location within the tongue coating candidate area, the generated tongue body background color estimates were L=66.0, a=11.0, and b=12.5, while the apparent Lab color statistics for this target sampling location were L=70.6, a=5.2, and b=20.1. Based on the difference between these two values, a coating translucency residual was generated, and the proportions of continuous translucent areas and the proportions of colored areas in the coating layer were further statistically analyzed as tongue body contribution features and coating layer contribution features, respectively, for subsequent updating of field eligibility status.
[0140] Through the above technical solution, this application can further distinguish the color components formed by the tongue base color and the color components formed by the color of the moss field after the completion of wet reflective pollution stripping and cross-frame compensation, thereby providing a basis for the secondary update of the field qualification status.
[0141] This application further proposes a process for updating the eligibility status of fields based on tongue body contribution features and tongue coating contribution features, including:
[0142] The proportion of continuously translucent areas is obtained from the contribution characteristics of the tongue body, and the proportion of the area of the colored area of the moss layer is obtained from the contribution characteristics of the moss layer. The proportion of continuously translucent areas is used to characterize the proportion of areas in the tongue coating candidate area affected by the continuous translucency of the tongue body background color, and the proportion of the colored area of the moss layer is used to characterize the proportion of areas in the tongue coating candidate area formed by the color contribution of the moss layer itself.
[0143] When the proportion of the continuous translucent area is not less than the preset tongue body contribution threshold, and the proportion of the colored area of the moss layer is less than the preset moss layer contribution threshold, the valid status or compensation valid status in the field qualification status will be updated to the pending verification status. This update indicates that although the moss color field has been obtained through moist reflection stripping or cross-frame compensation, the proportion of the tongue body background color translucent contribution in its apparent color is too high, and the color contribution of the moss layer itself is insufficient. Therefore, the moss color field needs to be processed as a pending verification input.
[0144] It should be noted that updating the field eligibility status is used to evaluate the reliability of the tongue coating color field as a model input feature, and does not negate the diagnostic value of thin, sparse, or no tongue coating. For thin-coated tongue coating, if the continuous translucent area and the low-coating reference area are spatially continuous or adjacent, and the corresponding area is not covered by the moist reflective pollution area, and there is no area in the tongue coating candidate area where the compensation loss ratio exceeds the preset re-examination condition, then it can be identified as a consistent thin-coating state. In the consistent thin-coating state, even if the area of the continuous translucent area is relatively high, the field eligibility status before the update can be maintained, and a valid thin-coating label can be generated. The valid thin-coating label can be used together with the tongue coating color field as input constraint information for the preset constitution candidate identification model, indicating that the color expression of this area mainly comes from the thin or low-coating state, rather than moist reflective pollution or compensation failure.
[0145] When the area of the colored moss layer is not less than the preset moss layer contribution threshold, and the field eligibility status is not frozen, the field eligibility status before the update is maintained. This processing indicates that the moss layer's own color contribution in the moss color field meets the preset requirements and is not frozen, therefore there is no need to lower the field eligibility status due to tongue translucency factors. When the field eligibility status is frozen, it is kept frozen to prevent moss color fields that have been frozen due to contamination or insufficient compensation from being re-upgraded to an inputable state by translucency residual judgment.
[0146] For example, the preset tongue body contribution threshold can be 40%-55%, and the preset tongue coating contribution threshold can be 25%-40%; in one implementation, the preset tongue body contribution threshold is 45%, and the preset tongue coating contribution threshold is 30%. If the area of the continuous translucent region accounts for 51%, the area of the tongue coating area accounts for 19%, and the field qualification status is valid or compensated valid, then the field qualification status is updated to pending re-verification. If the area of the continuous translucent region accounts for 18%, the area of the tongue coating area accounts for 52%, and the field qualification status is not frozen, then the field qualification status before the update is maintained.
[0147] When the field eligibility status is frozen, it remains frozen.
[0148] The updated field eligibility status is used to control the input state of the moss color field into the preset constitution candidate identification model.
[0149] Specifically, when the eligibility status of a field is updated to a state pending recertification, the moss field is controlled to enter the recertification input state; when the eligibility status of a field remains in a valid state or a compensated valid state, the moss field is controlled to enter the valid input state or the compensated valid input state; when the eligibility status of a field remains in a frozen state, the moss field is blocked from entering the preset physical condition candidate identification model.
[0150] Through the above technical solution, this application can use the tongue body contribution characteristics and the coating layer contribution characteristics to perform secondary verification of the field qualification status, so that the coating color field is not only controlled by moist reflection pollution, but also further judged by the components of tongue body color transmission and coating layer color display, thereby reducing the impact of thin coating color transmission on the credibility of the coating color field.
[0151] In one implementation, the process of constructing a preset physical constitution candidate identification model includes:
[0152] A dataset of tongue images is obtained, which includes a sequence of consecutive tongue images captured from multiple subjects in a tongue-out state, as well as candidate constitution annotations corresponding to each subject. These candidate constitution annotations can be generated from a pre-defined constitution scale, manual annotations, or expert review results. They are used as sample labels during the model training phase and are not intended as disease diagnosis conclusions or treatment bases.
[0153] For each sample in the tongue image sample dataset, the following steps are followed to generate a registered tongue image frame sequence, tongue coating candidate area, highlight migration trajectory, texture stability features, moist reflective pollution area, coating preservation area, area to be re-verified area, stripping range, compensation range, preservation range, coating color field, and field eligibility status. Therefore, the coating color field used for model training is not directly derived from single-frame static color statistics, but rather from coating color data after moist reflective stripping, cross-frame compensation, and field eligibility judgment.
[0154] Specifically, a moss color input vector is generated based on the moss color field. This input vector includes at least the Lab color statistics, the Lab color component distribution range, the proportion of retained sources, the proportion of compensated sources, and the field eligibility status code. The field eligibility status code characterizes whether the moss color field is in a valid state, a compensated valid state, a state awaiting re-verification, or a frozen state. For a valid moss color field, the moss color input vector is used as valid input. For a compensated valid moss color field, the moss color input vector and the proportion of compensated sources are used together as compensated valid input. For a moss color field awaiting re-verification, the moss color input vector is appended with a re-verification marker and used as re-verification input. For a frozen moss color field, the moss color input vector is blocked from entering the model, and the frozen marker is used as input constraint information for the model.
[0155] When constructing the model input, tongue color, tongue shape, and tongue surface texture fields can also be obtained. These fields are then concatenated with the tongue coating color input vector to form a sample input feature vector. The tongue color, tongue shape, and tongue surface texture fields can be generated using conventional tongue image processing methods. Whether the tongue coating color field participates in feature concatenation is controlled by the field eligibility status. In other words, the field eligibility status is not a separate output prompt, but rather a state used to control the effective input, compensate for effective input, verify duplicate input, or block input of the tongue coating color field in the model input.
[0156] The pre-defined constitution candidate identification model can be implemented using a classification model, which includes a field input layer, a field eligibility control layer, a feature fusion layer, and a candidate output layer. The field input layer receives tongue color, tongue coating color, tongue shape, tongue surface texture, and field eligibility status codes. The field eligibility control layer controls the input state of the tongue coating field based on its eligibility status. The feature fusion layer fuses the features of each field entering the model. The candidate output layer outputs the candidate probability or candidate ranking result corresponding to each pre-defined constitution candidate category.
[0157] During the model training phase, the sample input feature vector is input into the model to be trained to obtain predicted physical fitness candidate results. The model parameters are then adjusted based on the difference between the predicted physical fitness candidate results and the labeled physical fitness candidate results. After training, a preset physical fitness candidate identification model is obtained. The model can be implemented using a random forest model, gradient boosting tree model, support vector machine model, or neural network classification model. This application does not impose a unique limitation on the specific model structure, as long as it can receive the moss color field under the field eligibility state constraint and output the physical fitness candidate results.
[0158] For example, for a training sample, the generated tongue coating color field has L=70.4, a=5.1, and b=20.0, with a source retention rate of 92.3% and a compensation rate of 7.7%, and the field eligibility status is valid. This tongue coating color field is used as valid input, and together with the tongue color field, tongue shape field, and tongue surface texture field of the sample, they form the sample input feature vector. For another training sample, if the eligibility status of the tongue coating color field is frozen, then the tongue coating color field is blocked from entering the model, and only the frozen marker and other available tongue image fields are input into the model. After the model training is completed, in the actual use stage, based on the tongue image field and field eligibility status of the current target object, auxiliary candidate results for information prompts are output.
[0159] Through the above model construction method, this application enables the preset physical constitution candidate identification model to distinguish different credibility states of the moss color field, avoiding the indiscriminate input of moss color fields that are contaminated by moisture and reflective light, have insufficient compensation, or need to be re-verified into the model, thereby improving the reliability of information prompts for auxiliary candidate results.
[0160] Example 2:
[0161] like Figure 2 As shown, this application provides a constitution identification auxiliary system based on tongue image acquisition domain inversion, used to implement the above-mentioned constitution identification auxiliary method based on tongue image acquisition domain inversion, including:
[0162] The frame sequence acquisition and registration processing module is used to acquire a continuous tongue image frame sequence, perform tongue region recognition and map it to a fixed tongue coordinate system to obtain a registered tongue image frame sequence, perform image extraction on the registered tongue image frame sequence, and obtain a tongue coating candidate area with a limited range of coating color sampling.
[0163] The highlight determination and trajectory generation module is used to calculate the brightness difference and chromaticity dispersion of pixels and their neighbors in the tongue coating candidate area of the registered tongue image frame, determine the connected regions that meet the brightness anomaly condition and chromaticity compression condition as the highlight candidate area, associate the corresponding highlight candidate areas across frames, and obtain the highlight migration trajectory.
[0164] The texture stabilization generation and coupling partitioning module is used to form texture stabilization features in regions where the cross-frame texture response difference with the same coordinate index in the tongue fixed coordinate system meets the texture preservation condition. Based on the highlight migration trajectory and texture stabilization features, the highlight candidate areas that meet the cross-frame migration condition are identified as wet reflective pollution areas, the highlight candidate areas that meet the texture preservation condition are identified as moss preservation areas, and the remaining highlight candidate areas are identified as areas to be re-examined.
[0165] The range division module is used to define the range that overlaps with the moist reflective pollution area in the tongue coating candidate area as the stripping range, the range that overlaps with the area to be re-examined as the compensation range, and the remaining range as the retention range.
[0166] The moss color field processing and candidate output module is used to generate a moss color field and a field eligibility status based on the Lab color statistics of the retained range and the Lab color statistics of the range to be compensated when the same coordinate index in other registered tongue image frames is not covered by the wet reflective pollution area. Based on the field eligibility status, the moss color field is controlled to enter the preset constitution candidate identification model, and auxiliary candidate results for prompting are output.
[0167] The system proposed in this embodiment belongs to the same inventive concept as the method proposed in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0168] The technical scope of this invention is not limited to the content described above. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this invention, and all such modifications and variations should fall within the protection scope of this invention.
Claims
1. A constitution identification auxiliary method based on tongue image acquisition domain inference, characterized in that, include: A continuous tongue image frame sequence is acquired, tongue region recognition is performed and mapped to a fixed tongue coordinate system to obtain a registered tongue image frame sequence. Image extraction is performed on the registered tongue image frame sequence to obtain a tongue coating candidate area with a limited range of coating color sampling. Within the tongue coating candidate region of the registered tongue image frame, the brightness difference and chromaticity dispersion between the pixel and its neighbor are calculated. Connected regions that meet the brightness anomaly condition and chromaticity compression condition are identified as high brightness candidate regions. The high brightness candidate regions corresponding to cross frames are associated to obtain the high brightness migration trajectory. In the fixed coordinate system of the tongue, the regions with cross-frame texture response differences of the same coordinate index that meet the texture preservation conditions form texture stable features. Based on the highlight migration trajectory and texture stable features, the highlight candidate areas that meet the cross-frame migration conditions are identified as wet reflective pollution areas, the highlight candidate areas that meet the texture preservation conditions are identified as moss preservation areas, and the remaining highlight candidate areas are identified as areas to be re-examined. The area overlapping with the moist reflective pollution area in the candidate area of tongue coating is taken as the stripping area, the area overlapping with the area to be re-examined is taken as the compensation area, and the remaining area is taken as the retention area. Based on the Lab color statistics of the retained range and the Lab color statistics of the range to be compensated in other registered tongue image frames when the same coordinate index is not covered by the wet reflective pollution area, a moss color field and a field qualification status are generated. The moss color field is then controlled to enter the preset constitution candidate identification model according to the field qualification status, and auxiliary candidate results for prompting are output.
2. The constitution identification auxiliary method based on tongue image acquisition domain back-inference as described in claim 1, characterized in that, The process of obtaining the highlighted migration trajectory includes: Obtain the center coordinates, region mask, and region area of the highlight candidate region in the fixed coordinate system of the tongue; Based on the center distance, regional overlap and area change of the bright candidate regions in adjacent registered tongue image frames, the bright candidate regions corresponding to the cross frames are associated to obtain the trajectory of the bright region; In the highlighted area trajectory, the migration intensity is generated based on the distance between the center coordinates in adjacent registered tongue image frames and normalized according to the area of the tongue region. In the highlighted area trajectory, the region overlap stability is generated based on the number of intersection pixels and the number of union pixels between the region masks in adjacent registered tongue image frames. Migration intensity and regional overlap stability are incorporated as components of the highlighted migration trajectory.
3. The constitution identification auxiliary method based on tongue image acquisition domain back-inference as described in claim 2, characterized in that, Cross-frame migration conditions include: migration intensity is higher than a preset migration threshold, and regional overlap stability is lower than a preset overlap stability threshold; texture preservation conditions include: the amount of texture response change of the same coordinate index in adjacent registered tongue image frames is lower than a preset texture fluctuation threshold, and the amount of texture direction change is lower than a preset direction change threshold.
4. The constitution identification auxiliary method based on tongue image acquisition domain back-inference as described in claim 1, characterized in that, The process of generating the moss field and the field eligibility status includes: The extent of stripping is not included in the moss color statistics; Obtain the Lab color statistics within the retention range as the direct sampling source for the moss field; When the same coordinate index of the area to be compensated in other registered tongue image frames is not covered by the wet reflective pollution area, the corresponding Lab color statistics value will be used as the cross-frame compensation color information. The moss field is generated based on the Lab color statistics of the retained range and the cross-frame compensation color information, and the field qualification status is generated based on the stripping range, the range to be compensated, and the acquisition status of the cross-frame compensation color information.
5. The constitution identification auxiliary method based on tongue image acquisition domain back-inference as described in claim 4, characterized in that, The process of generating a moss field based on Lab color statistics within the retention range and cross-frame compensated color information includes: Based on the number of samples of Lab color statistics within the retention range and cross-frame compensation color information, the proportion of retention sources and the proportion of compensation sources are determined. Based on the proportion of retained sources and the proportion of compensated sources, a weighted fusion is performed on the Lab color statistics and cross-frame compensated color information within the retained range to generate the moss field.
6. The constitution identification auxiliary method based on tongue image acquisition domain back-inference according to claim 4, characterized in that, The process of generating field eligibility status based on the acquisition status of the stripping range, the range to be compensated, and cross-frame compensation color information includes: The peeling coverage ratio is obtained based on the area ratio of the peeling range in the candidate area of tongue coating; Based on the area of the region in the range to be compensated that has obtained cross-frame compensation color information and the area of the region that has not obtained cross-frame compensation color information, the compensation completion ratio and the compensation missing ratio are obtained. When the stripping coverage ratio is lower than the preset first coverage threshold and the compensation missing ratio is lower than the preset missing threshold, the field qualification status is determined to be valid. When the stripping coverage ratio is not lower than the preset first coverage threshold and the compensation completion ratio meets the preset compensation completion conditions, the field qualification status is determined to be a compensation valid status. When the compensation for the missing proportion meets the preset conditions for re-certification, the field eligibility status will be determined as a state of re-certification. When the stripping coverage ratio is higher than the preset second coverage threshold and the compensation completion ratio does not meet the preset compensation completion conditions, the field eligibility status will be determined to be frozen; wherein, the preset second coverage threshold is higher than the preset first coverage threshold. The eligibility status of a field is determined based on the priority of its status as frozen, pending recertification, valid compensation, and valid status.
7. The constitution identification auxiliary method based on tongue image acquisition domain back-inference according to claim 4, characterized in that, The process of obtaining cross-frame compensated color information includes: Based on the region mask of the area to be compensated, the area, number of connections and distance relationship between the area to be compensated and the boundary of the tongue coating candidate area are determined, and the area to be compensated is determined as a discrete point range, a continuous band range or a boundary transition range. The determination of the boundary transition range takes precedence over the continuous band range, and the determination of the continuous band range takes precedence over the discrete point range. When the range to be compensated is a discrete point range, select the registered tongue image frame whose acquisition time interval meets the preset time proximity condition and whose same coordinate index is not covered by the wet reflective pollution area. When the area to be compensated is a continuous strip, select a registered tongue image frame where the overlap ratio between the wet reflective pollution area and the area to be compensated is lower than the preset migration ratio threshold. When the area to be compensated is the boundary transition area, select the registered tongue image frame with the same coordinate index that meets the texture preservation condition and is not covered by the wet reflective pollution area. Cross-frame compensated color information is generated based on the Lab color statistics in the selected registered tongue image frame.
8. The constitution identification auxiliary method based on tongue image acquisition domain back-inference according to claim 6, characterized in that, After generating the field eligibility status and before executing input control, the following is also included: Based on the registration of tongue image frame sequence, the low-coating reference area is identified. The low-coating reference area is the area of the tongue body that is not covered by the moist reflective pollution area and meets the preset low-coating difference conditions. Obtain the Lab color statistics of the low-coating reference area in the fixed coordinate system of the tongue body, and obtain the apparent Lab color statistics of the target sampling position in the tongue coating candidate area; Based on the spatial distance between the low moss reference area and the target sampling location, a low moss reference area that meets the preset adjacency conditions is determined as the reference source. Color matching weights are determined based on the difference in Lab color components between the reference source and the target sampling location, and spatial adjacency weights are determined based on the spatial distance between the reference source and the target sampling location. Based on color matching weight and spatial adjacency weight, the Lab color statistics of the reference source are weighted and fused to obtain the estimated value of the tongue base color corresponding to the target sampling location; Based on the difference between the statistical values of the apparent Lab color of the tongue coating candidate area and the estimated values of the tongue body background color, a color transmission residual of the coating layer is generated. Tongue contribution features are generated based on regions that meet preset continuous color transmission conditions in the moss layer color transmission residuals, and moss layer contribution features are generated based on regions that meet preset moss layer color development conditions. The eligibility status of the field is updated based on the tongue body contribution feature and the moss layer contribution feature.
9. The constitution identification auxiliary method based on tongue image acquisition domain back-inference according to claim 8, characterized in that, The process of updating the eligibility status of a field based on tongue body contribution features and tongue coating contribution features includes: The proportion of continuous translucent area is obtained from the contribution characteristics of the tongue body, and the proportion of the area of the colored area of the moss layer is obtained from the contribution characteristics of the moss layer. When the proportion of the area of the continuous translucent area is not less than the preset tongue contribution threshold, and the proportion of the area of the moss layer is less than the preset moss layer contribution threshold, the valid status or compensation valid status in the field qualification status will be updated to the status of pending re-certification. When the area of the moss-colored region is not less than the preset moss contribution threshold and the field eligibility status is not frozen, the field eligibility status before the update is maintained. When the field eligibility status is frozen, it remains frozen. The updated field eligibility status is used to control the input state of the moss color field into the preset constitution candidate identification model.
10. A constitution identification auxiliary system based on tongue image acquisition domain reverse inference, characterized in that, The method for implementing the constitution identification auxiliary method based on tongue image acquisition domain inversion as described in any one of claims 1 to 9 includes: The frame sequence acquisition and registration processing module is used to acquire a continuous tongue image frame sequence, perform tongue region recognition and map it to a fixed tongue coordinate system to obtain a registered tongue image frame sequence, perform image extraction on the registered tongue image frame sequence, and obtain a tongue coating candidate area with a limited range of coating color sampling. The highlight determination and trajectory generation module is used to calculate the brightness difference and chromaticity dispersion of pixels and their neighbors in the tongue coating candidate area of the registered tongue image frame, determine the connected regions that meet the brightness anomaly condition and chromaticity compression condition as the highlight candidate area, associate the corresponding highlight candidate areas across frames, and obtain the highlight migration trajectory. The texture stabilization generation and coupling partitioning module is used to form texture stabilization features in regions where the cross-frame texture response difference with the same coordinate index in the tongue fixed coordinate system meets the texture preservation condition. Based on the highlight migration trajectory and texture stabilization features, the highlight candidate areas that meet the cross-frame migration condition are identified as wet reflective pollution areas, the highlight candidate areas that meet the texture preservation condition are identified as moss preservation areas, and the remaining highlight candidate areas are identified as areas to be re-examined. The range division module is used to define the range that overlaps with the moist reflective pollution area in the tongue coating candidate area as the stripping range, the range that overlaps with the area to be re-examined as the compensation range, and the remaining range as the retention range. The moss color field processing and candidate output module is used to generate a moss color field and a field eligibility status based on the Lab color statistics of the retained range and the Lab color statistics of the range to be compensated when the same coordinate index in other registered tongue image frames is not covered by the wet reflective pollution area. Based on the field eligibility status, the moss color field is controlled to enter the preset constitution candidate identification model, and auxiliary candidate results for prompting are output.