A notch identification method and system for a changeover state detection device

CN122989737APending Publication Date: 2026-10-27HANGZHOU HUIJING TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611471810.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0006]本发明的主要目的在于提供一种用于转换状态检测装置的缺口识别方法及系统,旨在解决现有技术中因油污、反光等因素形成的伪边界干扰,导致缺口边界识别不准确,进而影响缺口识别结果可靠性的问题

Benefits of technology

[0046]通过将缺口识别问题从寻找独立的缺口边界线转化为构建与基准边界线连通的缺口负形腔体,本方法能够有效区分真实的缺口结构与孤立的伪边界。由于反光、划痕等形成的伪边界无法与基准边界线构成一个物理上连续、完整的腔体结构,因此在腔体生成过程中会被自然排除,从而显著提高了缺口边界线识别的准确性和抗干扰能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989737A_ABST
    Figure CN122989737A_ABST
Patent Text Reader

Abstract

The application provides a gap identification method and system for a conversion state detection device, and relates to the technical field of image recognition. The method comprises the following steps: acquiring a target gap image and determining a target gap identification area; in the area, a reference boundary line corresponding to a fixed detection reference part is extracted according to a preset reference boundary search direction; taking one side of the reference boundary line adjacent to a latch member as a cavity entrance boundary, a gap negative cavity connected with the cavity entrance boundary is generated along a gap cavity development direction, a cavity termination contour on the side of the gap negative cavity away from the reference boundary line is extracted, and a gap boundary line corresponding to the latch member is generated according to the cavity termination contour to generate a gap identification result. The application reversely determines the boundary by constructing a connected negative cavity, can effectively exclude isolated false boundary interference, and improves the accuracy and reliability of identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to a notch recognition method and system for a transition state detection device. Background Technology

[0002] Transition status detection devices, such as image-based detection devices installed near transition equipment like railway turnouts, monitor equipment status by acquiring images of key components. One common detection method involves identifying the size or location of the "gap" formed between a fixed component and a moving component to determine whether the equipment is in the correct locked or transitioned position.

[0003] In existing image recognition-based notch detection schemes, the process typically begins by acquiring an image containing the notch. Then, a region of interest (ROI) is located within the image, and algorithms such as edge detection are used to identify the baseline boundary representing the fixed component and the notch boundary representing the moving component. Finally, the pixel distance between these two boundaries is calculated and converted into physical dimensions using calibration parameters, thus completing the notch identification.

[0004] However, in actual industrial settings, the inspection environment is complex and variable. Equipment surfaces may have oil stains, scratches, metallic reflections, or localized overexposure. These factors can create false boundaries with strong edge features in the image. Traditional edge detection algorithms struggle to distinguish between genuine notch boundaries and these false boundaries, often incorrectly identifying reflective bands or scratches as notch boundaries. This leads to significant deviations in notch identification results, reducing the accuracy and reliability of the inspection.

[0005] To address the above issues, this application presents a notch identification method and system for a transition state detection device. Summary of the Invention

[0006] The main objective of this invention is to provide a notch identification method and system for a transition state detection device, aiming to solve the problem in the prior art where false boundary interference caused by factors such as oil stains and reflections leads to inaccurate notch boundary identification, thereby affecting the reliability of notch identification results.

[0007] To achieve the above objectives, the present invention provides a notch identification method for a transition state detection device. The transition state detection device includes an image acquisition unit disposed facing a detection area and a processing unit connected to the image acquisition unit. The detection area includes a latch member and a fixed detection reference portion corresponding to the latch member. The method includes:

[0008] The image of the target notch acquired by the image acquisition unit is obtained, and the target notch identification region is determined in the target notch image;

[0009] Within the target notch identification area, the reference boundary line corresponding to the fixed detection reference part is extracted according to the reference boundary search direction, and the notch boundary line corresponding to the latch component is extracted according to the notch boundary search direction, wherein the reference boundary search direction and the notch boundary search direction are determined by a preset set of identification parameters;

[0010] Based on the image spacing between the baseline boundary line and the gap boundary line, and the pixel calibration parameters, the gap recognition result is generated and output.

[0011] The method further includes acquiring device model information and installation posture information corresponding to the target gap image, wherein the device model information corresponds to the structural type of the transition state detection device; the installation posture information corresponds to the lateral installation posture, upward installation posture, downward installation posture, and inclined installation posture of the image acquisition unit relative to the detection part, as well as the imaging direction of the detection part in the target gap image.

[0012] The method for determining the target gap identification region includes:

[0013] Based on the device model information and the installation posture information, a corresponding area positioning template is determined from the preset identification parameter set, and the area positioning template includes detection window contour features;

[0014] Extract localization features that match the contour features of the detection window from the target gap image, and generate candidate gap recognition regions based on the position of the localization features in the target gap image;

[0015] The edge integrity of the candidate gap identification region is verified to obtain the target gap identification region.

[0016] The methods for determining the reference boundary search direction and the gap boundary search direction include:

[0017] Based on the device model information and the installation posture information, the corresponding boundary direction configuration parameters are determined from the preset identification parameter set. The boundary direction configuration parameters include the extension direction of the detection window, the side where the fixed detection reference part is located, and the direction of change of the notch opening of the latch component.

[0018] The boundary extension direction in the target gap identification area is determined according to the extension direction of the detection window, and the direction perpendicular to the boundary extension direction and pointing to the side where the fixed detection reference part is located is determined as the reference boundary search direction.

[0019] The direction of the notch opening change that is perpendicular to the boundary extension direction and points towards the latch member is determined as the notch boundary search direction.

[0020] The methods for extracting the gap boundary line include:

[0021] The cavity inlet boundary is taken as the side of the reference boundary line adjacent to the locking tongue member, and the cavity opening direction is determined according to the search direction of the notch boundary.

[0022] Within the target notch recognition area, a notch negative cavity is generated along the notch cavity unfolding direction, with the cavity inlet boundary as the starting boundary. The notch negative cavity is used to characterize the gap image space formed between the fixed detection reference part and the latch member.

[0023] Extract the cavity termination profile of the negative-shaped cavity away from the reference boundary line, and generate the notch boundary line corresponding to the latch component based on the cavity termination profile.

[0024] The method for generating the notched negative cavity includes:

[0025] The target notch identification region is converted into a local image domain with the cavity inlet boundary as the starting boundary;

[0026] Within the local image domain, a cavity entrance band is generated from the cavity entrance boundary along the unfolding direction of the notched oral cavity, and the cavity entrance band is divided into multiple entrance seed units;

[0027] Using the inlet seed unit as the propagation starting point, the frontal propagation proceeds along the unfolding direction of the notched oral cavity in the local image domain to obtain a propagation area that remains connected to the boundary of the cavity inlet. Isolated bright areas and isolated edge areas that do not form a continuous propagation path from the boundary of the cavity inlet are not included in the propagation area.

[0028] The notched negative cavity is generated based on the propagation region.

[0029] The cavity inlet band is generated in the following ways:

[0030] Multiple boundary sampling points are selected along the boundary of the cavity entrance, and normal offset line segments are generated along the unfolding direction of the cavity with each boundary sampling point as the starting point.

[0031] A strip interpolation is performed on the region between adjacent normal offset line segments to obtain an initial inlet band that continuously fits the boundary of the cavity inlet;

[0032] The initial inlet band is trimmed according to the region boundary of the target gap identification area to obtain the cavity inlet band.

[0033] The aforementioned frontier dissemination includes:

[0034] The current entry seed unit is taken as the current propagation front, and candidate image units that are adjacent to the current propagation front and located in front of the opening direction of the oral cavity are determined in the local image domain.

[0035] The propagation cost corresponding to the candidate image unit is determined, and the candidate image units whose propagation cost satisfies the front advancement condition are incorporated into the current propagation front. The propagation region and the current propagation front are updated based on the incorporated image units. The propagation cost is determined according to the grayscale continuity relationship, texture sparsity relationship and deviation relationship of local edge direction relative to the expansion direction of the notched oral cavity between adjacent image units in the local image domain.

[0036] Repeat the process of candidate image unit determination, propagation cost determination, and current propagation front update until the current propagation front is blocked by the image structure corresponding to the locking tongue component in the direction of the oral cavity unfolding, to obtain the propagation region corresponding to the current entry seed unit, and select another entry seed unit as the current entry seed unit, until all entry seed units have been processed.

[0037] The method for generating the cavity termination contour includes:

[0038] In the notched negative cavity, a distal boundary unit is determined on the side away from the reference boundary line along the unfolding direction of the notched cavity.

[0039] Multiple far-end boundary cells are sorted and connected to generate far-end leading edge curves;

[0040] Based on the continuity of adjacent curve segments in the distal leading edge curve, the fracture location is repaired by curve splicing to obtain the cavity termination contour.

[0041] A gap identification system for a transition state detection device, the system comprising:

[0042] The image acquisition and region localization module is used to acquire the target gap image acquired by the image acquisition unit and determine the target gap recognition region in the target gap image, wherein the target gap image includes a latch component and a fixed detection reference part corresponding to the latch component;

[0043] The boundary extraction module is used to extract the reference boundary line corresponding to the fixed detection reference part according to the reference boundary search direction within the target notch identification area, and to extract the notch boundary line corresponding to the latch member according to the notch boundary search direction. The notch boundary line is obtained by generating a notch negative cavity that is connected to the side of the latch member adjacent to the reference boundary line, and extracting the cavity termination contour on the side of the notch negative cavity away from the reference boundary line.

