A mold automatic casting method and system based on visual guidance
Patent Information
- Application Number
- CN202611116307.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-16
AI Technical Summary
[0007]因此,本申请提供了一种基于视觉引导的模具自动浇铸方法及系统,能够解决高温铁水强光辐射形成光晕带遮蔽真实液面边缘,强光导致感光靶面产生残影盲区干扰液面判别的问题
本申请提供了一种基于视觉引导的模具自动浇铸方法及系统,本申请通过分离亮白像素群与暗黑像素群,利用延伸探查线在光晕外扩边界点向暗黑像素群推进,提取灰度变化率折返位置的过渡像素带,准确定位真实侧壁物理边界线。纯净观测窗口的构建去除了光晕带覆盖造成的虚假液面边缘,避免浇注控制系统提前关闭浇注口引发的缩孔缺陷。针对感光靶面热饱和产生的残影盲区,通过构建残影影响范围的几何骨架生成残影盲区,将纯净观测窗口与残影盲区叠加提纯占用冲突段,依据占用冲突段在完整观测路径中的区位执行差异化处置,消除残影对液面判别的持续干扰,保障浇注过程视觉引导的连贯性,降低铸件壁厚不均的报废率。
Smart Images

Figure CN122913491A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of casting pouring control technology, and in particular to a vision-guided automatic casting method and system for molds. Background Technology
[0002] In the casting process of automotive steering knuckle components, molten iron at high temperatures is poured into a narrow and deep mold cavity along the gating system. The molten iron falls to the bottom of the cavity and gradually accumulates. As the liquid level rises, the red-hot molten iron itself radiates strong visible light outward. Due to its enormous thickness and the fact that it is not in direct contact with the molten iron, the sidewalls of the mold cavity remain at a relatively low temperature, appearing as a deep, dark background in the image captured by the visual acquisition equipment.
[0003] When the molten iron rises to the middle of the mold cavity, the intense radiation from the red-hot surface of the molten iron creates a stark contrast with the surrounding dark sidewalls. Conventional visual discrimination methods lack means to suppress the spread of this halo, causing the intense light at the edge of the molten iron surface to diffuse outwards in the visual image, forming an overexposed halo band. This halo band completely covers the meniscus area where the actual molten iron surface contacts the sidewalls.
[0004] The visual acquisition equipment mistook the halo band for the molten iron surface itself, determining the liquid level to be much higher than the actual physical liquid level. The pouring control system mistakenly believed the cavity was about to fill, prematurely closing the pouring gate or slowing the molten iron flow rate, resulting in shrinkage cavities or missing material defects on the upper part of the steering knuckle component.
[0005] Meanwhile, strong light radiation focusing on the photosensitive target surface of the acquisition equipment causes thermal saturation of the target surface pixels. After casting, the photosensitive target surface retains stubborn bright spot afterimages, and the vision acquisition equipment completely loses its ability to capture changes in dim light during subsequent production. The halo swallowing phenomenon caused by the overlap of physical optics is common in deep cavity casting. Conventional threshold blocking or color channel separation methods cannot fundamentally sever the mapping relationship between the halo and the actual liquid surface. The vision system cannot locate the absolute height of the liquid surface, causing the molten iron to flow off course inside the cavity, resulting in severely uneven casting wall thickness after solidification. Summary of the Invention
[0006] In view of the aforementioned problems, this application is hereby filed.
[0007] Therefore, this application provides a vision-guided automatic mold casting method and system, which can solve the problems of halo bands formed by strong light radiation of high-temperature molten iron obscuring the edge of the real liquid surface, and strong light causing afterimage blind spots on the photosensitive target surface to interfere with liquid surface discrimination.
[0008] To solve the above-mentioned technical problems, this application provides the following technical solution: In a first aspect, this application provides a vision-guided automatic casting method for molds, comprising: acquiring a visual acquisition image of the inside of the mold cavity; separating bright white pixel groups and dark pixel groups in the visual acquisition image; marking the bright white pixel groups as halo occlusion areas; and marking the dark pixel groups as environmental reference areas; wherein the bright white pixel groups represent overexposed areas of molten iron surface radiation halo, and the dark pixel groups represent the background color areas of the mold sidewalls that are not directly contacted by molten iron. The radiation starting point is determined based on the geometric centroid of the halo occlusion area, an extended probe line is generated based on the radiation starting point, and the halo expansion boundary point is determined based on the grayscale abrupt change position when the extended probe line advances from the bright white pixel group to the dark pixel group. Based on the outer boundary point of the halo, the extended exploration line is controlled to advance along the dark pixel group to determine the transition pixel zone, and the physical boundary line of the real sidewall is determined based on the transition pixel zone; the transition pixel zone is the folding position where the halo's scattered light intensity cannot cover the background color of the sidewall. A pure observation window is constructed based on the outer boundary point of the halo and the physical boundary line of the actual sidewall, and the casting operation of the mold is controlled based on the pure observation window.
[0009] Preferably, separating the bright white pixel group and the dark black pixel group in the visually acquired image includes: Perform pixel-level grayscale scanning on the visual acquisition screen, extract pixels with grayscale values greater than a first preset grayscale limit as a first pixel set, and extract pixels with grayscale values less than a second preset grayscale limit as a second pixel set. Perform connected component labeling on the first pixel set, retain connected components with an area greater than a preset area limit as the bright white pixel group, and mark the coverage area of the bright white pixel group as the halo occlusion area. Perform connected component labeling on the second pixel set, retain connected components with an area larger than the preset area limit as the dark pixel group, and mark the coverage area of the dark pixel group as the environment reference area; The spatial adjacency relationship between the halo occlusion area and the environmental reference area in the visual acquisition image is determined, and the boundary of halo scattering effect is delineated based on the spatial adjacency relationship.
[0010] Preferably, the step of determining the radiation starting point based on the geometric centroid of the halo-shielding area and generating an extended probe line based on the radiation starting point includes: The geometric center point is extracted based on the edge contour of the halo occlusion area, and the geometric center point is defined as the radiation starting point. Taking the radiation starting point as the origin, multiple tracking rays are emitted outward at preset angular intervals, and the multiple tracking rays are determined as the extended detection lines; Record the first grayscale abrupt change pixel point when each of the extended probe lines enters the dark pixel group from the bright white pixel group, and determine the first grayscale abrupt change pixel point as the halo expansion boundary point; Summarize all the halo expansion boundary points corresponding to the extended exploration lines, and connect adjacent halo expansion boundary points in sequence to generate the actual functional contour line of the halo occlusion area.
[0011] Preferably, the step of controlling the extended probe line to advance along the dark pixel group based on the halo's outward expansion boundary point, determining the transition pixel zone, and determining the physical boundary line of the real sidewall based on the transition pixel zone includes: Control the extended probe line to extend beyond the outer boundary point of the halo into the interior of the dark pixel group, and collect the pixel grayscale change sequence along the path traversed by the extended probe line; Based on the pixel grayscale change sequence, the pixel positions where the grayscale change rate reverses are extracted, and the strip-shaped region formed by the pixel positions where the grayscale change rate reverses is marked as the transition pixel band; Search for grayscale change curves that exhibit a concave arc shape within the transition pixel band, and determine the location of the grayscale change curve with the concave arc shape as a meniscus morphological feature. Based on the relative position of the meniscus morphological features in the transition pixel band, the physical boundary line of the real sidewall is delineated.
[0012] Preferably, the step of constructing a pure observation window based on the outer boundary point of the halo and the physical boundary line of the actual sidewall, and controlling the casting operation of the mold based on the pure observation window, includes: The outer boundary point of the halo is taken as the inner boundary of the pure observation window, and the physical boundary line of the real sidewall is taken as the outer boundary of the pure observation window. Connect the corresponding endpoints of the inner boundary and the outer boundary to generate a closed, clean observation window; Extract the meniscus position coordinates of the molten iron surface within the pure observation window, and input the meniscus position coordinates into the pouring control logic; Based on the comparison between the meniscus position coordinates and the preset target liquid surface coordinates, a pouring flow rate adjustment command is output to the pouring actuator.
[0013] Preferably, before inputting the meniscus position coordinates into the casting control logic, the following steps are included: Historical data of the photosensitive target surface of the visual acquisition device is obtained, and bright spot areas that continuously present high brightness and do not change with the fluctuation of the molten iron surface are extracted as the source of afterimage contamination based on the historical data of the photosensitive target surface. Based on the center pixel coordinates and associated pixel positions of the image retention pollution source, a geometric skeleton of the image retention influence range is constructed. Based on the geometric skeleton, geometric enclosure is performed in the visual acquisition image to generate a closed polygonal afterimage area or a strip-shaped afterimage area, and the polygonal afterimage area or the strip-shaped afterimage area is uniformly marked as the afterimage blind zone.
[0014] Preferably, after performing geometric enclosure based on the geometric skeleton in the visual acquisition image to generate a closed polygonal or strip-shaped afterimage area, the process includes: The boundary of the pure observation window is spatially superimposed with the afterimage blind zone, and the overlapping line segments that fall completely inside the afterimage blind zone are extracted as candidate conflict segments. Extract the initial generation time of the afterimage pollution source, and generate an effective interference period for the afterimage based on the initial generation time and a preset retention time; Obtain the absolute running time of the current casting process, and determine whether the absolute running time falls within the effective interference period of the afterimage; If the absolute running time falls within the effective interference period of the afterimage, the candidate conflict segment will be activated as an occupied conflict segment and written into the effective set.
[0015] Preferably, after activating the candidate conflict segment as an occupied conflict segment and writing it into the effective set, the process includes: The first segmentation point is set based on the light intensity limit blocking position, and the second segmentation point is set based on the dark wall background blocking position or the meniscus shape blocking position. The complete observation path containing the clean observation window is divided into the current device segment, the status relay segment, and the truncated boundary segment using the first segmentation point and the second segmentation point. Exclusive semantic coloring labels are assigned to the current device segment, the state relay segment, and the truncated boundary segment respectively, thereby completing the semantic location label cutting of the complete observation path.
[0016] Preferably, after completing the semantic location label segmentation of the complete observation path, the process includes: Perform spatial overlap matching between the occupied conflict segment and the current device segment, the state relay segment, and the truncated boundary segment, respectively; If the occupied conflict segment overlaps with the current device segment, execute the write permission closing operation of the casting instruction issuing thread and generate a deadlock conflict token; If the occupied conflict segment coincides with the state relay segment, extract the upstream and downstream valid pixels of the state relay segment, construct a relay verification line, and output a manual verification prompt. If the occupied conflict segment coincides with the truncated boundary segment, the truncation type is read and a boundary verification digital form is generated, and a boundary status secondary verification instruction is sent to the acquisition device.
[0017] Secondly, this application also provides a vision-guided automatic mold casting system, including: a vision acquisition device for acquiring a vision image inside the mold cavity; A control device is used to separate bright white pixel groups and dark pixel groups in the visual acquisition image, mark the bright white pixel groups as halo occlusion areas, and mark the dark pixel groups as environmental reference areas. The control device is also used to determine the radiation starting point based on the geometric centroid of the halo occlusion area, generate an extended probe line based on the radiation starting point, and determine the halo outer boundary point based on the grayscale abrupt change position from the bright white pixel group to the dark pixel group based on the extended probe line. The control device is also used to control the extended probe line to advance along the dark pixel group based on the halo expansion boundary point, determine the transition pixel zone, and determine the real sidewall physical boundary line based on the transition pixel zone. The control device is also used to construct a pure observation window based on the outer boundary point of the halo and the physical boundary line of the real sidewall, and to output control commands to the casting execution device based on the pure observation window; A pouring execution device for performing a pouring operation in response to the control command.
[0018] Implementing this application will have the following beneficial effects: This application provides a vision-guided automatic mold casting method and system. By separating bright white pixel groups from dark pixel groups, and using extended probe lines to advance from the halo's outer boundary point towards the dark pixel group, the transition pixel band at the grayscale change rate reversal position is extracted, accurately locating the true physical boundary line of the sidewall. The construction of a clean observation window eliminates the false liquid surface edge caused by the halo band coverage, avoiding shrinkage defects caused by the premature closure of the pouring gate by the pouring control system. For the afterimage blind zone caused by thermal saturation of the photosensitive target, the afterimage blind zone is generated by constructing a geometric skeleton of the afterimage's influence range. The clean observation window and the afterimage blind zone are superimposed to purify the occupied conflict segment. Differential processing is performed based on the location of the occupied conflict segment in the complete observation path, eliminating the continuous interference of the afterimage on the liquid surface judgment, ensuring the continuity of visual guidance during the pouring process, and reducing the scrap rate of castings with uneven wall thickness. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of a vision-guided automatic mold casting method involved in this application; Figure 2 This is a schematic diagram of the transition pixel band foldback feature extraction and verification process of a vision-guided automatic mold casting method involved in this application; Figure 3 This is a flowchart of the afterimage conflict time period judgment and location handling of a vision-guided automatic mold casting method involved in this application; Figure 4 This is an application environment diagram of a vision-guided automatic mold casting method involved in this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0022] Example 1, referring to Figures 1-4 This is the first embodiment of the present application, which provides a vision-guided automatic mold casting method, including: This application provides a method that can effectively solve the problems mentioned above. The following will describe in detail how to implement the vision-guided automatic mold casting method with multiple embodiments. Figure 1 A flowchart of a vision-guided automated mold casting method is shown, including: Step S1: Acquire a visual image of the interior of the mold cavity, separate the bright white pixel group and the dark pixel group in the visual image, mark the bright white pixel group as the halo occlusion area, and mark the dark pixel group as the environmental reference area; the bright white pixel group represents the overexposed area of the molten iron surface radiation halo, and the dark pixel group represents the background area of the mold sidewall that is not directly in contact with the molten iron. In the complex casting environment, high-temperature molten iron is poured into the narrow and deep mold cavity along the gating system. The surface of the red-hot molten iron radiates strong visible light outward, forming a strong contrast between light and dark with the sidewalls of the mold cavity, which are in a relatively low-temperature state and have a deep dark background.
[0023] To accurately isolate the false liquid surface edges caused by the overlap of physical and optical properties, it is necessary to acquire visual images of the mold cavity, separate the bright white pixel groups from the dark pixel groups in the visual images, mark the bright white pixel groups as halo-masked areas, and mark the dark pixel groups as environmental reference areas. Specifically, by separating the bright white and dark pixel groups, an extended probe line is used to advance from the halo's outer boundary point towards the dark pixel group, extracting the transition pixel band at the grayscale change rate reversal position. This accurately locates the true physical boundary line of the sidewall. The construction of a clean observation window eliminates the false liquid surface edges caused by the halo band coverage, avoiding shrinkage defects caused by premature closure of the gating gate by the gating control system.
[0024] Preferably, separating the bright white pixel group and the dark black pixel group in the visual acquisition image includes: Step S1.1: Perform pixel-level grayscale scanning on the visual acquisition screen, extract pixels with grayscale values greater than a first preset grayscale limit as a first pixel set, and extract pixels with grayscale values less than a second preset grayscale limit as a second pixel set. It should be noted that when the visual acquisition image captures a scene of high-temperature molten iron casting, its grayscale distribution directly reflects the difference between the spatial physical light intensity and the light absorption characteristics of the sidewall. Performing pixel-level grayscale scanning on the visual acquisition image means reading the quantized electrical signal value corresponding to each independent pixel unit in the image one by one, following a physical arrangement from left to right and top to bottom. Pixels with grayscale values greater than a first preset grayscale limit, due to receiving strong radiation light from the surface of the red-hot molten iron, exhibit an oversaturated state on the photosensitive target surface; these pixels are extracted and aggregated into a first pixel set. Pixels with grayscale values less than a second preset grayscale limit correspond to the base color area of the mold sidewall that is not directly in contact with the molten iron. These areas, lacking light projection and at low temperatures, reflect extremely weak light; these pixels are extracted and aggregated into a second pixel set.
[0025] In practical applications, let the total number of horizontal pixels in the visual acquisition image be... The total number of vertical pixels is any coordinate point The original grayscale value at that location is defined as Pixels with grayscale values greater than a first preset grayscale limit are extracted as the first pixel set. And extracting pixels with grayscale values less than the second preset grayscale limit as the second pixel set. The mathematical mapping relationship is as follows: ; ; In formulas (1) and (2), the variables Represents the first preset grayscale limit, variable This represents the second preset grayscale limit. Because fluctuations in the molten iron surface cause transient flickering of localized radiation intensity, directly extracting the original grayscale value easily introduces isolated discrete noise points. (Variable...) Representative process The smoothed grayscale value after pixel window mean filtering is calculated as follows: Centered on the target pixel, the original grayscale values of the surrounding 8 neighboring pixels and the pixel itself, totaling 9 pixels, are taken. Find the arithmetic mean.
[0026] For example, in the casting process of automotive steering knuckle components, the first preset grayscale limit... Set to 220, second preset grayscale limit Set to 60, when the smoothed grayscale value of a certain pixel is... When the value reaches 225, the point is included in the first pixel set. The methods for obtaining the first and second preset grayscale limits need to be adaptively calibrated based on the upper limit of the physical tolerance parameter of the photosensitive element of the selected visual acquisition device and the statistical distribution law of the historical measured iron molten radiation intensity distribution dataset.
[0027] Furthermore, when executing the comparison logic, if a pixel row experiences an overall grayscale truncation anomaly due to poor contact of the sensor data line, i.e., the grayscale value of more than 50 consecutive horizontal pixels drops to 0 at the same time, the scanning result of the abnormal pixel row is directly ignored and marked as an invalid row, thus avoiding misjudging the device-level hardware failure as the real physical characteristics of the dark pixel group.
[0028] S1.2, perform connected component labeling on the first pixel set, retain connected components with an area greater than a preset area limit as the bright white pixel group, and mark the coverage area of the bright white pixel group as the halo occlusion area. S1.3, Perform connected component labeling on the second pixel set, retain connected components with an area greater than the preset area limit as the dark pixel group, and mark the coverage area of the dark pixel group as the environment reference area; S1.4, determine the spatial adjacency relationship between the halo occlusion area and the environmental reference area in the visual acquisition image, and delineate the halo scattering boundary based on the spatial adjacency relationship. Specifically, the first and second pixel sets do not present a continuous, hole-free blocky distribution in physical space, but rather are interspersed with discrete fragments caused by flame disturbance or smoke obstruction. Performing connected component labeling on the first pixel set means constructing a blank label matrix with the same size as the original visual acquisition image and initializing all elements to 0.
[0029] Furthermore, an unlabeled pixel is randomly selected from the first pixel set as a seed point and assigned an integer label starting from 1. An 8-connected depth-first search strategy is used to check if there are any unlabeled pixels belonging to the first pixel set within the eight neighboring locations of the seed point. If so, the same label is assigned, and the search continues recursively outwards using that seed point as a new seed point until no pixel meets the condition.
[0030] Furthermore, the total number of pixel units contained within each connected component is accumulated. When this total number exceeds a preset area limit... The connected component is retained as the bright white pixel group, and the area covered by the bright white pixel group is marked as the halo occlusion area.
[0031] When the total number of pixel units in a connected component is less than At that time, it is identified as a transient bright spot of sparks in the air and discarded. Preset area limit. The method for obtaining this information needs to be set based on the proportion of the mold cavity's projected physical area in the visual image and the statistically largest area of historical splash bright spots. For example, setting a preset area limit. If a connected component contains only 120 pixels, it is directly stripped from the first pixel set, with a limit of 500 pixels.
[0032] Furthermore, the second pixel set is subjected to the same 8-connected depth-first search and area filtering operation as the first pixel set, retaining pixels with areas larger than the preset area limit. The connected components are used as the dark pixel group, and the area covered by the dark pixel group is marked as the environment reference area. The bright white pixel group and the dark pixel group often present an alternating topological structure in physical space. To determine the spatial adjacency relationship between the halo occlusion area and the environment reference area in the visual acquisition image, it is necessary to extract the pixel sequence of the outer edge of the halo occlusion area and the pixel sequence of the inner edge of the environment reference area.
[0033] Furthermore, for any pixel point on the outer edge of the halo occlusion area Calculate the pixel sequence of any pixel within the edge of the environment reference area. Euclidean distance between .
[0034] When the Euclidean distance Less than the preset adjacent distance At that time, it is determined that a spatial adjacency relationship exists at that location. Delineating the halo scattering boundary based on the spatial adjacency relationship means connecting all edge pixels that satisfy the adjacency relationship end to end in a clockwise direction to generate a closed broken line trajectory. This broken line trajectory represents the critical trajectory of physical scattering and diffusion of the halo from the strong radiation area to the dark sidewall area.
[0035] For example, when scanning a mold cavity image with a depth of 500 mm, a preset adjacency distance is used. Set to 5 pixel units, preset adjacency distance The method of acquisition is to calculate the equivalent spatial resolution conversion value based on the physical focal length and depth parameters of the visual acquisition lens, so as to accurately capture the edge transition area where the halo engulfs the real liquid surface.
[0036] S2, determine the radiation starting point based on the geometric centroid of the halo occlusion area, generate an extended probe line based on the radiation starting point, and determine the halo expansion boundary point based on the grayscale change position when the extended probe line advances from the bright white pixel group to the dark pixel group. Preferably, the step of determining the radiation starting point based on the geometric centroid of the halo-covered area and generating an extended probe line based on the radiation starting point includes: Step S2.1: Determine the radiation starting point based on the geometric centroid of the halo-shielding area, and generate an extended probe line based on the radiation starting point; Step S2.2: Using the radiation starting point as the origin, emit multiple tracking rays outward at preset angular intervals, and determine the multiple tracking rays as the extended detection lines. In this application, the geometric shape of the halo-masking area in the image often presents an irregular multi-petaled flower shape, and its geometric centroid directly represents the highest convergence center of the radiation energy of molten iron at high temperature. To determine the radiation starting point based on the geometric centroid of the halo-masking area, it is necessary to traverse all effective pixel coordinate points within the halo-masking area, and define the new coordinate point formed by the arithmetic mean of the horizontal coordinate and the arithmetic mean of the vertical coordinate as the geometric centroid.
[0037] Specifically, the set of pixels inside the halo occlusion area can be defined as... The total number of pixels is Radiation starting point The formula for calculating the coordinates is as follows: ; ; In formulas (3) and (4), the variables and They represent sets respectively The x and y coordinates of a single pixel within the area. Radiation origin. Once established, it serves as the absolute physical reference point for subsequent outward exploration. Since the radiation starting point is a decimal coordinate, it needs to be rounded to the nearest integer pixel coordinate for anchoring during actual pixel operations.
[0038] Furthermore, taking the radiation origin as the origin, multiple tracking rays are emitted outward at preset angular intervals, and these multiple tracking rays are determined as the extended probe lines. The generation of the extended probe lines requires the establishment of a polar coordinate system, with the radiation origin as the pole and the horizontal rightward direction as the positive polar axis.
[0039] The preset angle interval is defined as The total number of tracking rays It is determined by the proportional relationship between the angular interval and the inscribed angle, that is... . No. The parametric equations of the extended exploration lines in a Cartesian coordinate system are expressed as follows: ; ; In formulas (5) and (6), the variables This parameter represents the straight-line distance along the ray direction from the radiation origin, and its dimension is pixels. The value range is 0 to Integer values. Preset angle interval. The method for obtaining the halo needs to be set according to the degree of microscopic tortuosity of its outer edge; the higher the degree of tortuosity, the smaller the interval. For example, setting a preset angle interval... If the angle is 5 degrees, then 72 uniformly radiating probe lines are generated. Each probe line in physical space represents a virtual probe with a specific slope extending from the center outwards. This is achieved by adjusting the parameters... The simulation depicts the physical process of a probe gradually moving away from the radiation energy center and advancing towards the dark sidewall, with increments of 1 pixel.
[0040] Step S2.3: Record the first grayscale abrupt change pixel point when each of the extended probe lines enters the dark pixel group from the bright white pixel group, and determine the first grayscale abrupt change pixel point as the halo expansion boundary point; Step S2.4: Summarize the halo expansion boundary points corresponding to all the extended probe lines, and connect adjacent halo expansion boundary points in sequence to generate the actual functional contour line of the halo occlusion area. Specifically, because the extended probe line inevitably traverses regions of different physical light intensities during its journey, its grayscale values will experience significant non-linear drops along the way. Recording the first pixel point of grayscale abrupt change when each of the extended probe lines enters the dark pixel group from the bright white pixel group refers to the pixel point where the parameter... During the continuous incrementing process starting from zero, the current coordinate point is extracted in real time. The corresponding smooth grayscale value And calculate its smoothed grayscale value compared to the previous coordinate point. absolute difference between .
[0041] When the absolute difference First time exceeding the preset grayscale drop limit When a sudden change in grayscale occurs, the current coordinate point is identified as the outer boundary point of the halo. Let the first... The extended exploration line is at the distance parameter A sudden change occurs at a certain point, and the judgment condition is defined by the function as follows: ; In the above formula (7), the condition The intensity attenuation between adjacent detection steps breaks through the natural smooth attenuation rate of physical optical scattering. The coordinates corresponding to the first distance parameter value that satisfies the fall condition are represented.
[0042] Furthermore, the first pixel with a sudden grayscale change is defined as the outer boundary point of the halo, meaning that the area before this point is a strong halo radiation zone, and the light intensity after this point decreases sharply, entering the environmental reference zone. For example, a preset grayscale drop limit can be used. The setting is 80. When the grayscale of the detection point drops directly from 210 to 120, the drop reaches 90 and exceeds the limit, at which point the location is locked. (Preset grayscale drop limit) The method of obtaining the value is to calculate the equivalent mapping ratio of the visual image based on the inverse square law of attenuation of standard optical radiation distance.
[0043] Meanwhile, a single extended exploration line can only provide boundary information in one dimension. In order to restore the overall two-dimensional shape of the halo occlusion area, all the halo expansion boundary points corresponding to the extended exploration lines are summarized, and adjacent halo expansion boundary points are connected in sequence to generate the actual functional contour line of the halo occlusion area.
[0044] Furthermore, the aforementioned acquisition One outer boundary point Arranged in order of their corresponding polar angles, for any two adjacent boundary points and A cubic Bézier curve interpolation algorithm is used to generate smoothly transitioning curve segments.
[0045] Specifically, and As the starting and ending points of the curve, two control points are selected outside the line connecting the two points, at 30% of the line segment length, to control the curvature of the curve, so that the closed curve conforms as closely as possible to the physical fluctuation shape of the outer edge of the halo. In this way, discrete coordinate points are transformed into a continuous closed geometric outline, which accurately delineates the absolute boundary range of the actual spread and expansion of the high-temperature molten iron radiation halo in physical space.
[0046] S3, based on the outer boundary point of the halo, control the extended probe line to advance along the dark pixel group, determine the transition pixel zone, and determine the physical boundary line of the real sidewall based on the transition pixel zone; the transition pixel zone is the foldback position where the halo scattered light intensity cannot cover the background color of the sidewall. Preferably, the step of controlling the extended probe line to advance along the dark pixel group based on the halo's outward expansion boundary point, determining the transition pixel zone, and determining the real sidewall physical boundary line based on the transition pixel zone includes: Step S3.1: Control the extended probe line to extend beyond the outer boundary point of the halo into the interior of the dark pixel group, and collect the pixel grayscale change sequence along the path traversed by the extended probe line. It should be noted that the halo expansion boundary point only marks the termination position of the strong light radiation, while the meniscus region where the actual molten iron surface contacts the dark sidewall is often hidden deep within the dark pixel cluster behind the halo expansion boundary point. Controlling the extended probe line to extend beyond the halo expansion boundary point into the dark pixel cluster refers to, based on the aforementioned parametric equations, adjusting the distance parameter... The initial propulsion value was changed from zero to the distance value corresponding to the outer boundary point of the halo. and continue according to a fixed step size It increments by 1 pixel unit into the dark pixel group.
[0047] In this application, the extension steps into the dark pixel group are defined as follows: The sequence of discrete sampling point coordinates along the exploration path is generated by the following recursive formula: ; ; In formulas (8) and (9), the variables It is a positive integer greater than zero. The extended probe line advances within the dark pixel cluster for the first time. There are 10 sampling coordinate points. Since the calculation result may be a decimal, bilinear interpolation is used to obtain the grayscale value at non-integer coordinates when extracting grayscale.
[0048] In this embodiment, collecting the pixel grayscale change sequence along the path traversed by the extended exploration line involves extracting the interpolated grayscale quantized value corresponding to each coordinate point along the aforementioned sampling coordinate point sequence, and arranging them in chronological order into a one-dimensional discrete numerical array. This one-dimensional discrete numerical array forms the original physical data foundation reflecting the characteristics of faint light changes in the dark sidewall region.
[0049] To filter out discontinuous jump interference caused by sensor thermal noise within dark areas, the acquired one-dimensional discrete numerical array... Perform a one-dimensional Gaussian smoothing convolution operation. Specifically, construct a Gaussian convolution kernel of length 5 with weights assigned as [0.05, 0.25, 0.4, 0.25, 0.05]. Slide the kernel across the grayscale sequence, calculating a weighted sum to replace the value at the original center point. For example, when the grayscale values within a dark pixel group are generally in the range of 30 to 50, a weak bright area of 60 might appear on the local sidewalls due to the residual heat of molten iron during baking. The Gaussian smoothing convolution operation can preserve this weak bright area while suppressing sudden noise spikes, resulting in a continuous and smooth physical transition trend in the grayscale change sequence.
[0050] On the other hand, if the extended probe line touches the physical boundary of the visual acquisition screen during its extension into the dark pixel group, resulting in insufficient sampling points to cover the complete transition area, the current extended probe line's probe action is forcibly truncated, and the data array corresponding to the ray is marked as invalid to avoid index out-of-bounds anomalies in subsequent mathematical deduction stages due to insufficient data length.
[0051] Step S3.2: Based on the pixel grayscale change sequence, extract the pixel positions where the grayscale change rate reverses, and mark the band-shaped region formed by the pixel positions where the grayscale change rate reverses as the transition pixel band. Understandably, the intensity of the halo-scattered light gradually decreases after crossing the outer boundary point, while the dark sidewall background appears as a low-grayscale plateau due to the lack of illumination. The meniscus at the edge of the actual liquid surface reflects weak residual light due to surface tension, causing the grayscale change rate to experience a slight rebound after physically decaying to the background color, before falling back to the background color. This physical process of first decreasing, then increasing, and then decreasing again is the phenomenon of grayscale change rate reversal.
[0052] Furthermore, based on the pixel grayscale change sequence To extract the pixel locations where the grayscale change rate reverses, it is first necessary to calculate the first-order difference value of the grayscale change sequence. Its mathematical mapping formula is as follows: ; In the formula (10), the variable Represents the first in the grayscale change sequence The grayscale value of each sampling point, variable Representing the The grayscale value of each sampling point, variable Representing the The rate of change of grayscale between one sampling point and the next sampling point.
[0053] when A negative number indicates that the grayscale is decreasing. A change from a negative number to a positive number indicates a rebound.
[0054] Specifically, extracting the pixel location where the grayscale change rate bounces back requires monitoring the first-order difference value. The sign-flipping feature precisely anchors the position where the sign changes from negative to positive. Let the set of flipped-back pixel position indices be... Its decision logic is strictly defined by the piecewise function as follows: ; In the above formula (11), the condition and It defines the physical transient where the grayscale at the current position is decreasing while the grayscale at the next adjacent position is increasing.
[0055] Furthermore, the band-shaped region formed by the pixel positions where the grayscale change rate reverses is marked as the transition pixel band, which refers to... The set expands forward and backward from the index position. Each sampling step size aggregates all pixel coordinates within this interval into a two-dimensional spatial strip set. For example, setting an expansion step size... For 3 sampling points, if the bounce-back position is at the 15th sampling point, then the physical coordinates corresponding to sampling points 12 to 18 are all included in the transition pixel band, thus covering the complete weak reflection width of the meniscus. Expanding step size. The method of obtaining the value is to calculate the equivalent pixel value of the meniscus physical width based on the physical constant of the surface tension of liquid metal and the visual resolution.
[0056] Furthermore, under extreme high-temperature baking conditions, the coating layer attached to the side wall surface of the mold may peel off locally. The exposed metal substrate in the peeled area will reflect extremely strong stray light, resulting in a false reflection phenomenon in the grayscale change rate.
[0057] To address this abnormal operating condition, a second-order difference value is introduced. As a threshold for verifying the validity of sign flipping, it is calculated as follows: Only when the grayscale value at the symbol flip position increases by an amount Greater than the preset slight rebound limit And the second difference value A move greater than zero is considered a valid retracement. If the rise at the false retracement level is... Exceeding the preset abnormal peak limit If the location is determined to be specular reflection noise caused by paint peeling, then the location will be directly removed from the target area. Remove from the set. For example, pre-set a weak rebound threshold. Set to 2, preset abnormal spike limit Set to 25, when a rise of 30 is detected, anomaly culling logic is triggered to ensure that the transition pixel band only captures the true physical reflection features of the meniscus. Preset anomaly spike limit. The acquisition method needs to be adaptively calibrated based on the physical parameters of the spectral reflectance of the mold coating and the statistical distribution of abnormal high-brightness noise points collected in history.
[0058] Optionally, when the extraction of the transition pixel band fails on a certain extended probe line, the boundary coordinates of the transition pixel band extracted from the extended probe line at an adjacent angle are automatically retrieved. Let the effective coordinates of the left and right adjacent pixels be... and Using two-point linear interpolation equations The coordinates of the virtual transition pixel band are calculated from the current angle to maintain the spatial continuity of the overall strip region.
[0059] like Figure 2 The diagram illustrates the technical logic for extracting and verifying transition pixel band foldback features. As the extended probe line advances along the dark pixel cluster, the grayscale change sequence of pixels along the path is collected, and the first-order difference value is calculated. When the first-order difference value changes from negative to positive, it is further verified whether the grayscale increase exceeds a preset weak rebound limit and whether the second-order difference value is greater than zero. If the conditions are met, it is determined to be a valid foldback, and the band-shaped region formed by this pixel position is marked as a transition pixel band. If the conditions are not met and the rebound exceeds a preset abnormal peak limit, it is determined to be specular reflection noise caused by paint peeling and is removed from the set. This verification mechanism effectively eliminates pseudo-foldback interference under extreme high-temperature baking conditions, ensuring the accuracy of locating the true physical boundary line of the sidewall.
[0060] Step S3.3: Search for a grayscale change curve exhibiting a concave arc shape within the transition pixel band, and determine the location of the grayscale change curve with the concave arc shape as a meniscus morphological feature; S3.4: Based on the relative position of the meniscus morphological feature within the transition pixel band, delineate the physical boundary line of the actual sidewall. It should be noted that when molten iron accumulates inside the mold cavity, due to the surface tension of the liquid metal and the wetting physical properties of the mold sidewall, a concave meniscus structure will inevitably be formed at the contact point between the edge of the liquid surface and the sidewall.
[0061] Searching for a grayscale change curve with a concave arc shape within the transition pixel band requires remapping the discrete grayscale values within the transition pixel band to discrete point clouds in a two-dimensional spatial coordinate system, where the horizontal axis represents the advancing distance of the extended probe line and the vertical axis represents the corresponding smoothed grayscale value.
[0062] It should be noted that the concave arc shape represents a local curvature extremum in mathematical geometry. To accurately anchor this physical feature, the discrete curvature corresponding to each point in the discrete point cloud is calculated. Its mathematical formula is as follows: ; In the formula (12), the variable Representing the The approximate value of the first derivative at each discrete point, i.e., the aforementioned first difference value. ,variable Representing the The approximate value of the second derivative at each discrete point, i.e., the aforementioned second-order difference value. Denominator term Used to perform geometric scale normalization on curvature calculations, ensuring that the determination of curvature extrema is not affected by the absolute amplitude of grayscale.
[0063] Furthermore, curvature The set of coordinate points that yield the maximum local extremum is defined as the center point of the meniscus morphology.
[0064] Furthermore, defining the location of the grayscale change curve with the concave arc shape as a meniscus morphological feature means that this location corresponds to the peak region in physical space where the residual light reflected from the molten iron meniscus is strongest.
[0065] Understandably, given the objectively defined physical thickness of the meniscus, the extraction process involves using the center point of the meniscus's morphological features as a reference, extending outwards to both sides until the curvature decays to half its extreme value; that is, searching for regions that satisfy... boundary points This process marks all pixels within this range as the complete coverage area of the meniscus morphological feature. For example, when the maximum curvature is 0.8, the search focuses on the two boundaries where the curvature value drops to 0.4, and the grayscale fluctuation curve within this range is completely locked as a concave arc-shaped feature.
[0066] Specifically, the physical boundary line of the real sidewall is defined based on the relative position of the meniscus morphological features within the transition pixel band. The physical boundary line of the real sidewall is not a single pixel, but a continuous line distributed along the direction of the mold sidewall.
[0067] Furthermore, the edge coordinates of the side closest to the dark pixel background within the coverage area of the meniscus morphology feature are extracted, and these edge coordinates are defined as the absolute critical point at which the real liquid surface and the dark sidewall make physical contact.
[0068] Furthermore, the absolute critical points extracted from all extended exploration lines are aggregated, and a second-order least squares polynomial fitting algorithm is used to perform spatial smoothing connections on these discrete critical points.
[0069] The specific operation involves constructing a coefficient matrix. Including the squares of the x-coordinates of each point and the linear term, using the normal equation Solving for the polynomial coefficients generates a continuous, smooth curve that runs through the entire visual acquisition frame. This continuous, smooth curve is ultimately defined as the physical boundary line of the real sidewall. This boundary line completely severs the mapping relationship between the halo band and the real liquid surface, providing a precise physical anchor point for subsequently constructing a clean observation window.
[0070] S4. Construct a pure observation window based on the outer boundary point of the halo and the physical boundary line of the real sidewall, and control the casting operation of the mold based on the pure observation window.
[0071] Preferably, the step of constructing a pure observation window based on the outer boundary point of the halo and the physical boundary line of the actual sidewall, and controlling the casting operation of the mold based on the pure observation window, includes: Step S4.1: Use the outer boundary point of the halo as the inner boundary of the pure observation window, and use the physical boundary line of the real sidewall as the outer boundary of the pure observation window; Step S4.2: Connect the corresponding endpoints of the inner boundary and the outer boundary to generate the closed pure observation window. In order to completely remove the interference of false liquid surface edges caused by halo coverage from the visually acquired image, it is necessary to construct a closed image sub-region that contains only real physical transition information.
[0072] Furthermore, the outer boundary point of the halo serves as the inner boundary of the pure observation window, meaning that the physical defense line of the pure observation window near the center of the molten iron is formed by the critical termination position of halo scattering, which can block the overflow of overexposed strong light from inside the window.
[0073] Furthermore, the physical boundary line of the real sidewall serves as the outer boundary of the pure observation window, meaning that the physical defense line of the pure observation window near the mold sidewall is formed by the contact critical position between the molten iron meniscus and the sidewall, which can mark the absolute height extreme value of the liquid surface.
[0074] Furthermore, connecting the corresponding endpoints of the inner boundary and the outer boundary generates a closed, clean observation window. The inner boundary is obtained as described above. The outer boundary is composed of points on the outer edge of the halo, and the outer edge is composed of corresponding points on the physical boundary line of the real sidewall.
[0075] Furthermore, extract the leftmost and rightmost endpoints of the inner boundary, as well as the corresponding leftmost and rightmost endpoints of the outer boundary.
[0076] For the leftmost endpoint of the inner boundary With the leftmost endpoint of the outer boundary Using the equation of a straight line Generate connecting line segments, and similarly use the equation of a straight line to connect the rightmost endpoint of the inner boundary to the rightmost endpoint of the outer boundary.
[0077] Furthermore, by connecting the inner and outer boundary curves end-to-end using the two vertical line segments mentioned above, a closed annular polygonal region is delineated within the two-dimensional image pixel matrix. This annular polygonal region serves as the pure observation window, and all subsequent judgments regarding the liquid level height are strictly confined to the physical coordinates of this closed window. For example, in an image acquisition with a resolution of 1920 x 1080 pixels, the generated closed polygonal window occupies only a strip-shaped area of 300 pixels horizontally and 150 pixels vertically, greatly compressing the data processing volume and ensuring the purity of feature extraction.
[0078] Step S4.3: Extract the meniscus position coordinates of the molten iron surface within the clean observation window, and input the meniscus position coordinates into the casting control logic. In this embodiment, since the clean observation window has filtered out the dual physical interferences of overexposure halo and dark background, the meniscus morphology features exhibit an extremely high signal-to-noise ratio within the window. Extracting the meniscus position coordinates of the molten iron surface within the clean observation window refers to re-performing the aforementioned grayscale change rate reflection and curvature extremum search operations within the closed polygonal window.
[0079] Understandably, the computational cost of extracting the coordinates of the meniscus center point is significantly reduced because the search range is strictly limited.
[0080] The ordinate of the meniscus center point extracted for each extended exploration line within the window. Perform weighted average calculation The weighting coefficient The weighting is based on the uniformity of light received in the angular region where the probe line is located, with higher weighting assigned to angles directly facing the radiation center of the molten iron and lower weighting assigned to edge angles.
[0081] Further, final The corresponding coordinates are defined as the meniscus position coordinates of the molten iron surface in the current frame.
[0082] Furthermore, the meniscus position coordinate input pouring control logic refers to encapsulating the coordinate value into a standard data frame structure and directly pushing it to the input register of the pouring control state machine via a high-speed industrial bus link, serving as the physical basis for determining the pouring nozzle opening and flow rate adjustment. The weighting coefficient mentioned in this embodiment... The specific method for obtaining this information needs to be pre-calibrated based on the light intensity attenuation distribution model at the center of the lens.
[0083] Preferably, before inputting the meniscus position coordinates into the casting control logic, the following steps are included: Step S4.31: Acquire historical data of the photosensitive target surface of the visual acquisition device, and extract bright spot areas that continuously exhibit high brightness and do not change with the fluctuation of the molten iron surface as the source of afterimage contamination based on the historical data of the photosensitive target surface; Step S4.32: Construct a geometric skeleton of the afterimage influence range based on the center pixel coordinates and associated pixel positions of the afterimage contamination source; Step S4.33: Based on the geometric skeleton, perform geometric enclosure in the visual acquisition screen to generate closed polygonal afterimage areas or strip-shaped afterimage areas, and uniformly mark the polygonal afterimage areas or the strip-shaped afterimage areas as afterimage blind areas. It should be noted that after prolonged exposure to intense light radiation from molten iron, the photosensitive target of the vision acquisition device will experience thermal saturation of its pixels. Even after the casting process is complete and the light has disappeared, persistent bright spots will remain on the photosensitive target, causing the vision system to lose its ability to capture changes in low-light conditions during subsequent production. Acquiring historical data from the photosensitive target of the vision acquisition device refers to reading a sequence of dark-field images output by the vision acquisition device under continuous multi-frame conditions without illumination.
[0084] Furthermore, based on the historical data of the photosensitive target surface, the bright spot area that continuously presents high brightness and does not change with the fluctuation of the molten iron surface is extracted as the source of afterimage contamination. It is necessary to compare the gray value at the same coordinate position in multiple consecutive dark field images.
[0085] In this application, the number of consecutive frames is set to be... When the gray value at a certain coordinate position is The minimum value in the frame image exceeds the preset dark field bright spot limit. Furthermore, the variance of the grayscale value at that location is less than the preset stability limit. When this occurs, the coordinate location is determined to be a source of image retention contamination. For example, a preset boundary for bright spots in a dark field is established. Set to 100, preset stability limit The setting is 5. If the coordinate point (500, 600) consistently outputs a grayscale value between 120 and 125 in historical data, it will be marked as a source of image retention contamination. The preset dark field bright spot limit and preset stable limit are obtained by measuring the dark current physical parameters and thermal noise statistical distribution law of the photosensitive target surface.
[0086] Furthermore, based on the center pixel coordinates and associated pixel positions of the image retention source, a geometric skeleton of the image retention influence range is constructed. The minimum bounding rectangle of the image retention source is extracted, and the geometric center point of this rectangle is defined as the center pixel coordinates.
[0087] Furthermore, morphological thinning operations are employed to strip the outer contour of the afterimage contamination source. Specifically, using a preset 3x3 intersecting structural element, erosion and dilation difference operations are repeatedly performed on the contamination source region to gradually remove edge pixels until only a single-pixel-width connected topology network remains. This single-pixel-width connected network constitutes the geometric skeleton of the afterimage's influence range. Based on this geometric skeleton, geometric enclosure is performed in the visually acquired image to generate a closed polygonal afterimage region or a strip-shaped afterimage region.
[0088] Furthermore, the pre-defined expansion radii are extended outwards and inwards along the normal direction of the geometric skeleton, respectively. Parallel boundary lines are generated on both sides of the skeleton, and the two ends of the boundary lines are closed and connected by semi-circular arcs, thereby generating a closed strip-shaped afterimage area in the visual acquisition image, or a polygonal afterimage area when the skeleton is a closed loop.
[0089] Furthermore, the polygonal or strip-shaped afterimage area is uniformly marked as the afterimage blind zone. This blind zone is an absolute no-go zone where the photosensitive target surface is physically ineffective and cannot provide effective liquid level discrimination data.
[0090] Specifically, the boundary of the image retention blind zone is not statically fixed. As the photosensitive target surface self-heals or ages, the physical area of the image retention blind zone dynamically shifts. Every 1000 frames in the production cycle, the dark field image sequence acquisition and image retention source extraction operations are automatically re-executed, updating the geometric skeleton and the preset expansion radius. This ensures that the boundary of the afterimage blind zone always accurately covers the physical failure area of the target surface. The preset expansion radius mentioned in this embodiment... The specific method for obtaining this information requires adaptive calibration settings based on the physical distance parameters of charge overflow diffusion between pixels on the photosensitive target surface.
[0091] Preferably, after performing geometric enclosure based on the geometric skeleton in the visual acquisition image to generate a closed polygonal or strip-shaped afterimage area, the process includes: Step S4.331: Spatially superimpose the boundary of the clean observation window with the afterimage blind zone, and extract the overlapping line segments that fall completely inside the afterimage blind zone as candidate conflict segments; Step S4.332: Extract the initial generation time of the afterimage pollution source, and generate an effective interference period of the afterimage based on the initial generation time and a preset retention time; Step S4.333: Obtain the absolute running time of the current casting process, and determine whether the absolute running time falls within the effective interference period of the afterimage; Step S4.334: If the absolute running time falls within the effective interference period of the afterimage, activate the candidate conflict segment as an occupied conflict segment and write it into the effective set. Specifically, since the pure observation window is dynamically generated based on the physical state of the molten iron surface in each frame, while the afterimage blind zone is in a fixed or slowly drifting state on the target surface, the two will inevitably overlap in the spatial plane.
[0092] Furthermore, the spatial superposition of the boundary of the clean observation window and the afterimage blind zone refers to inputting the coordinate set of the closed polygon of the clean observation window of the current frame and the coordinate set of the closed polygon of the afterimage blind zone into the two-dimensional spatial Boolean operation engine to perform intersection calculation.
[0093] The specific operation involves traversing each straight line segment on the boundary of the clean observation window, calculating the coordinates of the intersection points of the straight line segment with each side of the afterimage blind zone polygon, and extracting the straight line segment as a coincident line segment if both endpoints of the straight line segment are located inside the afterimage blind zone polygon.
[0094] Furthermore, the overlapping line segments are considered as candidate conflict segments. For example, when a 50-pixel-long line segment on the right boundary of the clean observation window is completely inside the afterimage blind zone polygon, this 50-pixel-long line segment is extracted as a candidate conflict segment.
[0095] Furthermore, not all ghosting contamination sources substantially interfere with the current casting process; ghosting interference exhibits time-dependent characteristics. The initial generation time of the aforementioned ghosting contamination sources is extracted. This refers to the global timestamp corresponding to the first determination of the coordinate location as a source of afterimage contamination in historical data.
[0096] Furthermore, based on the initial generation time and the preset retention time... The effective interference period for generating afterimages, the interval of the effective interference period for afterimages is: Obtain the absolute running time of the current casting process. Determine the absolute running time Whether it falls within the effective interference period of the afterimage, i.e., verifying the inequality. Whether it is valid or not.
[0097] For example, preset retention time The timeframe is set to 3600 seconds. If the initial generation time is 8:00 AM and the current absolute running time is 8:30 AM, then it is determined to fall within the valid interference period. Preset retention time. The method of obtaining the value is based on the natural heat dissipation recovery time constant after the photosensitive target surface is thermally saturated.
[0098] For example, if the absolute running time falls within the effective interference period of the afterimage, the candidate conflict segment is activated as an occupied conflict segment and written into the effective set. The effective set is a dynamic memory table existing in the cache, specifically used to persistently record the physical line segments in the current frame that actually block the observation of the liquid surface.
[0099] Furthermore, the activated conflict segment, along with its spatial coordinate data, the number of its associated extended exploration line, and the identifier of the associated residual pollution source, is serialized and written into the effective set, providing precise blocking boundary input for subsequent semantic location segmentation of the complete observation path.
[0100] Preferably, after activating the candidate conflict segment as an occupied conflict segment and writing it into the effective set, the process includes: S4.3341, Set the first segmentation point based on the light intensity limit blocking position, and set the second segmentation point based on the dark wall background color blocking position or the meniscus shape blocking position; S4.3342, Use the first segmentation point and the second segmentation point to divide the complete observation path containing the clean observation window into the current device segment, the status relay segment, and the truncated boundary segment; S4.3343, Assign exclusive semantic coloring labels to the current device segment, the status relay segment, and the truncated boundary segment respectively, completing the semantic location label cutting of the complete observation path. It's puzzling that the complete observation path containing the clean observation window physically spans multiple regions with distinctly different physical characteristics, including the halo, transition zone, and dark background. Treating the entire path as a single object for afterimage conflict handling would inevitably lead to the rigidity and failure of the fault tolerance strategy. Setting the first dividing point based on the light intensity limit blocking position means finding the physical coordinates corresponding to the halo's outer boundary point on the extended exploration path and setting that coordinate point as the first dividing point.
[0101] Furthermore, setting a secondary segmentation point based on the blocking position of the dark wall background color or the blocking position of the meniscus shape means that after the extended exploration line crosses the first segmentation point, it continues to find the physical coordinates corresponding to the physical boundary line of the real side wall or the coordinates where the gray level drops to the boundary of the dark field background color, and sets the coordinates as the secondary segmentation point.
[0102] Furthermore, the complete observation path containing the clean observation window is divided into the current device segment, the state relay segment, and the truncation boundary segment using the first and second segmentation points. The path interval from the radiation origin to the first segmentation point is defined as the current device segment, which directly reflects the overexposure physical state of the photosensitive target surface of the visual acquisition device. The path interval from the first and second segmentation points is defined as the state relay segment, which contains core calculation logic such as grayscale reflection and meniscus morphology features. The path interval from the second segmentation point to the end point of the extended exploration line is defined as the truncation boundary segment, which is entirely within a dark pixel background and is only used to provide an environmental reference baseline.
[0103] For example, exclusive semantic coloring labels are assigned to the current device segment, the state relay segment, and the truncated boundary segment to complete the semantic location label segmentation of the complete observation path. The semantic coloring labels are physically encoded using predefined 8-bit unsigned integers, with the current device segment assigned a label value of 1, the state relay segment assigned a label value of 2, and the truncated boundary segment assigned a label value of 3.
[0104] It should be noted that, through the aforementioned tag encoding, the originally continuous observation path is divided into independent logical blocks with clearly defined physical property boundaries. Subsequent conflict comparison and disaster recovery can then perform highly customized differentiated operations for different logical blocks. The method for obtaining the light intensity limit blocking position mentioned in this embodiment requires adaptive calibration settings based on the maximum resolvable grayscale levels of the dynamic range of the visual acquisition device.
[0105] Preferably, after completing the semantic location label segmentation of the complete observation path, the process includes: S4.33431, Perform spatial overlap matching between the occupied conflict segment and the current device segment, the state relay segment, and the truncated boundary segment, respectively; S4.33432, If the occupied conflict segment overlaps with the current device segment, perform a write permission closure operation on the casting instruction issuing thread and generate a deadlock conflict token; S4.33433, If the occupied conflict segment overlaps with the state relay segment, extract the upstream and downstream valid pixels of the state relay segment, construct a relay verification line, and output a manual verification prompt; S4.33434, If the occupied conflict segment overlaps with the truncated boundary segment, read the truncation type, generate a boundary verification digital form, and send a boundary state secondary verification instruction to the acquisition device. In this embodiment of the application, since the complete observation path has been divided into three logical blocks with independent physical attributes, the degree of harm caused by occupying conflicting segments into different blocks and the handling strategies are essentially different.
[0106] Furthermore, the spatial overlap matching between the occupied conflict segment and the current device segment, the state relay segment, and the truncated boundary segment refers to calculating the segment length of the occupied conflict segment. The length of the line segment between each logical block Crossover ratio between .
[0107] When the intersection and union ratio Greater than the preset overlap limit When this happens, it is determined that the conflicting segment overlaps with the logical block. For example, a default overlap boundary can be set. The default limit is set to 60%. If 70% of the length of the conflict segment falls into the status relay segment, an overlap is determined to have occurred. The default overlap limit is obtained based on the system's requirements for security redundancy.
[0108] Furthermore, if the occupied conflict segment coincides with the current device segment, it means that the overexposed area of the photosensitive target surface of the visual acquisition device has a persistent afterimage superimposed on it, and the grayscale data provided by the current device segment completely loses its credibility.
[0109] At this point, the write permission of the thread issuing the pouring instruction is disabled. Through a kernel-level mutex mechanism, an operating system primitive is invoked to request a lock on the data write port of the pouring control logic, blocking any control instruction output thread generated based on the current device segment data. Simultaneously, a deadlock conflict token containing a timestamp and conflict coordinates is generated and written to the exception log, forcibly suspending the state machine until manual intervention. For example, when it is detected that the overlap of occupied conflict segments in the current device segment reaches 80%, the mutex lock immediately takes effect, and the pouring port remains stationary at its current opening.
[0110] If the conflicting segment overlaps with the state relay segment, since the state relay segment carries the core task of meniscus morphology feature extraction, the afterimage coverage will directly cause the liquid level height calculation to fail. In this case, the upstream effective pixels of the state relay segment should be extracted. With downstream effective pixels This means acquiring the grayscale data at both ends that are not covered by the afterimage blind zone.
[0111] Furthermore, using two-point linear interpolation equations A relay verification line is constructed between upstream and downstream effective pixels. The grayscale transition trend of the blocked area is estimated through this verification line, and a manual verification prompt is output to the monitoring terminal.
[0112] If the occupied conflict segment coincides with the truncated boundary segment, the truncation type is read and a boundary verification digital form is generated. The specific coordinates and area of the afterimage coverage are recorded, and a boundary status secondary verification instruction is sent to the acquisition device, requiring the device to adjust the exposure parameters and re-acquire the truncated boundary segment image.
[0113] like Figure 3 The diagram illustrates the technical logic for judging and handling afterimage conflict periods in a vision-guided automated mold casting method. First, the absolute running time of the current casting process is obtained, and it is determined whether it falls within the effective interference period of afterimages. If it does, the candidate conflict segment is activated as an occupied conflict segment. Then, the occupied conflict segment is spatially matched with the current equipment segment, the state relay segment, and the truncation boundary segment. Differential handling is performed based on the matching results: if it coincides with the current equipment segment, write permissions are disabled and a deadlock conflict token is generated; if it coincides with the state relay segment, a relay verification line is constructed and a manual verification prompt is output; if it coincides with the truncation boundary segment, a boundary verification digital form is generated and a secondary verification instruction is sent. This process effectively eliminates the continuous interference of afterimages on liquid surface judgment, ensuring the continuity of visual guidance during the casting process.
[0114] Step S4.4: Based on the comparison result between the meniscus position coordinates and the preset target liquid surface coordinates, output the pouring flow rate adjustment command to the pouring actuator. In some embodiments, after successfully extracting the meniscus position coordinates, unaffected by halos and afterimages, from a clean observation window, these coordinates need to be converted into precise control signals for the physical casting actuator. The comparison between the meniscus position coordinates and the preset target liquid surface coordinates refers to calculating the ordinate value of the current meniscus position coordinates. The vertical coordinate value relative to the preset target liquid level coordinates The difference between Difference It represents the physical distance gap between the current cavity filling progress and the target filling progress.
[0115] when When the value is greater than zero, it means that the liquid level has not yet reached the target height, and it is necessary to maintain or increase the pouring flow rate.
[0116] when When the value is less than zero, it means that the liquid level is about to overflow or has exceeded the target height, and the pouring flow rate needs to be reduced quickly.
[0117] Furthermore, the pouring flow rate adjustment command is output to the pouring actuator, based on the difference. The size divides it into multiple linear intervals, each interval being bound to a specific pulse width modulation duty cycle increment.
[0118] like If the value is in the first range, for example, greater than 100 pixel units, a full-load start pulse command is output to the servo motor to drive the ladle to tilt at its maximum angle to achieve rapid filling.
[0119] like In the second range, for example, between 20 and 100 pixel units, the pulse width is reduced linearly to smoothly decrease the pouring flow rate and prevent the liquid level from rising too quickly and causing eddy air entrainment.
[0120] like If the liquid level is in the third range, for example, less than 20 pixels, a micro-stepping pulse command is output to control the pouring nozzle to maintain a very low flow rate until the liquid level is precisely locked at the preset target liquid level coordinates, thus completing the high-quality automatic casting operation of the mold cavity. The method for obtaining the preset target liquid level coordinates mentioned in this embodiment specifically requires pre-calibration mapping based on the three-dimensional topological dimensions of the physical design drawings of the mold cavity.
[0121] like Figure 4 The diagram illustrates the application environment of this application. In the diagram, molten iron at high temperatures accumulates within a narrow, deep mold cavity, radiating intense visible light and forming an overexposed halo that obscures the true meniscus. Simultaneously, this causes a thermally saturated afterimage blind zone on the photosensitive target of the visual acquisition device above. The control device receives the visually acquired image containing both bright and dark pixel groups, constructs a clean observation window to eliminate the false liquid surface edges, and, combined with the logic for handling afterimage conflict areas, outputs precise flow regulation commands to the casting execution device. This environmental architecture intuitively reflects the generation mechanism of optical interference under strong radiation conditions and the technical path of the system to achieve anti-interference closed-loop control through multi-source data fusion and semantic location segmentation, providing a reliable hardware deployment and signal flow reference for high-quality forming of deep-cavity castings.
[0122] Example 2: This example also provides a vision-guided automatic mold casting system, including: a vision acquisition device for acquiring visual images of the inside of the mold cavity; A control device is used to separate bright white pixel groups and dark pixel groups in the visual acquisition image, mark the bright white pixel groups as halo occlusion areas, and mark the dark pixel groups as environmental reference areas. The control device is also used to determine the radiation starting point based on the geometric centroid of the halo occlusion area, generate an extended probe line based on the radiation starting point, and determine the halo outer boundary point based on the grayscale abrupt change position from the bright white pixel group to the dark pixel group based on the extended probe line. The control device is also used to control the extended probe line to advance along the dark pixel group based on the halo expansion boundary point, determine the transition pixel zone, and determine the real sidewall physical boundary line based on the transition pixel zone. The control device is also used to construct a pure observation window based on the outer boundary point of the halo and the physical boundary line of the real sidewall, and to output control commands to the casting execution device based on the pure observation window; A pouring execution device for performing a pouring operation in response to the control command.
[0123] The above-mentioned unit modules can be embedded in the processor of the electronic device in hardware form or independent of it, or they can be stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of the above modules.
[0124] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0125] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A vision-guided automatic mold casting method, characterized in that, include: A visual acquisition image of the inside of the mold cavity is obtained, and the bright white pixel group and dark pixel group in the visual acquisition image are separated. The bright white pixel group is marked as the halo occlusion area, and the dark pixel group is marked as the environmental reference area. The bright white pixel group represents the overexposed area of the radiation halo of the molten iron surface, and the dark pixel group represents the background area of the mold side wall that is not directly contacted by the molten iron. The radiation starting point is determined based on the geometric centroid of the halo occlusion area, an extended probe line is generated based on the radiation starting point, and the halo expansion boundary point is determined based on the grayscale abrupt change position when the extended probe line advances from the bright white pixel group to the dark pixel group. Based on the outer boundary point of the halo, the extended exploration line is controlled to advance along the dark pixel group to determine the transition pixel zone, and the physical boundary line of the real sidewall is determined based on the transition pixel zone; the transition pixel zone is the folding position where the halo's scattered light intensity cannot cover the background color of the sidewall. A pure observation window is constructed based on the outer boundary point of the halo and the physical boundary line of the actual sidewall, and the casting operation of the mold is controlled based on the pure observation window.
2. The vision-guided automatic mold casting method according to claim 1, characterized in that: The separation of bright white pixel groups and dark black pixel groups in the visually captured image includes: Perform pixel-level grayscale scanning on the visual acquisition screen, extract pixels with grayscale values greater than a first preset grayscale limit as a first pixel set, and extract pixels with grayscale values less than a second preset grayscale limit as a second pixel set. Perform connected component labeling on the first pixel set, retain connected components with an area greater than a preset area limit as the bright white pixel group, and mark the coverage area of the bright white pixel group as the halo occlusion area. Perform connected component labeling on the second pixel set, retain connected components with an area larger than the preset area limit as the dark pixel group, and mark the coverage area of the dark pixel group as the environment reference area; The spatial adjacency relationship between the halo occlusion area and the environmental reference area in the visual acquisition image is determined, and the boundary of halo scattering effect is delineated based on the spatial adjacency relationship.
3. The vision-guided automatic mold casting method according to claim 2, characterized in that: The step of determining the radiation starting point based on the geometric centroid of the halo-covered area and generating an extended probe line based on the radiation starting point includes: The geometric center point is extracted based on the edge contour of the halo occlusion area, and the geometric center point is defined as the radiation starting point. Taking the radiation starting point as the origin, multiple tracking rays are emitted outward at preset angular intervals, and the multiple tracking rays are determined as the extended detection lines; Record the first grayscale abrupt change pixel point when each of the extended probe lines enters the dark pixel group from the bright white pixel group, and determine the first grayscale abrupt change pixel point as the halo expansion boundary point; Summarize all the halo expansion boundary points corresponding to the extended exploration lines, and connect adjacent halo expansion boundary points in sequence to generate the actual functional contour line of the halo occlusion area.
4. The vision-guided automatic mold casting method according to claim 1, characterized in that: The step of controlling the extended probe line to advance along the dark pixel group based on the halo's outward expansion boundary points, determining the transition pixel zone, and determining the physical boundary line of the real sidewall based on the transition pixel zone includes: Control the extended probe line to extend beyond the outer boundary point of the halo into the interior of the dark pixel group, and collect the pixel grayscale change sequence along the path traversed by the extended probe line; Based on the pixel grayscale change sequence, the pixel positions where the grayscale change rate reverses are extracted, and the strip-shaped region formed by the pixel positions where the grayscale change rate reverses is marked as the transition pixel band; Search for grayscale change curves that exhibit a concave arc shape within the transition pixel band, and determine the location of the grayscale change curve with the concave arc shape as a meniscus morphological feature. Based on the relative position of the meniscus morphological features in the transition pixel band, the physical boundary line of the real sidewall is delineated.
5. The vision-guided automatic mold casting method according to claim 1, characterized in that: The process of constructing a pure observation window based on the outer boundary points of the halo and the physical boundary lines of the actual sidewalls, and controlling the casting operation of the mold based on the pure observation window, includes: The outer boundary point of the halo is taken as the inner boundary of the pure observation window, and the physical boundary line of the real sidewall is taken as the outer boundary of the pure observation window. Connect the corresponding endpoints of the inner boundary and the outer boundary to generate a closed, pure observation window; Extract the meniscus position coordinates of the molten iron surface within the pure observation window, and input the meniscus position coordinates into the pouring control logic; Based on the comparison between the meniscus position coordinates and the preset target liquid surface coordinates, a pouring flow rate adjustment command is output to the pouring actuator.
6. The vision-guided automatic mold casting method according to claim 5, characterized in that: Before inputting the meniscus position coordinates into the casting control logic, the following steps are included: Historical data of the photosensitive target surface of the visual acquisition device is obtained, and bright spot areas that continuously present high brightness and do not change with the fluctuation of the molten iron surface are extracted as the source of afterimage contamination based on the historical data of the photosensitive target surface. Based on the center pixel coordinates and associated pixel positions of the image retention pollution source, a geometric skeleton of the image retention influence range is constructed. Based on the geometric skeleton, geometric enclosure is performed in the visual acquisition image to generate a closed polygonal afterimage area or a strip-shaped afterimage area, and the polygonal afterimage area or the strip-shaped afterimage area is uniformly marked as the afterimage blind zone.
7. The vision-guided automatic mold casting method according to claim 6, characterized in that: After performing geometric enclosure based on the geometric skeleton in the visual acquisition image to generate a closed polygonal or strip-shaped afterimage area, the process includes: The boundary of the pure observation window is spatially superimposed with the afterimage blind zone, and the overlapping line segments that fall completely inside the afterimage blind zone are extracted as candidate conflict segments. Extract the initial generation time of the afterimage pollution source, and generate an effective interference period for the afterimage based on the initial generation time and a preset retention time; Obtain the absolute running time of the current casting process, and determine whether the absolute running time falls within the effective interference period of the afterimage; If the absolute running time falls within the effective interference period of the afterimage, the candidate conflict segment will be activated as an occupied conflict segment and written into the effective set.
8. The vision-guided automatic mold casting method according to claim 7, characterized in that: After activating the candidate conflict segment as an occupied conflict segment and writing it into the effective set, the process includes: The first segmentation point is set based on the light intensity limit blocking position, and the second segmentation point is set based on the dark wall background blocking position or the meniscus shape blocking position. The complete observation path containing the clean observation window is divided into the current device segment, the status relay segment, and the truncated boundary segment using the first segmentation point and the second segmentation point. Exclusive semantic coloring labels are assigned to the current device segment, the state relay segment, and the truncated boundary segment respectively, thereby completing the semantic location label cutting of the complete observation path.
9. The vision-guided automatic mold casting method according to claim 8, characterized in that: After completing the semantic location label segmentation of the complete observation path, the following steps are included: Perform spatial overlap matching between the occupied conflict segment and the current device segment, the state relay segment, and the truncated boundary segment, respectively; If the occupied conflict segment overlaps with the current device segment, execute the write permission closing operation of the casting instruction issuing thread and generate a deadlock conflict token; If the occupied conflict segment coincides with the state relay segment, extract the upstream and downstream valid pixels of the state relay segment, construct a relay verification line, and output a manual verification prompt. If the occupied conflict segment coincides with the truncated boundary segment, the truncation type is read and a boundary verification digital form is generated, and a boundary status secondary verification instruction is sent to the acquisition device.
10. A vision-guided automatic mold casting system, characterized in that, include: A vision acquisition device is used to acquire visual images of the inside of a mold cavity; A control device is used to separate bright white pixel groups and dark pixel groups in the visual acquisition image, mark the bright white pixel groups as halo occlusion areas, and mark the dark pixel groups as environmental reference areas. The control device is also used to determine the radiation starting point based on the geometric centroid of the halo occlusion area, generate an extended probe line based on the radiation starting point, and determine the halo outer boundary point based on the grayscale abrupt change position from the bright white pixel group to the dark pixel group based on the extended probe line. The control device is also used to control the extended probe line to advance along the dark pixel group based on the halo expansion boundary point, determine the transition pixel zone, and determine the real sidewall physical boundary line based on the transition pixel zone. The control device is also used to construct a pure observation window based on the outer boundary point of the halo and the physical boundary line of the real sidewall, and to output control commands to the casting execution device based on the pure observation window; A pouring actuator is used to perform a pouring operation in response to the control command.