[0044] The gap result generation module is used to generate and output the gap recognition result based on the image spacing between the reference boundary line and the gap boundary line and the pixel calibration parameters.

[0045] Compared with the prior art, the beneficial effects of the present invention are:

[0046] By transforming the notch identification problem from finding independent notch boundary lines to constructing a notch negative-shaped cavity connected to a baseline boundary line, this method can effectively distinguish between real notch structures and isolated pseudo-boundaries. Since pseudo-boundaries formed by reflections, scratches, etc., cannot form a physically continuous and complete cavity structure with the baseline boundary line, they are naturally eliminated during the cavity generation process, thus significantly improving the accuracy and anti-interference ability of notch boundary line identification. Attached Figure Description

[0047] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0048] Figure 1 An exemplary application scenario diagram provided for an embodiment of this application;

[0049] Figure 2 This is a schematic diagram of the transition state detection device provided in the embodiments of this application;

[0050] Figure 3 This is a schematic diagram of the detection area provided in an embodiment of this application;

[0051] Figure 4 This is a schematic flowchart of a gap identification method for a transition state detection device provided in an embodiment of this application.

[0052] Reference numerals: 100, base rail; 110, transition state detection device; 120, transition connection part; 130, switch rail; 140, detection associated part; 1410, fixed detection reference part; 1420, locking tongue component. Detailed Implementation

[0053] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0054] The term "embodiment" as used herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0055] The gap recognition method for a switching state detection device provided in this application can be applied to the contact state detection scenario of railway turnout switching equipment, and is particularly suitable for image recognition of the locking tongue gap of a turnout contact checker. After the turnout is switched into position, the detection rod, indicator rod, or linkage associated with the contact state of the switch rail inside the contact checker will drive the locking tongue component to the corresponding position, forming an observable position detection gap between the locking tongue component and the fixed detection reference part inside the contact checker. This gap is usually exposed through a detection window, observation hole, or detection field of view, and its width, position, or offset can reflect whether the locking tongue component is in the expected position. Therefore, the gap referred to in this application is not an ordinary mechanical clearance, but a state characterization gap formed by the locking tongue component relative to the fixed detection reference part in the contact checker. The object of recognition in this application is not the overall structure of the turnout, but the boundary position and corresponding size of the locking tongue gap in the image.

[0056] In existing maintenance and inspection processes, gaps in the safety inspection device are often identified through manual observation, on-site photographic verification, or simple image measurement. As turnout equipment condition monitoring evolves towards online and image-based methods, image acquisition units can be positioned facing the inspection window of the safety inspection device. These units can periodically acquire images of the latch notch or the notch after a switching action. The processing unit then calculates the notch value based on the edges of the fixed inspection reference and the latch component. This method reduces the uncertainty of manual inspection and on-site readings, but its reliability is significantly affected by on-site imaging conditions. Turnout sections are typically in open or semi-enclosed environments, and the area around the safety inspection device is subject to vibration, dust, moisture, oil, metal scratches, maintenance residue, and variations in lighting angle. Furthermore, the image acquisition unit is often limited by installation space, typically only able to acquire images from outside the inspection window or at an angle, making it impossible to obtain a perfectly straight, uniformly illuminated ideal view.

[0057] In the aforementioned real-world scenarios, the latch components and fixed detection reference parts inside the security sensor are mostly metal parts. Under supplementary lighting, the detection window, latch end face, edge, or inner wall are prone to strong localized reflections. Reflective bright bands, oil film edges, scratch boundaries, or mirror lines formed by the inner wall of the window may extend along the latch edge direction and closely approximate the true latch boundary in terms of grayscale abrupt changes, linear continuity, and local sharpness. For conventional image processing algorithms, if only the most obvious edge line is searched in a preset direction, it is easy to identify the reflective pseudo-boundary as the notch boundary line corresponding to the latch component. More complexly, the true latch boundary may not be sharp enough in some images due to oil stains, local shadows, or imaging tilt, while the reflective pseudo-boundary is clearer, resulting in a seemingly complete recognition result with a high edge response, but the output notch value has deviated from the true in-place state.

[0058] The concept of this application is not simply to improve edge detection accuracy, nor is it merely to filter out interference lines through thresholds, confidence levels, or manual corrections. Instead, it redefines the identification object by combining the formation mechanism of the notch in the latch of the detector. For the detector, the side of the fixed detection reference part near the latch member can be regarded as the reference entrance of the notch space, and the side where the latch member is located constitutes the termination position of the notch space; the actual notch is essentially a continuous gap image space formed between the fixed detection reference part and the latch member. Although reflective lines and scratch lines may appear as clear linear features in the image, they are usually attached to the metal surface or the reflection path of the detection window and do not constitute a gap space that extends continuously from the side of the fixed detection reference part to the side of the latch member.

[0059] Based on this understanding, the embodiments of this application can, after identifying the reference boundary line corresponding to the fixed detection reference part, use the side of the reference boundary line adjacent to the latch member as the cavity entrance boundary, and generate a notch negative cavity that communicates with the cavity entrance boundary along the opening direction of the latch notch. This notch negative cavity is used to characterize the actual visible gap formed between the fixed detection reference part and the latch member in the detector, rather than characterizing any bright line, dark line, or high gradient edge in the image. Subsequently, the notch boundary line corresponding to the latch member is deduced from the cavity termination contour on the side of the notch negative cavity away from the reference boundary line. In this way, the latch notch boundary is not directly determined by the strongest edge response in a single frame image, but by the termination position after the notch space is continuously expanded from the reference side.

[0060] After adopting the above processing logic, when there is metal reflection, oil film bright band, wear mark pseudo line or partial occlusion in the detection window of the turnout close contact inspector, as long as such interference cannot form a gap image space that continuously expands from one side of the fixed detection reference part, it will usually not become the far end termination contour of the negative cavity of the gap. This can reduce the probability of mistaking the reflective pseudo boundary as the lock tongue boundary, which is more in line with the physical formation relationship of the lock tongue gap in the turnout close contact inspector. It can improve the stability of lock tongue gap identification under complex imaging conditions on site, and provide a more reliable boundary basis for the subsequent output of gap size, gap offset or position detection image results.

[0061] refer to Figure 1 , Figure 1 This is an exemplary application scenario diagram provided for an embodiment of this application.

[0062] like Figure 1 As shown in the embodiments of this application, the gap identification method for a transition state detection device can be applied to the transition state detection scenario of railway turnouts. Figure 1 The diagram illustrates the base rail 100, transition state detection device 110, transition connection part 120, switch rail 130, and detection association part 140 in this application scenario. The switch rail 130 is capable of changing its contact position relative to the base rail 100. The transition connection part 120 forms a mechanical linkage with the switch rail 130, used to transmit displacement or state changes related to the transition action of the switch rail 130. The transition state detection device 110 is located near the transition connection part 120 and is correspondingly arranged with the detection association part 140 to perform state detection on the detection parts associated with the transition position of the switch rail 130.

[0063] In one exemplary application, the transition state detection device 110 can be a detection device for detecting the contact state or locking indication state of the switch rail, and the detection associated part 140 can correspond to the detection part related to the latch notch in the transition state detection device 110. After the switch rail 130 completes the transition action under the drive of the transition connection part 120, the latch member associated with the transition state can move to the corresponding position and form a target notch between itself and the fixed detection reference part to characterize the transition position. The notch recognition described in this application embodiment is to identify the boundary position, image spacing or converted size of the target notch in the image, rather than directly judging the mechanical state of the base rail 100, switch rail 130 or transition connection part 120.

[0064] It should be noted that, Figure 1This is mainly used to illustrate the application relationship of the embodiments of this application in the scenario of railway turnout switching state detection, wherein only the positional relationship between the base rail 100, the switching state detection device 110, the switching connection part 120, the switch rail 130 and the detection associated part 140 is schematically shown. Figure 1 The specific structures of the locking tongue component, fixed detection reference part, image acquisition unit, and processing unit inside the transition state detection device 110 are not shown. These structures can be further described in conjunction with subsequent embodiments. Figure 1 This should not be interpreted as a limitation on the specific shape, installation method, or internal detection structure of the transition state detection device 110.

[0065] refer to Figure 2 , Figure 2 This is a schematic diagram of the transition state detection device provided in an embodiment of this application.

[0066] like Figure 2 As shown, the transition state detection device 110 includes an image acquisition unit facing the detection area and a processing unit connected to the image acquisition unit, wherein:

[0067] The image acquisition unit is used to acquire images of the target notch corresponding to the detection area. The image acquisition unit can be one of an industrial camera, a miniature camera, an endoscopic camera module, a CMOS image sensor module, or a CCD image sensor module. Considering the small internal space of the detector, the narrow detection window, and the presence of oil stains, reflections, and partial obstructions on site, the image acquisition unit can also be configured with at least one of a fixed-focus lens, a macro lens, a wide-angle lens, a ring-shaped supplementary light component, a side supplementary light component, a polarizer, a dustproof light-transmitting cover, or a sealed mounting base to ensure stable imaging of the latch notch area. For example, the image acquisition unit can use a CMOS miniature industrial camera with LED supplementary lighting, fixed to the outside of the detector's detection window by a sealed bracket, so that its imaging field of view covers the latch component, the fixed detection reference part, and the target notch formed between them.

[0068] The processing unit receives the target notch image acquired by the image acquisition unit and performs notch recognition processing on the target notch image. The processing unit can be one or more combinations of an embedded processor, industrial control computer, edge computing module, microcontroller, digital signal processor, field-programmable gate array, graphics processor, or neural network processor. The processing unit can be integrated inside the transition state detection device 110, or it can be located in a field control box, monitoring host, or edge computing terminal that is communicatively connected to the transition state detection device 110. Specifically, the processing unit can store a preset set of recognition parameters and pixel calibration parameters, determine the target notch recognition area, extract the reference boundary line corresponding to the fixed detection reference part and the notch boundary line corresponding to the latch member, and generate a notch recognition result based on the image spacing between the reference boundary line and the notch boundary line.

[0069] In one example, the image acquisition unit and the processing unit can be connected via wired communication, such as USB, Ethernet, serial communication interface, MIPI interface, or LVDS interface; or via wireless communication, such as wireless LAN, cellular communication, or short-range wireless communication. The processing unit can periodically trigger the image acquisition unit to acquire images of the target gap, or it can trigger the image acquisition unit to acquire images upon receiving a turnout conversion completion signal, a security detector status detection signal, or an external inspection command.

[0070] The above structure is only used to illustrate the implementation of image acquisition and image processing in the transition state detection device 110, and does not constitute a limitation on the specific model, installation form or connection method of the image acquisition unit and the processing unit.

[0071] refer to Figure 3 , Figure 3 This is a schematic diagram of the detection area provided in an embodiment of this application.

[0072] like Figure 3 As shown, the detection area includes a fixed detection reference part 1410 and a latch member 1420 disposed opposite to the fixed detection reference part 1410. The fixed detection reference part 1410 may be a reference block, reference edge, reference end face, or fixed reference member fixed in position relative to the device housing inside the switching state detection device 110, which is used to provide a fixed position reference when identifying the latch notch. The latch member 1420 may be a latch, latch end, latch rod, or detection member linked to the latch that changes position with the switch switching state, closed state, or locked indication state.

[0073] exist Figure 3In the example shown, the fixed detection reference 1410 is located on one side of the detection area, and the latch member 1420 is located on the opposite side of the fixed detection reference 1410. A target gap region is formed between the boundary of the fixed detection reference 1410 facing the latch member 1420 and the boundary of the latch member 1420 facing the fixed detection reference 1410. The target gap region is the object of gap recognition in this embodiment of the application, and it can be represented in the image as a visible gap, offset opening, or positioning detection interval between the fixed detection reference 1410 and the latch member 1420.

[0074] It should be noted that, Figure 3 This illustration is solely for showing the relative relationship between the fixed detection reference 1410, the latch member 1420, and the target notch area, and should not be construed as limiting the specific shape, size, number, or arrangement direction of the fixed detection reference 1410 and the latch member 1420. In other embodiments, the fixed detection reference 1410 may be located to the left, right, upper, or lower side of the latch member 1420; the latch member 1420 may also change its position relative to the fixed detection reference 1410 by means of extension, swinging, or lateral movement, as long as both can form a target notch within the detection field of view to characterize the transition to the correct position, all are applicable to the embodiments of this application.

[0075] Next, with reference to the accompanying drawings, the notch identification method for a transition state detection device provided in the embodiments of this application will be further described. Figure 4 The methods shown include:

[0076] S1: Acquire the target gap image acquired by the image acquisition unit, and determine the target gap identification region in the target gap image;

[0077] In this embodiment, the target gap image can be an image acquired by the image acquisition unit facing the detection window of the security detector after the railway turnout has completed its switching action. The image includes at least the fixed detection reference part, the locking tongue component, and the target gap formed between the two. Since the security detector is usually installed near the turnout switching connection, there are conditions such as vibration, dust, water vapor, oil film, metal reflection, and limited image acquisition angle on site. If the boundary is extracted directly from the whole image, it is easily affected by the window frame, screw edges, reflections on the locking tongue surface, or maintenance scratches.

[0078] Therefore, this step first determines the target notch recognition area in the target notch image, so that subsequent recognition is concentrated within the local image range corresponding to the latch notch. The target notch recognition area can be determined based on the structural type, installation posture, detection window contour features, and historical calibration position of the transition state detection device. For example, the rectangular contour or fixed edge contour of the detection window can be identified first, and then a local area can be cropped according to the positional relationship of the latch notch relative to the detection window.

[0079] S2: Within the target notch identification area, extract the reference boundary line corresponding to the fixed detection reference part according to the reference boundary search direction, and extract the notch boundary line corresponding to the latch component according to the notch boundary search direction, wherein the reference boundary search direction and the notch boundary search direction are determined by a preset set of identification parameters.

[0080] In this embodiment, the fixed detection reference part can be a reference stop, reference block, or fixed end face that is fixed in position inside the detector. The locking tongue component can be a locking tongue end, locking tongue rod, or detection component that moves with the change of the turnout's tight contact state or locking indication state. The reference boundary line is used to characterize the fixed reference boundary of the fixed detection reference part facing the locking tongue component, and the notch boundary line is used to characterize the movable boundary of the locking tongue component facing the fixed detection reference part.

[0081] S3: Generate and output the gap recognition result based on the image spacing between the reference boundary line and the gap boundary line and the pixel calibration parameters.

[0082] In this embodiment, the image spacing can be understood as the projected distance between the reference boundary line and the notch boundary line in the notch opening direction, which can reflect the target notch width or offset between the fixed detection reference part and the latch component. In actual calculation, multiple sampling positions distributed along the boundary extension direction can be selected within the target notch recognition area to obtain the local image distance between the reference boundary line and the notch boundary line respectively. Then, the target image spacing is determined according to the median value, weighted average value, or stable interval average value of the sampling distance to reduce occasional deviations caused by local oil stains, occlusion, or edge breakage.

[0083] Before detailing the specific technical aspects of the steps, this application's embodiments need to reiterate:

[0084] For a transition state detection device, the latch component and the fixed detection reference are not two isolated mechanical edges in the image; the target gap formed between them is the actual object reflecting the transition state. In other words, the information in the image that can be used to calculate the gap value does not simply come from a gray-scale abrupt change in a single edge line, but rather from the local imaging relationship formed by the fixed detection reference, the latch component, and the gap space between them. If latch gap recognition is simplified to finding the clearest straight edge in the image, the influence of the internal structure of the detector on light propagation, surface reflection, and the formation of the visible gap is easily overlooked.

[0085] Those skilled in the art will understand that the latch components, edges, inner walls of the window, and mounting base of the detector typically possess strong metallic reflective properties. Linear features appearing in the target notch image do not necessarily correspond to the actual structural boundary. Some linear features may originate from the actual contour of the latch end face, while others may originate from the reflection path of supplementary light rays on the metal surface or inner wall of the window. They may also originate from visual boundaries formed by oil films, scratches, local shadows, or surface wear. These linear features from different sources may have similar extension directions and edge intensities in the image, but their spatial relationship with the target notch is not the same. The actual latch boundary should be located on the terminating side of the target notch space, while reflective rays, scratch lines, or oil film lines are more often seen as local textures attached to the metal surface and cannot stably define the effective gap between the fixed detection reference and the latch components.

[0086] Next, we will further elaborate on the technical content of the method of this application regarding the target gap identification region.

[0087] In one example, the method further includes acquiring device model information and installation posture information corresponding to the target gap image, wherein the device model information corresponds to the structural type of the transition state detection device; the installation posture information corresponds to the lateral installation posture, upward installation posture, downward installation posture, and inclined installation posture of the image acquisition unit relative to the detection part, as well as the imaging direction of the detection part in the target gap image.

[0088] In this embodiment, the device model information can be obtained from the equipment number, nameplate code, factory configuration file, field maintenance registration information, or model parameters pre-stored in the processing unit of the transition state detection device. Alternatively, it can be determined by image recognition when the target notch image contains a model identifier, detection window shape features, or device housing outline features. The device model information is not limited to a specific product name, but is used to characterize the structural differences of the transition state detection device. For example, the detection window may be a horizontal window, a vertical window, or an offset window; the latch member may be horizontally inserted, vertically inserted, or obliquely exposed in the image; the fixed detection reference part may be located on the left, right, upper, or lower side of the latch member; and the approximate distribution range of the target notch within the detection window.

[0089] In this embodiment, the installation posture information can be determined by the posture configuration parameters written during installation and debugging, the preset installation direction of the image acquisition unit mounting bracket, on-site calibration records, posture sensor acquisition information, or the detection window direction features in the target gap image. The installation posture information is at least used to characterize the imaging direction of the image acquisition unit from the side, top, bottom, or tilt direction of the detection area, as well as the imaging direction of the fixed detection reference part and the latch component in the target gap image. For example, when the image acquisition unit is installed sideways, the latch gap may appear as a change in opening in the left-right direction in the target gap image; when the image acquisition unit is installed top- or bottom-up, the latch gap may appear as a change in opening in the top-bottom direction; when the image acquisition unit is installed at an angle relative to the detection window, the detection window outline, reference boundary, and latch boundary may appear tilted in the target gap image. The installation posture information is used to convert the latch movement relationship in actual space into a search direction relationship in the image, thereby providing a basis for subsequently determining the area positioning template, the reference boundary search direction, and the gap boundary search direction.

[0090] In this embodiment, the device model information and installation posture information corresponding to the target notch image can be used together as index conditions for a preset identification parameter set. The preset identification parameter set can be established during device factory calibration, on-site installation and debugging, or historical image calibration. It includes at least one or more of the following: detection window contour features corresponding to different structural types and installation postures, relative position of the target notch, region truncating ratio, candidate side of the reference boundary, candidate side of the latch boundary, direction of notch opening change, and pixel calibration parameters. Those skilled in the art will understand that the specific fields of the device model information and installation posture information can be set according to the type of transition state detection device used on-site, as long as they can at least meet the requirement of locating the area where the latch notch is located from the target notch image. This application does not impose further limitations.

[0091] In one optional implementation, the construction of the recognition parameter set can refer to the template calibration and region of interest configuration methods commonly used in industrial machine vision inspection. Specifically, during the factory commissioning or on-site installation and commissioning phase, standard notch images can be acquired for different structural types of transition state detection devices. In the standard notch images, the fixed detection reference part, the latch component, and the target notch are all in a recognizable state. Subsequently, the commissioning personnel or calibration program calibrate the detection window outline, the side where the fixed detection reference part is located, the side where the latch component is located, and the area where the target notch is located in the standard notch images. The region positioning template is determined according to the extension direction of the detection window outline, and the reference boundary search direction and the notch boundary search direction are determined according to the relative position of the fixed detection reference part and the latch component. Then, the pixel calibration parameters are determined by combining the standard notch block, the known size scale, or the known size of the detection window, thereby forming a recognition parameter set corresponding to the device model information and installation posture information.

[0092] In one example, the method for determining the target gap identification region includes:

[0093] Based on the device model information and the installation posture information, a corresponding area positioning template is determined from the preset identification parameter set, and the area positioning template includes detection window contour features;

[0094] Extract localization features that match the contour features of the detection window from the target gap image, and generate candidate gap recognition regions based on the position of the localization features in the target gap image;

[0095] The edge integrity of the candidate gap identification region is verified to obtain the target gap identification region.

[0096] In this embodiment, the target notch image can first be grayscaled, local contrast enhanced, and edge extracted. Then, the localization features matching the detection window contour features can be searched in the target notch image. The matching method can be contour template matching, line segment combination matching, corner point matching, or affine registration based on feature points. Taking the detection window as an approximately rectangular window as an example, candidate line segments can be extracted from the target notch image first. Two sets of line segments with similar directions and parallel to each other can be combined to form the candidate window contour. Then, the localization features can be determined based on the ratio of the long and short sides, the corner point position, and the difference between the window area and the region localization template. The allowable difference in the ratio of the long and short sides can be determined based on the calibration fluctuation in the standard notch image. For example, the average ratio of the long and short sides of the window in 30 standard notch images of the same model device is 2.35, and the maximum normal deviation is 0.12. Then, 2.23 to 2.47 can be used as the ratio range of the candidate window contour.

[0097] Once the location features are determined, the relative position of the gap in the region location template can be mapped to the current image based on the position of the location features in the target gap image, thereby generating candidate gap recognition regions. The mapping process can be implemented using translation, rotation, scaling, or affine transformation, depending on the installation posture of the image acquisition unit and the degree of deformation of the detection window in the image.

[0098] For example, the region localization template pre-records the lateral offset, vertical offset, region width, and region height of the target notch region relative to the upper left corner of the detection window. After the detection window outline in the target notch image is identified, a correspondence can be established based on the corner coordinates of the current detection window and the corner coordinates of the template window, and then the notch region in the template is synchronously transformed into the current image. For tilted installation postures, the candidate notch recognition region may not use a horizontal rectangle, but rather a tilted quadrilateral region consistent with the extension direction of the detection window, so that the subsequent boundary search direction is consistent with the actual opening direction of the latch notch in the image. The resulting candidate notch recognition region typically covers the side of the fixed detection reference unit facing the latch member, the side of the latch member facing the fixed detection reference unit, and the target notch between the two, while excluding the window shell, screws, installation gaps, and background structures as much as possible.

[0099] It should be noted that edge integrity verification can be performed around the fixed edges and window edges that should appear within the candidate notch recognition area. For example, within the expected edge band of the candidate notch recognition area, the continuous length of effective edge points, the consistency of edge direction, and the positional deviation between the edge band and the region positioning template can be statistically analyzed. Effective edge points can be understood as image points whose edge gradient direction and the expected direction of the template do not exceed a preset angle, and whose edge response is higher than the local background response of the current image. The preset angle can be determined by the fluctuation of the same edge direction in the calibration image. For example, if the standard deviation of the edge direction obtained from calibration is 3°, then three times the standard deviation can be taken and expanded outward by 1°, with 10° as the allowable angle. The edge integrity condition can be set as follows: the proportion of the effective edge length within the expected edge band to the corresponding edge length of the template is not less than the integrity threshold, and the offset of the center of the candidate notch recognition area relative to the center of the template mapping does not exceed 10% of the width of the candidate area. The integrity threshold can be obtained by statistically analyzing qualified calibration images of the same model and installation posture. For example, if the average effective edge length ratio of 30 qualified images is 0.88 and the standard deviation is 0.04, then the mean minus twice the standard deviation can be taken as the integrity threshold, which is 0.80. When the ambient light is strong but the window outline is still recognizable, the integrity threshold can be relaxed to 0.75. Candidate gap recognition areas that meet the above edge integrity conditions can be used as target gap recognition areas. If multiple candidate areas exist, the area with the smallest deviation from the area positioning template and a higher effective edge continuous length is preferred.

[0100] It is important to emphasize that the aforementioned matching of region localization templates and verification of edge integrity can both be achieved using relatively mature image localization and region verification techniques in machine vision inspection. For example, region localization template matching can be achieved using contour template matching, feature point matching, corner point matching, geometric combination matching after Hough line detection, or template registration based on affine transformation; edge integrity verification can be performed using methods such as edge continuity length statistics, edge direction consistency judgment, contour closure judgment, or localization deviation verification. The above processing is mainly used to stably limit the target notch recognition area to the vicinity of the latch notch within the detection window, which is a preprocessing step that provides the image basis for subsequent notch boundary recognition.

[0101] In yet another example, the determination of the reference boundary search direction and the gap boundary search direction includes:

[0102] Based on the device model information and the installation posture information, the corresponding boundary direction configuration parameters are determined from the preset identification parameter set. The boundary direction configuration parameters include the extension direction of the detection window, the side where the fixed detection reference part is located, and the direction of change of the notch opening of the latch component.

[0103] The boundary extension direction in the target gap identification area is determined according to the extension direction of the detection window, and the direction perpendicular to the boundary extension direction and pointing to the side where the fixed detection reference part is located is determined as the reference boundary search direction.

[0104] The direction of the notch opening change that is perpendicular to the boundary extension direction and points towards the latch member is determined as the notch boundary search direction.

[0105] In this embodiment, the boundary direction configuration parameters can be configured simultaneously when the recognition parameter set is established. For a transition state detection device with the same structural type and the same installation posture, the long side direction or main extension direction of the detection window can be calibrated in a standard notch image, and the side of the detection window where the fixed detection reference part is located, as well as the direction in which the notch opening changes relative to the fixed detection reference part, can be recorded. The extension direction of the detection window can be understood as the direction in the detection window that is roughly parallel to the boundary of the notch of the latch. For example, when the detection window is arranged horizontally, the extension direction of the detection window can correspond to the horizontal or approximately horizontal direction in the image; when the detection window is arranged vertically, the extension direction of the detection window can correspond to the vertical or approximately vertical direction in the image; when the image acquisition unit is installed at an angle, the extension direction of the detection window can be obtained by fitting the straight line segments corresponding to the two long sides of the detection window, rather than being fixed as the horizontal or vertical direction in the image coordinates. Thus, the target notch recognition under different installation postures no longer depends on a unified image coordinate direction, but adapts to the actual imaging direction of the detection window in the current image.

[0106] When determining the boundary extension direction, window edge segments can be extracted first from the target gap recognition area or detection window positioning area, and then the line segment corresponding to the long side or main edge of the window in the region positioning template can be selected as the reference edge. If there are two opposing window edge segments, the average direction of the two can be taken as the boundary extension direction; if one edge is incomplete due to occlusion or reflection, the other complete edge segment can be used in combination with the relative positional relationship in the region positioning template. To avoid local burrs or short scratches affecting the direction determination, segments that are too short can be removed before edge segment fitting. For example, segments whose length is less than 10% of the long side length of the detection window template can be excluded as short interference segments; this ratio can be determined based on the shortest stable length of the effective window edge in the standard gap image. For example, if the average length of the long side of a certain type of detection window in the calibration image is 320px and the shortest stable length of the effective edge is about 45px, then 32px can be taken as the short segment exclusion boundary. The above values ​​are only examples and can be adjusted according to the image resolution and window size, as long as the line segment used to determine the boundary extension direction comes from the main contour of the detection window.

[0107] After obtaining the boundary extension direction, the reference boundary search direction and the notch boundary search direction can be determined based on the normal direction of the boundary extension direction. Since the target notch formed between the fixed detection reference part and the latch member usually changes in width along a direction perpendicular to the boundary extension direction, the two opposite directions perpendicular to the boundary extension direction correspond to the side where the fixed detection reference part is located and the side where the latch member is located, respectively. After the side where the fixed detection reference part is located is pre-recorded in the identification parameter set, the normal direction pointing to the side where the fixed detection reference part is located can be used as the reference boundary search direction to find the stable boundary of the fixed detection reference part facing the latch member in the target notch identification area; at the same time, the other normal direction pointing to the direction of notch opening change of the latch member is used as the notch boundary search direction to define the direction in which the negative cavity of the notch expands from the reference side to the latch side.

[0108] Next, the technical content regarding the boundary line in the embodiments of this application will be further elaborated.

[0109] In this embodiment, the boundary lines specifically include the reference boundary line and the notch boundary line. It is understood that the boundary line does not necessarily represent a real physical etched line or artificially marked line in the detection area, but rather a graphical linear result extracted from the target notch image to characterize the position of the corresponding structural contour. For the latch notch recognition scenario of the key detector, a target notch is formed between the fixed detection reference part and the latch component. The width or offset of the target notch in the image needs to be determined by the structural boundaries on both sides. Therefore, the boundary line's function is to convert the identifiable contours of the fixed detection reference part and the latch component in the image into a linear reference that facilitates the calculation of image spacing.

[0110] The reference boundary line is used to characterize the boundary position of the fixed detection reference part facing the target gap. The fixed detection reference part typically does not change position within the switching state detection device during turnout switching operations, and its corresponding boundary can serve as a fixed reference for calculating the gap size in the target gap image. The reference boundary line can correspond to the end face edge, flange edge, fixed reference edge within the window, or other image contours that can stably characterize the position of the fixed detection reference part. Even if the fixed detection reference part has a certain thickness, chamfer, or local wear in the actual structure, as long as the extracted image contour can stably represent the position of the fixed detection reference part facing the latch member, it can be used as the reference boundary line in this embodiment.

[0111] The notch boundary line characterizes the boundary position of the latch member facing the fixed detection reference. The latch member's position changes depending on the turnout's closed or locked state, and its position relative to the fixed detection reference directly affects the opening of the target notch in the image. Therefore, the notch boundary line does not refer to the entire outer contour of the latch member, but rather to the image boundary within the latch member that defines the termination position of the target notch. This notch boundary line can correspond to the end edge of the latch, the side edge of the latch, or the edge of a detection component linked to the latch, as long as it reflects the contour of the latch member relative to the fixed detection reference that forms the target notch.

[0112] It should be noted that the baseline boundary line and the notch boundary line can be represented as a straight line, an approximately straight line, a piecewise line, or a fitted linear result; it is not required that the image naturally contains complete, continuous, and absolutely straight edges. In field images, due to the influence of oil stains, reflections, scratches, shadows, or imaging angles, the local edges of the fixed detection baseline and the latch component may appear broken, partially blurred, or slightly tilted. To facilitate subsequent calculation of the image spacing between the baseline boundary line and the notch boundary line, the contour result that can represent the main boundary trend of the corresponding structure can be used as the boundary line. Therefore, the boundary line is essentially an image measurement benchmark used for notch identification and size conversion, rather than a limitation on the morphology of the physical structure of the detection area.

[0113] In one optional implementation, the baseline boundary line can be determined using existing directional edge extraction methods in machine vision. Specifically, several search lines or bands can be set along the search direction of the baseline boundary within the target notch recognition area. Gray-level transition positions, gradient extremum positions, or edge response peak positions are detected on each search line or band. The edge points obtained from multiple search positions are then fitted with straight lines or piecewise lines to obtain the baseline boundary line corresponding to the fixed detection baseline. For example, the Sobel operator, Canny edge detection, Hough line detection, least squares line fitting, or a one-dimensional edge localization method based on gray-level projection can be used to complete the above processing. The above methods are commonly used fixed boundary extraction techniques in the field of image measurement. This embodiment only uses them to obtain a stable reference boundary on the side of the fixed detection baseline facing the target notch. The specific algorithm type can be selected according to the clarity, noise level, and computing power of the processing unit of the target notch image; this application does not impose further limitations.

[0114] It should be noted that, theoretically, the notch boundary line in this application can be processed using the same techniques as the reference boundary line. For example, the edge position of the latch component facing the fixed detection reference can be obtained through directional edge extraction, grayscale transition detection, Hough line detection, or line fitting. However, since the notch boundary line corresponds to the active boundary on the latch component side, its imaging state in the target notch image is more susceptible to the effects of reflection from the latch end face, oil film residue, wear marks, shadow occlusion, and installation viewing angle deviation. Especially when the detector window is narrow and the supplementary lighting direction is limited, the surface of the latch component may produce bright bands or dark lines that are approximately parallel to the real latch boundary. These linear features are close to the real notch boundary in terms of local grayscale abrupt changes and extension directions. If the notch boundary line is still simply determined according to the edge response strength, it is easy to have a situation where the boundary line extraction result is complete but the position deviates from the real latch end.

[0115] Based on the aforementioned imaging characteristics, this embodiment does not rely solely on the single edge response of the latch member surface for processing the notch boundary line. Instead, it uses the gap image space formed between the fixed detection reference and the latch member as an intermediate recognition object. Specifically, the fixed detection reference corresponding to the reference boundary line has a relatively stable position, providing a reliable inlet-side reference for the target notch. After generating a notch negative cavity connected to the notch opening direction from this inlet side, the notch boundary line corresponding to the latch member can be obtained from the cavity termination contour on the side of the notch negative cavity away from the reference boundary line.

[0116] In one example, the extraction method for the gap boundary line includes:

[0117] S2.1: The side of the reference boundary line adjacent to the latch member is taken as the cavity entrance boundary, and the cavity opening direction is determined according to the notch boundary search direction;

[0118] Specifically, the reference boundary line corresponds to the contour of the fixed detection reference part facing the latch member. Its position is more stable relative to the latch member and can be used as an entrance side reference for the gap space in the target notch image. For the latch notch image of the detector, the target notch between the fixed detection reference part and the latch member is not an isolated dark or bright area, but a visible gap extending from one side of the fixed detection reference part to the other side of the latch member. If the edge of the latch member is searched directly without determining the entrance side, reflective bright bands, window inner wall edges, or scratches on the latch surface within the target notch recognition area may all participate in boundary extraction. After taking the side of the reference boundary line adjacent to the latch member as the cavity entrance boundary, the subsequent processing is limited to unfolding from the side of the fixed detection reference part to the side of the latch member. Isolated linear features in the image that do not have a continuous spatial relationship with this entrance side will not become the starting point for the generation of the notch cavity.

[0119] In this embodiment, the image side of the latch member relative to the fixed detection reference part can be determined first based on the boundary direction configuration parameters corresponding to the target notch recognition area. Specifically, the reference boundary line can be trimmed to an effective length segment within the target notch recognition area according to its extension direction, and the side of this effective length segment facing the latch member can be defined as the cavity entrance boundary. The effective length segment can be determined based on the left and right boundaries, upper and lower boundaries of the target notch recognition area, and the visible contour of the fixed detection reference part within the area. For example, when the visible length of the reference boundary line within the target notch recognition area is 180 pixels, and approximately 8 pixels at each end are affected by window frame reflections, the middle 164 pixels can be used as the effective length segment of the cavity entrance boundary. If there is a local break in the reference boundary line, the break can be linearly repaired first, and the repaired continuous line segment can be used as the entrance boundary. The repair length of the local break can be determined by referring to the common missing length of the fixed detection reference part edge in the calibration image. For example, the maximum value of the local missing length of the edge in 30 calibration images of the same model device is 11 pixels, so a break of no more than 12 pixels can be considered a repairable break.

[0120] S2.2: Within the target notch recognition area, taking the cavity inlet boundary as the starting boundary, a notch negative cavity connected to the cavity inlet boundary is generated along the notch cavity unfolding direction. The notch negative cavity is used to characterize the gap image space formed between the fixed detection reference part and the locking tongue component.

[0121] Specifically, the negative cavity of the notch is not a dark or bright area obtained after ordinary thresholding of the target notch image, but a connected gap region gradually formed from the cavity entrance boundary along the unfolding direction of the notch cavity. Reflections may occur on the surface of the latch and the fixed detection reference within the detector window; locations with high brightness or strong edges in the image do not necessarily correspond to entity boundaries. Similarly, the interior of the target notch may also exhibit localized bright spots due to the influence of the supplementary lighting direction. When cropping the notch region based on a single grayscale threshold, changes in brightness are easily mistaken for structural changes. By propagating the notch forward from the cavity entrance boundary towards the latch side, the negative cavity of the notch can maintain spatial connectivity with the entrance side of the fixed detection reference. Only image units that can be continuously reached from the entrance side can constitute the gap image space.

[0122] In one example, the notch negative cavity is generated in the following ways:

[0123] S2.2.1: Convert the target notch identification region into a local image domain with the cavity inlet boundary as the starting boundary;

[0124] Specifically, although the target notch recognition area is limited to the vicinity of the latch notch, its direction in the original image may still be affected by the installation angle of the image acquisition unit, the tilt of the detection window, and the assembly error of the detector housing. If negative cavity propagation is performed directly in the original image coordinates, the same model of detector may exhibit inconsistent propagation directions, uneven cavity entrances, and skewed sampling bands in different field images. Based on this, the cavity entrance boundary can be used as one side reference of the local image domain, so that the starting position of the local image domain corresponds to the side boundary of the fixed detection reference unit facing the latch component; at the same time, the notch cavity expansion direction can be used as the depth direction of the local image domain, so that subsequent propagation unfolds along the direction from the fixed detection reference unit towards the latch component.

[0125] In this embodiment, the effective segment of the cavity entrance boundary can be determined first. The line segment that falls within the target notch recognition area and corresponds to the real visible edge of the fixed detection reference part is taken as the starting boundary of the local image domain. If the two ends of the reference boundary line are affected by the detection window frame, oil stains, or occlusion, the two ends can be cropped according to the stable visible length of the reference boundary line in the calibration image. For example, in 30 qualified calibration images of the same model device, the median visible length of the reference boundary line is 180 pixels, and the maximum unstable lengths at both ends affected by window reflection are about 7 pixels and 9 pixels, respectively. Therefore, 10 pixels can be cropped from each end of the reference boundary line in the current image to obtain the effective segment of the cavity entrance boundary used to construct the local image domain. For locally broken reference boundary lines, only short breaks can be repaired. The length of short breaks can be determined according to the statistical results of the local missing length of the fixed detection reference part edge in the calibration image. For example, if the 95th percentile of the local missing length is 12 pixels, then breaks not exceeding 12 pixels can be repaired according to the extension trend of adjacent line segments. Breaks exceeding this length will not be used as effective entry segments for subsequent propagation.

[0126] Furthermore, the local image domain can be obtained by expanding the effective segment of the cavity entrance boundary outward along the expansion direction of the notch cavity. Its range along the entrance boundary covers the effective segment of the cavity entrance boundary, with a certain margin reserved on both sides. Its range along the expansion direction of the notch cavity covers the maximum possible opening of the target notch and the transition area near the locking tongue boundary. This expansion depth can be determined by the standard notch range and pixel calibration parameters corresponding to the device model. For example, if the normal recognition range of a target notch for a certain model of detector is 1.5 mm to 4.0 mm, and the pixel calibration parameter is 0.025 mm per pixel, then 4.0 mm corresponds to approximately 160 pixels. To accommodate installation deviations and edge blurring, a margin of 20 pixels can be added to the 160 pixels, resulting in a local image domain depth of approximately 180 pixels. The lateral margin on both sides of the entrance boundary can be 5% to 8% of the effective length of the entrance. For example, when the effective length of the entrance is 160 pixels, an expansion of 8 to 13 pixels is made on each side.

[0127] S2.2.2: Within the local image domain, a cavity entrance band is generated from the cavity entrance boundary along the expansion direction of the notched oral cavity, and the cavity entrance band is divided into multiple entrance seed units;

[0128] Specifically, the cavity entrance boundary is a linear reference. Propagation initiated solely by this linear boundary is susceptible to errors in single edge point positioning, localized oil contamination, or image blurring. The cavity entrance band can be understood as extending the entrance boundary towards the latch component into a starting area of ​​a certain width. This ensures that subsequent propagation does not originate from discrete edge points, but rather from a band-shaped area that conforms to the fixed detection reference and covers the notch entrance side. Since the actual target notch structurally forms from the side of the fixed detection reference towards the latch component, the entrance band limits the propagation starting point to the physically reasonable notch entrance side, preventing isolated bright spots, isolated scratches, or reflections on the latch surface from being incorrectly used as the starting point for negative cavity generation.

[0129] In one example, the cavity inlet band is generated in the following ways:

[0130] Multiple boundary sampling points are selected along the boundary of the cavity entrance, and normal offset line segments are generated along the unfolding direction of the cavity with each boundary sampling point as the starting point.

[0131] A strip interpolation is performed on the region between adjacent normal offset line segments to obtain an initial inlet strip that continuously fits the boundary of the cavity inlet;

[0132] The initial inlet band is trimmed according to the region boundary of the target gap identification area to obtain the cavity inlet band.

[0133] It should be noted that the aforementioned method for generating the cavity inlet band can be implemented using boundary normal offset and strip region generation techniques commonly used in image processing and computational geometry. Specifically, given the cavity inlet boundary and the expansion direction of the notch cavity, sampling along the boundary, generating offset line segments according to a specified direction, filling or interpolating the region enclosed by adjacent offset line segments, and cropping according to the target region boundary are all existing geometric region construction methods in this field. For example, in the processes of generating regions of interest, expanding edge neighborhoods, constructing contour buffers, and generating local search bands in machine vision, similar boundary expansion, normal offset, and region cropping methods are usually used to obtain strip processing regions. This embodiment only utilizes the above-mentioned conventional geometric construction method to convert the cavity inlet boundary into an inlet seed region that can be used for subsequent negative shape propagation. The specific interpolation method, sampling interval, and cropping algorithm can be adapted according to the image resolution, the length of the cavity inlet boundary, and the size of the target notch recognition region. This application does not impose further limitations on this.

[0134] S2.2.3: Taking the entrance seed unit as the propagation starting point, the frontal propagation is carried out in the local image domain along the expansion direction of the cavity, to obtain a propagation area that is connected to the boundary of the cavity entrance. Isolated bright areas and isolated edge areas that do not form a continuous propagation path from the boundary of the cavity entrance are not included in the propagation area.

[0135] Specifically, for the latch notch image, the true gap space should be continuously accessible from the fixed detection reference point towards the latch component; while isolated bright areas, latch surface scratches, and reflective edges of windows, although they may have a strong visual response, usually lack a path that continuously extends from the entrance boundary. Using connectivity as a basic property of the propagation area allows the negative cavity to be closer to the formation relationship of the "notch space," rather than being drawn to the metal surface texture area by local image features.

[0136] In one example, the frontier propagation includes:

[0137] The current entry seed unit is taken as the current propagation front, and candidate image units that are adjacent to the current propagation front and located in front of the opening direction of the oral cavity are determined in the local image domain.

[0138] Determine the propagation cost corresponding to the candidate image unit, incorporate the candidate image units whose propagation cost satisfies the front advancement condition into the current propagation front, and update the propagation region and the current propagation front based on the incorporated image units;

[0139] Repeat the process of candidate image unit determination, propagation cost determination, and current propagation front update until the current propagation front is blocked by the image structure corresponding to the locking tongue component in the direction of the oral cavity unfolding, to obtain the propagation region corresponding to the current entry seed unit, and select another entry seed unit as the current entry seed unit, until all entry seed units have been processed.

[0140] Specifically, the local image domain is used to describe which image units within the local image domain are more likely to belong to the gap image space that continuously expands from the cavity entrance boundary. Ordinary region segmentation often uses image brightness and edge strength as the main criteria. However, in the image of a key sensor latch notch, reflective bands may be very bright, oil film dark lines may be very deep, and scratch edges may be very sharp. These local features alone are insufficient to stably represent the true notch space. The local image domain does not directly define a certain grayscale range as the notch, but rather focuses on whether there is a continuous propagation relationship between adjacent image units.

[0141] In this embodiment, the local image domain can be divided into multiple image units, which can be single pixels, pixel blocks, or edge fragments. Considering the presence of noise and fine scratches in the on-site image, pixel blocks are preferred as image units, for example, dividing the local image domain into 3-pixel by 3-pixel or 5-pixel by 5-pixel pixel blocks. For an image with a pixel calibration parameter of 0.025 mm per pixel, 3 pixels by 3 pixels corresponds to a local area of ​​approximately 0.075 mm by 0.075 mm, which can preserve the positional changes of the notch boundary; 5 pixels by 5 pixels corresponds to a local area of ​​approximately 0.125 mm by 0.125 mm, which is more suitable for images with more noise or uneven lighting. Forward adjacency and lateral adjacency relationships can be established between adjacent image units. The forward adjacency relationship is arranged along the development direction of the notch cavity and is used to describe the path of the cavity advancing towards the latch side; the lateral adjacency relationship is arranged along the extension direction of the cavity entrance boundary and is used to maintain the lateral continuity of the propagation front within the same cross section.

[0142] Furthermore, the propagation relationship between adjacent image units can be determined by the gray-level continuity relationship, texture sparsity relationship, and local edge direction deviation relationship. The gray-level continuity relationship can be determined based on the average gray-level difference, gray-level change trend, and local contrast of adjacent image units. If the gray-level change between adjacent units is gradual or consistent with the gray-level change trend of the gap near the entrance band, it is more suitable for propagation. The texture sparsity relationship can be determined based on the number of small edges within the image unit, the gray-level fluctuation amplitude, and the density of fine textures. The gap region usually has fewer fine textures than the metal scratch region. The local edge direction deviation relationship can be determined based on the angle between the main edge direction within the image unit and the notch / orifice body expansion direction. Strong edges that laterally cut off the propagation direction are more likely to correspond to the latch termination side or window interference edges, while weak textures extending along the propagation direction should generally not immediately block propagation. All of the above relationships can be converted into propagation costs, and the scale of the propagation cost can be determined through calibration images.

[0143] It should be noted that the propagation cost can be determined using a weighted algorithm. Specifically, the grayscale continuity cost, texture sparsity cost, and edge direction deviation cost can be calculated separately, and each cost can be normalized to between 0 and 1. The smaller the value, the more suitable it is for adjacent image units to be propagated as the same continuous gap space; the larger the value, the more likely there are reflective boundaries, scratch boundaries, latch edges, or window interference edges between adjacent image units. The grayscale continuity cost can be determined based on the average grayscale difference between adjacent image units. For example, the maximum normal value of the average grayscale difference between adjacent image units within the same local image domain can be used as the normalization benchmark. In an 8-bit grayscale image, if the average grayscale difference between adjacent pixel blocks in the actual gap region is usually no more than 18, then 18 can be used as the grayscale continuity normalization benchmark. An average grayscale difference of 9 corresponds to a lower grayscale continuity cost, and an average grayscale difference of 18 or more corresponds to a higher grayscale continuity cost. The cost of sparse texture can be determined based on the number of edge points, grayscale variance, or the number of local texture responses within an image unit. For example, within a 5-pixel by 5-pixel image unit, if the number of effective edge points in the real notch area is usually no more than 4, while the number in the metal scratch area often reaches more than 8, then 4 can be used as a low-texture reference value, and 8 as a high-texture reference value, and the sparse texture cost can be hierarchically normalized accordingly. The cost of edge direction deviation can be determined based on the angle between the main edge direction and the notch cavity expansion direction within the image unit. For example, when the angle is less than 20°, the edge direction is considered to basically conform to the cavity expansion direction, and when the angle is greater than 70°, the edge is considered to be more likely to laterally truncate the propagation path. The 20° and 70° can be determined based on the statistical results of the weak texture direction inside the real notch and the edge direction at the end of the latch in the calibration image, or they can be adjusted according to the tilt angle of the detection window during on-site debugging.

[0144] In this embodiment, the weights of each cost can be configured according to the on-site imaging characteristics of the device. If the reflection in the target gap image is strong, and local bright bands can easily cause a sudden increase in grayscale difference, the weight of grayscale continuity cost can be appropriately reduced, while the weights of texture sparsity cost and edge direction deviation cost can be increased, so that the propagation process is not prematurely interrupted by a single reflective bright band. If there is a lot of oil in the target gap image, and the grayscale of the gap area is generally dark but the texture is relatively smooth, the weights of grayscale continuity cost and texture sparsity cost can be increased, while the weight of edge direction deviation cost can be decreased. For example, in a scene with stable supplementary lighting and weak reflection, the weights of grayscale continuity cost, texture sparsity cost, and edge direction deviation cost can be set to 0.4, 0.3, and 0.3, respectively; in a scene with strong metallic reflection, the weights of the three can be adjusted to 0.25, 0.35, and 0.40. The aforementioned weights can be determined using calibrated images. For example, 30 qualified gap images and 10 gap images containing reflective interference are collected, and the distinguishability of the real gap area and the interference area in the three types of costs is calculated. The cost item with higher distinguishability is assigned a higher weight. The weighted propagation cost can be compared with the propagation passage limit, which can also be obtained from qualified calibrated images. For example, if the median propagation cost of adjacent image units in the real gap area is 0.24 and the mean absolute deviation is 0.05, then 0.34 can be taken as the propagation passage limit. When there is a lot of dust or slight obstruction on site, it can be expanded by 0.03 to 0.05 from 0.34 to avoid the real gap area being truncated prematurely.

[0145] It should be noted that the term "front side" does not refer to the fixed top, bottom, left, and right directions of the corresponding image, but is determined by the aforementioned direction of the notch's expansion. For example, if the expansion direction of the notch is to the right in the target notch image, the image unit adjacent to the right side of the current propagation front is the candidate image unit for the front side. If the expansion direction of the notch is inclined, then the adjacent image unit located in front of the projection in that inclined direction can be used as the candidate image unit. The candidate image unit can include the unit directly in front of the current propagation front, or it can include the unit diagonally in front of the unit directly in front, to accommodate the slight offset of the latch notch edge under inclined imaging conditions. When using a five-pixel by five-pixel image unit, the introduction of the diagonally in front unit is usually only allowed to span one image unit width to avoid lateral diffusion of propagation along the scratch or the oblique edge of the window.

[0146] Furthermore, the propagation access limit can be determined statistically from qualified calibration images of the same model and installation posture. For example, in 30 qualified calibration images, the median propagation cost of adjacent image units within the manually confirmed real gap space is 0.24, and the average absolute deviation is 0.05. Therefore, 0.34 can be taken as the propagation access limit. If the propagation cost of the current candidate image unit does not exceed 0.34 and can be traced back to the current entry seed unit through the already incorporated propagation region, the candidate image unit can be incorporated into the propagation region, and the current propagation frontier is updated with the incorporated image unit. If the propagation cost of the candidate image unit exceeds the access limit, or if its local cost is low but it is only connected to the propagation region through isolated bright spots, narrow scratches, or single-point connections, it is not incorporated into the propagation region. In this case, the candidate image unit that is not incorporated into the propagation region can be marked as an inaccessible image unit or a non-propagation image unit, and it will no longer participate in the expansion as the next round of propagation frontier. However, this processing does not mean that the frontier propagation corresponding to the current entry seed unit ends immediately. For the same current propagation front, there are usually multiple forward candidate image units and oblique forward candidate image units. If a candidate image unit is excluded due to excessive propagation cost, narrow connectivity, or lack of a continuous entry path, other candidate image units in the same propagation front can still be evaluated. If other candidate image units meet the front advancement conditions, the candidate image units that meet the conditions are incorporated into the propagation region, and these newly incorporated image units form the updated current propagation front. Thus, when the front propagation encounters local reflective points, local scratches, or local oil stains, it will not be directly interrupted by single-point interference, but can continue to advance along adjacent paths that are still continuous in the real gap image space.

[0147] In one specific implementation, a set of pending frontiers and a set of excluded units can be established for the current entry seed unit. The set of pending frontiers initially includes the current entry seed unit. After each candidate image unit judgment, the current propagation frontier adds candidate image units that meet the frontier advancement conditions to the propagation region and the set of pending frontiers, and adds candidate image units that do not meet the frontier advancement conditions to the set of excluded units. During subsequent propagation, image units in the set of excluded units will not participate in the propagation cost judgment again, avoiding repeated attempts near reflective pseudo-boundaries or scratch boundaries. Propagation continues as long as there are still scalable image units in the set of pending frontiers. The propagation process corresponding to the current entry seed unit ends only when all preceding candidate image units in the set of pending frontiers have been determined to be impassable, or when preceding candidate image units have exceeded the local image domain boundary.

[0148] The current propagation front being blocked by the image structure corresponding to the locking tongue component in the direction of the cavity's expansion can be understood as follows: the propagation area has advanced to the vicinity of the side of the locking tongue component facing the fixed detection reference, and the current propagation front, in the direction continuing towards the locking tongue component, continuously encounters impassable image units, preventing the front from forming a continuous expansion path that satisfies the propagation passage limit and can be traced back to the entrance seed unit. For example, when using 5-pixel by 5-pixel image units, if three consecutive image unit levels ahead of the current propagation front do not produce candidate image units that satisfy the propagation passage limit, and the impassable area extends along the boundary direction covering more than 60% of the propagation width corresponding to the current entrance seed unit, then the propagation branch can be considered to have been blocked by the image structure corresponding to the locking tongue component. The above blocking does not require the locking tongue edge to appear as a complete and clear black-and-white dividing line in the image. As long as the propagation path cannot continue to expand on the locking tongue side due to abrupt grayscale changes, texture densification, lateral edge truncation, or a continuous increase in propagation cost, it can form the basis for termination at the distal end of the cavity.

[0149] S2.2.4: Generate the notch negative cavity according to the propagation region;

[0150] It is understandable that, since the propagation processes of each inlet seed unit are independent, the propagation areas corresponding to different inlet seed units may overlap or be adjacent to each other in local locations, or may form short-distance breaks due to oil stains, reflections, or local occlusions. Therefore, when generating a notched negative cavity based on the propagation area, the propagation areas corresponding to each inlet seed unit can be superimposed according to the image spatial position, and the propagation areas that overlap or have a boundary distance less than a preset merging distance can be merged into the same candidate cavity area. The preset merging distance can be determined according to the image unit size. For example, when the image unit uses a 5-pixel by 5-pixel pixel block, an interval not exceeding the width of one image unit can be used as the merging interval, that is, the interval between adjacent propagation areas does not exceed 5 pixels. If the pixel calibration parameter is 0.025 mm per pixel, then this interval is approximately 0.125 mm, which can usually cover the propagation breaks caused by local reflections or small areas of oil stains, without crossing obviously discontinuous structural areas. After merging, merged regions that have direct or indirect connectivity with the cavity entrance boundary can be retained, while local regions formed solely by isolated entrance seed units, whose propagation depth deviates significantly from adjacent regions and cannot be continuously connected with the main propagation region can be removed, thus obtaining a notch negative cavity used to represent the target notch gap image space.

[0151] S2.3: Extract the cavity termination contour on the side of the notch negative cavity away from the reference boundary line, and generate the notch boundary line corresponding to the latch component based on the cavity termination contour.

[0152] Specifically, after the notch negative-shaped cavity unfolds from one side of the fixed detection reference section, the side furthest from the reference boundary line corresponds to the position where the gap space is restricted by the latch component. Compared to directly extracting the edge of the latch surface, extracting the cavity termination contour from the notch negative-shaped cavity relies on the continuous termination relationship of the gap region, rather than the gray intensity of a single edge point. In the field image, the latch end of the detector may have local edge loss due to reflection, or the boundary gray transition may be slow due to oil film; if only the strong edge at the latch end face is relied upon, the extraction result is prone to jumps between reflected light and the true contour. The cavity termination contour comes from the far outer contour of the continuous gap space. Even if the true boundary of the latch is not clear locally, as long as the notch negative-shaped cavity is stably restricted on the latch side, a contour basis reflecting the termination position of the latch side can still be obtained.

[0153] In this embodiment, the image units in the negative cavity of the notch can be scanned column by column or band by band along the expansion direction of the notch body to determine the image units in each column or each sampling band that are farthest from the reference boundary line and still belong to the propagation area. These image units are then used as far-end boundary units. The sampling bands can be set along the extension direction of the reference boundary line, for example, one sampling band every 3 to 5 pixels. When the target notch image resolution is high, a 3-pixel sampling band can be used to improve contour accuracy; when the image noise is high, a 5-pixel sampling band can be used to improve contour stability. For each sampling band, the last propagating image unit in the expansion direction of the notch body can be selected as the far-end boundary unit, and the far-end boundary units in adjacent sampling bands can be connected along the extension direction of the reference boundary line to form a far-end leading edge curve. If some sampling bands are missing far-end boundary units due to local oil contamination or occlusion, they can be supplemented by adjacent far-end boundary units. The length of the patching can be determined by the length of common local missing parts of the latch edge in the calibration images. For example, if the 95th percentile of the length of local missing parts of the latch edge in 30 calibration images of the same model device is 14 pixels, then missing segments of no more than 15 pixels can be considered as patchable segments. Missing segments exceeding this length can be retained as broken segments, and their weight can be reduced or they can be excluded from the main boundary fitting during subsequent fitting.

[0154] Furthermore, after the cavity termination contour is generated, it can be linearized to obtain the notch boundary line used to calculate the image spacing. Linearization can be achieved using straight-line fitting, piecewise straight-line fitting, or principal direction projection. For cases where the latch end boundary is approximately straight within the target notch recognition area, robust straight-line fitting can be performed on the effective contour points in the distal leading edge curve. For cases where the latch end has slight chamfers or local wear, the chamfered areas at both ends can be removed first, and then the stable contour segment in the middle can be fitted. The removal ratio of the chamfered areas at both ends can be determined based on the calibration image. For example, if the effective width of the latch end is 150 pixels, and the calibration shows that the chamfered or worn area at both ends typically does not exceed 8% of the total width, then 12 pixels can be removed from each end before fitting. If the distal leading edge curve has local bends, it can also be divided into several segments according to the boundary extension direction and fitted separately, then the fitted segment with the maximum overlap length with the reference boundary line can be taken as the notch boundary line. The notch boundary line obtained through the above processing can more stably represent the side boundary of the latch member facing the fixed detection reference, and provide a consistent measurement object for subsequent calculation of the image spacing between the reference boundary line and the notch boundary line.

[0155] In one example, the cavity termination profile is generated in the following ways:

[0156] In the notched negative cavity, a distal boundary unit is determined on the side away from the reference boundary line along the unfolding direction of the notched cavity.

[0157] Multiple far-end boundary cells are sorted and connected to generate far-end leading edge curves;

[0158] Based on the continuity of adjacent curve segments in the distal leading edge curve, the fracture location is repaired by curve splicing to obtain the cavity termination contour.

[0159] In yet another example, embodiments of this application provide a notch identification system for a transition state detection device, the system comprising:

[0160] The image acquisition and region localization module is used to acquire the target gap image acquired by the image acquisition unit and determine the target gap recognition region in the target gap image, wherein the target gap image includes a latch component and a fixed detection reference part corresponding to the latch component;

[0161] The boundary extraction module is used to extract the reference boundary line corresponding to the fixed detection reference part according to the reference boundary search direction within the target notch identification area, and to extract the notch boundary line corresponding to the latch member according to the notch boundary search direction. The notch boundary line is obtained by generating a notch negative cavity that is connected to the side of the latch member adjacent to the reference boundary line, and extracting the cavity termination contour on the side of the notch negative cavity away from the reference boundary line.

[0162] The gap result generation module is used to generate and output the gap recognition result based on the image spacing between the reference boundary line and the gap boundary line and the pixel calibration parameters.

[0163] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A notch identification method for a transition state detection device, the transition state detection device comprising an image acquisition unit disposed facing the detection area and a processing unit connected to the image acquisition unit, characterized in that, The detection area includes a latch component and a fixed detection reference part corresponding to the latch component, and the method includes: The image of the target notch acquired by the image acquisition unit is obtained, and the target notch identification region is determined in the target notch image; Within the target notch identification area, the reference boundary line corresponding to the fixed detection reference part is extracted according to the reference boundary search direction, and the notch boundary line corresponding to the latch component is extracted according to the notch boundary search direction, wherein the reference boundary search direction and the notch boundary search direction are determined by a preset set of identification parameters; Based on the image spacing between the baseline boundary line and the gap boundary line, and the pixel calibration parameters, the gap recognition result is generated and output.

2. The notch identification method for a transition state detection device according to claim 1, characterized in that, The method further includes acquiring device model information and installation posture information corresponding to the target gap image, wherein the device model information corresponds to the structural type of the transition state detection device; the installation posture information corresponds to the lateral installation posture, upward installation posture, downward installation posture, and inclined installation posture of the image acquisition unit relative to the detection part, as well as the imaging direction of the detection part in the target gap image.

3. The notch identification method for a transition state detection device according to claim 2, characterized in that, The method for determining the target gap identification region includes: Based on the device model information and the installation posture information, a corresponding area positioning template is determined from the preset identification parameter set, and the area positioning template includes detection window contour features; Extract localization features that match the contour features of the detection window from the target gap image, and generate candidate gap recognition regions based on the position of the localization features in the target gap image; The edge integrity of the candidate gap identification region is verified to obtain the target gap identification region.

4. The notch identification method for a transition state detection device according to claim 2, characterized in that, The methods for determining the reference boundary search direction and the gap boundary search direction include: Based on the device model information and the installation posture information, the corresponding boundary direction configuration parameters are determined from the preset identification parameter set. The boundary direction configuration parameters include the extension direction of the detection window, the side where the fixed detection reference part is located, and the direction of change of the notch opening of the latch component. The boundary extension direction in the target gap identification area is determined according to the extension direction of the detection window, and the direction perpendicular to the boundary extension direction and pointing to the side where the fixed detection reference part is located is determined as the reference boundary search direction. The direction of the notch opening change that is perpendicular to the boundary extension direction and points towards the latch member is determined as the notch boundary search direction.

5. The notch identification method for a transition state detection device according to claim 1, characterized in that, The methods for extracting the gap boundary line include: The cavity inlet boundary is taken as the side of the reference boundary line adjacent to the locking tongue member, and the cavity opening direction is determined according to the search direction of the notch boundary. Within the target notch recognition area, a notch negative cavity is generated along the notch cavity unfolding direction, with the cavity inlet boundary as the starting boundary. The notch negative cavity is used to characterize the gap image space formed between the fixed detection reference part and the latch member. Extract the cavity termination profile of the negative-shaped cavity away from the reference boundary line, and generate the notch boundary line corresponding to the latch component based on the cavity termination profile.

6. The notch identification method for a transition state detection device according to claim 5, characterized in that, The method for generating the notched negative cavity includes: The target notch identification region is converted into a local image domain with the cavity inlet boundary as the starting boundary; Within the local image domain, a cavity entrance band is generated from the cavity entrance boundary along the unfolding direction of the notched oral cavity, and the cavity entrance band is divided into multiple entrance seed units; Using the inlet seed unit as the propagation starting point, the frontal propagation proceeds along the unfolding direction of the notched oral cavity in the local image domain to obtain a propagation area that remains connected to the boundary of the cavity inlet. Isolated highlighted areas and isolated edge areas that do not form a continuous propagation path from the boundary of the cavity inlet are not included in the propagation area. The notched negative cavity is generated based on the propagation region.

7. The notch identification method for a transition state detection device according to claim 6, characterized in that, The cavity inlet band is generated in the following ways: Multiple boundary sampling points are selected along the boundary of the cavity entrance, and normal offset line segments are generated along the unfolding direction of the cavity with each boundary sampling point as the starting point. A strip interpolation is performed on the region between adjacent normal offset line segments to obtain an initial inlet band that continuously fits the boundary of the cavity inlet; The initial inlet band is trimmed according to the region boundary of the target gap identification area to obtain the cavity inlet band.

8. The notch identification method for a transition state detection device according to claim 6, characterized in that, The aforementioned frontier dissemination includes: The current entry seed unit is taken as the current propagation front, and candidate image units that are adjacent to the current propagation front and located in front of the opening direction of the oral cavity are determined in the local image domain. The propagation cost corresponding to the candidate image unit is determined, and the candidate image units whose propagation cost satisfies the front advancement condition are incorporated into the current propagation front. The propagation region and the current propagation front are updated based on the incorporated image units. The propagation cost is determined according to the grayscale continuity relationship, texture sparsity relationship and deviation relationship of local edge direction relative to the expansion direction of the notched oral cavity between adjacent image units in the local image domain. Repeat the process of candidate image unit determination, propagation cost determination, and current propagation front update until the current propagation front is blocked by the image structure corresponding to the locking tongue component in the direction of the oral cavity unfolding, to obtain the propagation region corresponding to the current entry seed unit, and select another entry seed unit as the current entry seed unit, until all entry seed units have been processed.

9. The notch identification method for a transition state detection device according to claim 5, characterized in that, The method for generating the cavity termination contour includes: In the notched negative cavity, a distal boundary unit is determined on the side away from the reference boundary line along the unfolding direction of the notched cavity. Multiple far-end boundary cells are sorted and connected to generate far-end leading edge curves; Based on the continuity of adjacent curve segments in the distal leading edge curve, the fracture location is repaired by curve splicing to obtain the cavity termination contour.

10. A gap identification system for a transition state detection device, used to implement the gap identification method for a transition state detection device as described in any one of claims 1-9, characterized in that, The system includes: The image acquisition and region localization module is used to acquire the target gap image acquired by the image acquisition unit and determine the target gap recognition region in the target gap image, wherein the target gap image includes a latch component and a fixed detection reference part corresponding to the latch component; The boundary extraction module is used to extract the reference boundary line corresponding to the fixed detection reference part according to the reference boundary search direction within the target notch identification area, and to extract the notch boundary line corresponding to the latch member according to the notch boundary search direction. The notch boundary line is obtained by generating a notch negative cavity that is connected to the side of the latch member adjacent to the reference boundary line, and extracting the cavity termination contour on the side of the notch negative cavity away from the reference boundary line. The gap result generation module is used to generate and output the gap recognition result based on the image spacing between the reference boundary line and the gap boundary line and the pixel calibration parameters.