Image processing method and device, equipment, storage medium and program product
Through automated control and image feature processing, automatic stitching and panoramic reconstruction of X-ray images of multi-size products have been achieved, solving the problem of low efficiency in traditional inspection and improving inspection efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 转转一零二四(北京)科技有限公司
- Filing Date
- 2025-12-23
- Publication Date
- 2026-05-05
AI Technical Summary
Traditional X-ray imaging technology relies on manual adjustment of equipment parameters and image stitching in the inspection of used electronic products, resulting in low inspection efficiency.
By acquiring the size information of the product to be inspected, a positioning plan for the image acquisition equipment is generated, and automatic stitching and panoramic reconstruction of X-ray images of products of multiple sizes are achieved by utilizing automated control and image feature processing.
It improves product inspection efficiency, reduces manual intervention, and ensures high-resolution image coverage and inspection accuracy.
Smart Images

Figure CN121982161A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image processing method, apparatus, device, storage medium, and program product. Background Technology
[0002] In the field of used electronic product recycling and quality inspection (such as mobile phones, laptops, tablets, etc.), whether a product has been disassembled and repaired is a core issue affecting its recycling price and user experience. Traditional inspection methods rely on manual disassembly for inspection, which not only requires highly skilled technicians but also easily damages equipment during the disassembly process, further reducing the product's value. X-ray imaging technology, because it can penetrate the device's casing and generate images of its internal structure, has become the preferred alternative to manual disassembly.
[0003] In existing technologies, X-ray equipment is used to perform local imaging of the equipment, and the images are stitched together manually by adjusting the position of the equipment or by taking multiple pictures.
[0004] However, the above methods, which involve manually adjusting equipment parameters and image stitching, result in low efficiency in subsequent product testing. Summary of the Invention
[0005] This application provides an image processing method, apparatus, device, storage medium, and program product, which realizes automatic stitching and panoramic reconstruction of X-ray images of multi-size products, thereby improving the efficiency of product inspection based on X-ray images.
[0006] In a first aspect, this application provides an image processing method, comprising:
[0007] Obtain the size information of the product to be inspected; and generate a positioning plan for the image acquisition device based on the size information of the product to be inspected; wherein, the positioning plan is the positioning path for the image acquisition device to perform image acquisition;
[0008] According to the positioning scheme, the image acquisition device is controlled to acquire images to obtain X-ray images of at least one internal region of the product to be inspected;
[0009] The X-ray images are stitched together to obtain a panoramic image of the interior of the product under test.
[0010] In one possible implementation, the step of stitching together the X-ray images to obtain a panoramic image of the interior of the product under inspection includes:
[0011] The X-ray image is subjected to feature processing to obtain image features of the X-ray image; wherein, the image features include edge features, line features, and at least one image key point;
[0012] Based on the image features of the X-ray images corresponding to each pair of adjacent internal regions in the product to be inspected, the overlapping area between the X-ray images corresponding to each pair of adjacent internal regions is determined.
[0013] Based on the overlapping regions, the X-ray images are stitched together to obtain a panoramic image of the interior of the product to be inspected.
[0014] In one possible implementation, the feature processing of the X-ray image to obtain the image features of the X-ray image includes:
[0015] Obtain the calibration matrix of the image acquisition device; wherein, the calibration matrix includes calibration parameters obtained by calibrating the image acquisition device based on a calibration board;
[0016] The X-ray image is corrected according to the correction matrix to obtain a corrected image;
[0017] Feature extraction is performed on the corrected image to obtain the image features corresponding to the X-ray image.
[0018] In one possible implementation, stitching together the X-ray images according to the overlapping regions to obtain a panoramic image of the interior of the product to be inspected includes:
[0019] According to the positioning scheme, each of the overlapping regions is cropped to obtain at least one processed X-ray image;
[0020] The at least one processed X-ray image is stitched together to obtain a panoramic image of the interior of the product to be inspected.
[0021] In one possible implementation, generating a positioning scheme for the image acquisition device based on the size information of the product to be inspected includes:
[0022] Based on the size and category information of the product to be inspected, a positioning plan for the image acquisition device is generated.
[0023] In one possible implementation, controlling the image acquisition device to acquire images according to the positioning scheme to obtain an X-ray image of at least one internal region of the product to be inspected includes:
[0024] Based on the movement plan, movement instructions are generated; wherein, the movement instructions include the movement plan;
[0025] The positioning instruction is sent to the host computer; wherein, the positioning instruction is used to control the image acquisition device to perform image acquisition according to the positioning scheme, so as to obtain an X-ray image of at least one internal region of the product to be inspected;
[0026] Receive at least one X-ray image of the product to be tested sent by the host computer.
[0027] In one possible implementation, the method further includes:
[0028] The positioning scheme of the image acquisition device is adjusted in real time based on the image quality information of the X-ray image; wherein, the image quality information includes sharpness and contrast.
[0029] Secondly, this application provides an image processing apparatus, comprising:
[0030] The generation module is used to acquire the size information of the product to be inspected; and generate a positioning scheme for the image acquisition device based on the size information of the product to be inspected; wherein, the positioning scheme is the positioning path for the image acquisition device to acquire images;
[0031] The acquisition module is used to control the image acquisition device to acquire images according to the positioning scheme, so as to obtain an X-ray image of at least one internal region of the product to be inspected;
[0032] The stitching module is used to stitch together the X-ray images to obtain a panoramic image of the interior of the product to be inspected.
[0033] In one possible implementation, the stitching module is specifically used for: performing feature processing on the X-ray image to obtain image features of the X-ray image; wherein the image features include edge features, line features, and at least one image key point; determining the overlapping area between the X-ray images corresponding to each pair of adjacent internal regions in the product to be inspected based on the image features of the X-ray images corresponding to each pair of adjacent internal regions; and stitching the X-ray images according to each overlapping area to obtain a panoramic image of the interior of the product to be inspected.
[0034] In one possible implementation, the stitching module is specifically used for: obtaining a calibration matrix of the image acquisition device; wherein the calibration matrix includes calibration parameters obtained by calibrating the image acquisition device based on a calibration board; correcting the X-ray image according to the calibration matrix to obtain a corrected image; and extracting features from the corrected image to obtain image features corresponding to the X-ray image.
[0035] In one possible implementation, the stitching module is specifically used to: crop each of the overlapping areas according to the positioning scheme to obtain at least one processed X-ray image; and stitch the at least one processed X-ray image to obtain a panoramic image of the interior of the product to be inspected.
[0036] In one possible implementation, the generation module is specifically used to: generate a positioning scheme for the image acquisition device based on the size information and category information of the product to be detected.
[0037] In one possible implementation, the acquisition module is specifically configured to: generate a movement instruction according to the movement scheme; wherein the movement instruction includes the movement scheme; send the movement instruction to a host computer; wherein the movement instruction is used to control the image acquisition device to perform image acquisition according to the movement scheme to obtain an X-ray image of at least one internal region of the product to be inspected; and receive at least one X-ray image of the product to be inspected sent by the host computer.
[0038] In one possible implementation, the device is further configured to: adjust the positioning scheme of the image acquisition device in real time based on the image quality information of the X-ray image; wherein the image quality information includes sharpness and contrast.
[0039] Thirdly, this application provides an electronic device, including: a memory and a processor;
[0040] The memory stores computer-executed instructions;
[0041] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0042] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible embodiments of the first aspect.
[0043] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0044] The image processing method, apparatus, device, storage medium, and program product provided in this application generate a positioning scheme for an image acquisition device based on the size information of the product to be inspected. This scheme controls the image acquisition device to acquire X-ray images of multiple internal regions of the product to be inspected. The multiple X-ray images are then stitched together to obtain a panoramic image of the interior of the product to be inspected. Furthermore, based on the product size-dynamically adapted positioning scheme and combined with an intelligent image stitching process, automatic stitching and panoramic reconstruction of X-ray images of multi-sized products are achieved, reducing manual intervention and improving the efficiency of product inspection based on X-ray images. Attached Figure Description
[0045] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0046] Figure 1 This application provides an illustration of an application scenario.
[0047] Figure 2 A schematic flowchart of an image processing method provided in an embodiment of this application;
[0048] Figure 3 A flowchart illustrating another image processing method provided in an embodiment of this application;
[0049] Figure 4 A schematic diagram of a fully automated X-ray image stitching process provided for an embodiment of this application;
[0050] Figure 5 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application;
[0051] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0052] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0053] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0054] Figure 1 This application provides an illustration of an application scenario, such as... Figure 1 As shown, this application is applicable to image-based disassembly and repair inspection of second-hand 3C products (such as mobile phones and laptops), as well as the internal structural integrity inspection of luxury goods (such as watches and bags) and second-hand cars.
[0055] Based on the above scenarios, it can be seen that manually adjusting equipment parameters and image stitching processes leads to low efficiency in subsequent product testing.
[0056] The image processing method provided in this application is based on a product size dynamic adaptation positioning scheme and combined with an intelligent image stitching process to realize automatic stitching and panoramic reconstruction of X-ray images of products of multiple sizes.
[0057] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0058] Figure 2 This is a schematic flowchart of an image processing method provided in an embodiment of this application, as shown below. Figure 2 As shown, the method includes:
[0059] 201. Obtain the size information of the product to be inspected; and generate a positioning plan for the image acquisition device based on the size information of the product to be inspected; wherein, the positioning plan is the positioning path for the image acquisition device to perform image acquisition.
[0060] For example, the execution subject of this embodiment may be an electronic device, hereinafter referred to as the device. For the product to be inspected, the device can determine the size information of the product to be inspected, including length, width, and thickness, by scanning the product or through user input. Based on preset rules, such as a deep learning model, the device processes the size information of the product to be inspected to generate a movement plan for the image acquisition device, including the movement path of the image acquisition device for image acquisition, such as the step size and coverage area.
[0061] The image acquisition device is an X-ray image acquisition device.
[0062] In one example, the device uses a deep learning model to process the size information of the product to be inspected and the device parameters of the image acquisition device. Through mathematical modeling, the product size is associated with the device's field of view, and the minimum number of moves and coverage area are dynamically planned to obtain the positioning scheme of the image acquisition device. This ensures that the device completely covers the product surface during movement and avoids missing images. At the same time, it can reduce the number of device moves and further improve detection efficiency.
[0063] For example, if the product size is 150mm×80mm and the equipment's field of view is 100mm×100mm, then it is necessary to plan 3 lateral movements (covering 150mm) and 1 longitudinal movement (covering 80mm) to generate the corresponding movement path.
[0064] In one example, a surface curvature analysis model is used to predict the deformation trend of a flexible device, and the positioning path and step size in the positioning scheme are dynamically adjusted according to the deformation trend. For example, for the hinge area of a foldable phone, the algorithm increases the local scan density, reduces redundant movement in flat areas, and ensures image coverage integrity.
[0065] 202. According to the positioning plan, control the image acquisition device to acquire images to obtain X-ray images of at least one internal region of the product to be inspected.
[0066] For example, the device generates a movement instruction containing the movement step size and coverage area according to the movement plan of the image acquisition device. The device sends the movement instruction to the image acquisition device, so that the image acquisition device sequentially performs image acquisition according to the movement plan to obtain X-ray images of at least one internal region of the product to be inspected, reflecting the internal structure of each internal region, such as the region of interest (ROI) image, which is the part of the image that needs to be analyzed in detail.
[0067] For example, the device moves to the first position according to the positioning plan and takes a picture of the ROI image of the left side of the product; it moves to the second position and takes a picture of the ROI image of the middle area, and so on.
[0068] 203. The X-ray images are stitched together to obtain a panoramic image of the interior of the product to be inspected.
[0069] For example, the device invokes a preset image stitching algorithm to stitch together the various X-ray images. Specifically, it can perform preliminary stitching on the individual X-ray images and crop out any overlapping portions in the resulting stitched image to obtain a panoramic image of the interior of the product under inspection. By moving the image acquisition device to cover different areas of the product and stitching together a complete image through multiple scans, the device can acquire images in different regions, ensuring high-resolution coverage of the entire product. This also solves the problem of insufficient field of view in a single scan and avoids the loss of image information.
[0070] This embodiment provides an image processing method that, based on a product size dynamic adaptation positioning scheme and combined with an intelligent image stitching process, enables automatic stitching and panoramic reconstruction of X-ray images of multi-sized products, reducing manual intervention and improving the efficiency of product inspection based on X-ray images; it also enables regional image acquisition to ensure high-resolution coverage of the entire product, thereby improving the accuracy of product inspection based on X-ray images.
[0071] Figure 3 A flowchart illustrating another image processing method provided in this application embodiment is shown below. Figure 3 As shown, the method includes:
[0072] 301. Obtain the size information of the product to be inspected.
[0073] For example, this step can be referred to as step 201, which will not be repeated here.
[0074] 302. Based on the size and category information of the product to be inspected, generate a positioning plan for the image acquisition device.
[0075] For example, the device determines the category information of the product to be inspected based on the product information of the product to be inspected, such as 3C products, luxury goods, used cars, etc. The device processes the size information and category information of the product to be inspected based on preset rules, such as a deep learning model, to generate a movement plan for the image acquisition device, including the movement path of the image acquisition device for image acquisition, such as the step size and coverage area.
[0076] By automatically generating a positioning plan based on the size and category of the product to be inspected, no manual intervention is required to adjust the equipment parameters, which further improves the efficiency of product inspection based on X-ray images; and it can adapt to different scenarios of products of multiple sizes and categories under the same image acquisition equipment, thus improving the application adaptability of the solution.
[0077] 303. Generate movement instructions based on the movement plan; wherein the movement instructions include the movement plan.
[0078] For example, the device generates a movement instruction that includes the movement step size, coverage area, and other movement schemes based on the movement scheme of the image acquisition device.
[0079] The movement instructions include a set of instructions that control the movement path of the X-ray image acquisition equipment, such as "move 50mm to the right and take one picture".
[0080] 304. Send the positioning instructions to the host computer; wherein, the positioning instructions are used to control the image acquisition device to perform image acquisition according to the positioning plan, so as to obtain an X-ray image of at least one internal area of the product to be inspected.
[0081] For example, the device sends the generated positioning instructions to a host computer. The host computer, based on these instructions, controls the image acquisition device to sequentially acquire images according to the positioning scheme specified in the instructions, obtaining X-ray images of at least one internal region of the product under inspection, reflecting the internal structure of each internal region. The host computer then sends each received X-ray image back to the device.
[0082] Alternatively, the device can send the generated positioning instructions to a Programmable Logic Controller (PLC). The PLC then drives the image acquisition device to sequentially acquire images according to the positioning scheme specified in the instructions.
[0083] 305. Receive at least one X-ray image of the product to be tested sent by the host computer.
[0084] For example, the device receives at least one X-ray image of the product to be inspected from the host computer via a data interface for subsequent processing.
[0085] The image acquisition device is controlled by a host computer to acquire images sequentially according to the positioning plan, ensuring that the device completely covers the product surface during movement, avoiding image omissions, and improving the accuracy of subsequent product inspection. At the same time, it can reduce the number of times the device moves, further improving the efficiency of subsequent product inspection.
[0086] In one possible implementation, the method further includes: adjusting the positioning scheme of the image acquisition device in real time based on the image quality information of the X-ray image; wherein the image quality information includes sharpness and contrast.
[0087] Specifically, upon receiving each X-ray image, the device can process it using a preset image processing algorithm to determine the image quality information, including sharpness and contrast, of each image. Based on the image quality information of each X-ray image, and according to preset adjustment logic, it determines whether the positioning scheme of the image acquisition device needs to be adjusted. If the image quality of the X-ray image is determined to be too low, the positioning scheme of the image acquisition device needs to be adjusted in real time based on the image quality information, so that the image acquisition device can acquire images according to the adjusted positioning scheme to obtain high-quality X-ray images.
[0088] By optimizing the positioning scheme through a real-time feedback mechanism, image quality problems caused by equipment vibration or uneven lighting are resolved, providing high-quality quantitative input for subsequent image processing, thereby improving the product inspection accuracy based on X-ray images.
[0089] 306. Perform feature processing on the X-ray image to obtain the image features of the X-ray image; wherein the image features include edge features, line features and at least one image key point.
[0090] For example, the device performs feature processing on each X-ray image based on an image feature extraction module, such as an image convolutional network, to obtain image features of each X-ray image; wherein the image features include edge features, line features, and at least one image key point of each X-ray image.
[0091] In one example, a preset algorithm is used to extract features from each X-ray image to obtain Haar-like features (Haar for short), which include edge features and line features of each X-ray image; a scale-invariant feature transform (SIFT) algorithm is used to extract features from each X-ray image to obtain SIFT features, which include multiple image key points.
[0092] In one possible implementation, step 306 includes the following steps:
[0093] The first step is to obtain the calibration matrix of the image acquisition device; the calibration matrix includes the calibration parameters obtained by calibrating the image acquisition device based on the calibration board.
[0094] The second step is to correct the X-ray image according to the correction matrix to obtain the corrected image.
[0095] The third step is to extract features from the corrected image to obtain the image features corresponding to the X-ray image.
[0096] Specifically, the equipment is pre-calibrated based on a calibration board to obtain calibration parameters for the image acquisition device, including the field of view and pixel equivalent. These calibration parameters are then transformed to obtain a corresponding correction matrix. The equipment multiplies each X-ray image by the correction matrix to correct each X-ray image, resulting in a corrected X-ray image. An image feature extraction module, such as an image convolutional network, performs feature processing on each corrected image to obtain the image features corresponding to each X-ray image.
[0097] The calibration plate is a standard template used to calibrate equipment parameters, and it typically contains a grid pattern of known dimensions. For example, a calibration plate is a metal plate with a 10mm × 10mm grid, used to scan and calibrate the field of view of an X-ray device.
[0098] The field of view (FAV) characterizes the size of the physical area that an image acquisition device can cover in a single scan. For example, a FAV of 200mm × 200mm means that a single scan can cover an area of 200mm × 200mm.
[0099] Pixel equivalent represents the actual physical size of each pixel in the image. For example, a pixel equivalent of 0.1 mm / pixel means that one pixel in the image corresponds to an actual size of 0.1 mm.
[0100] In one example, the device's field of view and pixel equivalent are obtained by scanning a calibration board. For instance, the calibration board contains a grid pattern of known size (e.g., 10mm × 10mm). After the device scans and generates an image, the pixel equivalent (0.1mm / pixel) is calculated by analyzing the relationship between the grid spacing and the number of pixels (e.g., a grid spacing of 100 pixels). This calibration parameter provides a geometric basis for subsequent positioning scheme generation and image correction, ensuring that the device's movement path can cover the full size of products of different sizes. Using the correction matrix corresponding to the calibration parameter, geometric distortion correction is performed on each X-ray image. For example, the correction matrix is calculated using the grid pattern of the calibration board. The local image after scanning is multiplied by the correction matrix to eliminate barrel or pincushion distortion, mapping pixel coordinates to true physical coordinates. This processing provides geometric consistency assurance for subsequent feature matching and panoramic stitching.
[0101] By eliminating geometric distortion through a correction matrix, the misalignment problem caused by inherent device distortion in traditional image stitching is solved. For example, when inspecting a mobile phone motherboard, the corrected image can accurately reflect the actual position of the motherboard edges and components, avoiding stitching seams or structural misalignment caused by distortion. This technique significantly improves image quality and enhances the reliability of inspection results.
[0102] 307. Based on the image features of the X-ray images corresponding to each pair of adjacent internal regions in the product to be inspected, determine the overlapping area between the X-ray images corresponding to each pair of adjacent internal regions.
[0103] For example, the device groups all internal regions of the product to be inspected into pairs, with each pair including two adjacent internal regions. Using feature matching and constraint algorithms, the image features of the X-ray images corresponding to each pair of adjacent internal regions are calculated. For instance, the image features of the X-ray images corresponding to each pair of adjacent internal regions are converted into two descriptors, and these two descriptors are matched to identify the overlapping areas between the X-ray images corresponding to each pair of adjacent internal regions.
[0104] In one example, during the feature matching process, a multi-scale feature fusion strategy combines Haar features (for fast contour detection) and SIFT features (for detail matching) at different scales. For instance, low-scale Haar features quickly locate the approximate boundaries of overlapping regions, while high-scale SIFT features accurately match details. Finally, weighted fusion is used to optimize the matching result.
[0105] 308. Based on the overlapping areas, the X-ray images are stitched together to obtain a panoramic image of the interior of the product to be inspected.
[0106] For example, the device can adjust the pixel weights of the X-ray images corresponding to each internal region according to each overlapping region, and calculate the panoramic image of the interior of the product to be inspected based on a weighted average strategy for all X-ray images and their corresponding pixel weights.
[0107] For example, the pixel values of the overlapping areas of the left local image and the pixel values of the right local image are added together with weights (e.g., 0.7:0.3) to generate a seamlessly stitched image. This process significantly improves the continuity of the stitching and reduces visual interference.
[0108] By employing feature extraction and weighted averaging strategies, the problem of inaccurate handling of overlapping areas in traditional manual stitching is solved. For example, when stitching X-ray images of a laptop casing, weighted averaging of overlapping areas can eliminate brightness differences or structural misalignments caused by device movement, resulting in a visually coherent panoramic image without obvious stitching seams.
[0109] In one possible implementation, step 308 includes:
[0110] Step 1: According to the positioning plan, crop the overlapping areas to obtain at least one processed X-ray image.
[0111] Step 2: Stitch together at least one processed X-ray image to obtain a panoramic image of the interior of the product to be inspected.
[0112] Specifically, the equipment selectively retains or crops overlapping areas according to the positioning plan of the image acquisition device, obtaining each processed X-ray image. All processed X-ray images are then stitched together using a weighted average to output a panoramic image of the interior of the product under inspection.
[0113] For example, if the overlapping area of adjacent ROI images is 10% coverage, select to retain the overlapping part of the left ROI image and crop the redundant area of the right ROI image.
[0114] For another example, Figure 4 This is a schematic diagram of a fully automated X-ray image stitching process provided in an embodiment of this application, as shown below. Figure 4As shown, a calibration board is used to calibrate the X-ray image acquisition equipment (i.e., the Xray device) to obtain the correction matrix of the X-ray device, including parameters such as field of view and pixel equivalent. Based on the actual dimensions (length and width) of the product to be inspected (taking a 3C product as an example), a positioning plan is automatically generated. The positioning instructions are sent to a host computer or PLC via network communication. The host computer controls the X-ray device to sequentially acquire X-ray images during the positioning process. By multiplying the X-ray images with the correction matrix generated during calibration, affine transformation processing is performed on the X-ray images to obtain the corrected images of each ROI. Haar and SIFT features are extracted from the corrected images, and the overlapping areas between the corrected images of adjacent ROIs are calculated using feature matching and constraint algorithms. Based on the positioning plan, the overlapping areas between the corrected images of adjacent ROIs are selectively retained or cropped to obtain multiple processed ROI images. All processed ROI images are stitched together using a weighted average method to output a panoramic image.
[0115] In one example, a lighting compensation algorithm can be used to dynamically adjust the weighted averaging strategy based on local lighting intensity. For instance, if shadows exist in the overlapping areas of adjacent local images, the algorithm will automatically reduce the weight of low-brightness areas and increase the contribution of high-brightness areas, achieving a stitching effect with uniform lighting.
[0116] By cropping overlapping areas, visual interference is reduced, redundant overlapping areas are eliminated, the visibility of stitching seams is reduced, the coherence of the stitched image is improved, and the image quality is enhanced. Furthermore, the weighted averaging strategy is dynamically adjusted based on the illumination compensation algorithm, making the stitched panoramic image more visually coherent and reducing detection misjudgments caused by uneven illumination.
[0117] In this embodiment, based on the above embodiments, on the one hand, by automatically moving and acquiring images, the number of times the equipment moves is reduced, significantly improving the detection efficiency. By using the correction matrix and feature matching algorithm, geometric distortion and splicing seams are eliminated, ensuring the continuity and accuracy of image splicing. On the other hand, by adjusting the calibration parameters and moving strategies, the detection needs of different categories (such as luxury goods and used cars) are adapted.
[0118] Figure 5 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application, as shown below. Figure 5 As shown, the device includes:
[0119] The generation module 401 is used to acquire the size information of the product to be inspected; and generate a positioning plan for the image acquisition device based on the size information of the product to be inspected; wherein, the positioning plan is the positioning path for the image acquisition device to perform image acquisition;
[0120] The acquisition module 402 is used to control the image acquisition device to acquire images according to the positioning plan, so as to obtain an X-ray image of at least one internal region of the product to be inspected.
[0121] The stitching module 403 is used to stitch together the X-ray images to obtain a panoramic image of the interior of the product to be inspected.
[0122] In one possible implementation, the stitching module 403 is specifically used for: performing feature processing on the X-ray image to obtain image features of the X-ray image; wherein the image features include edge features, line features, and at least one image key point; determining the overlapping area between the X-ray images corresponding to each pair of adjacent internal regions in the product to be inspected based on the image features of the X-ray images corresponding to each pair of adjacent internal regions; and stitching the X-ray images according to each overlapping area to obtain a panoramic image of the interior of the product to be inspected.
[0123] In one possible implementation, the stitching module 403 is specifically used for: acquiring the calibration matrix of the image acquisition device; wherein the calibration matrix includes calibration parameters obtained by calibrating the image acquisition device based on the calibration board; calibrating the X-ray image according to the calibration matrix to obtain a calibrated image; and extracting features from the calibrated image to obtain the image features corresponding to the X-ray image.
[0124] In one possible implementation, the stitching module 403 is specifically used to: perform cropping processing on each overlapping area according to the positioning scheme to obtain at least one processed X-ray image; and stitch together the at least one processed X-ray image to obtain a panoramic image of the interior of the product to be inspected.
[0125] In one possible implementation, the generation module 401 is specifically used to: generate a positioning scheme for the image acquisition device based on the size information and category information of the product to be inspected.
[0126] In one possible implementation, the acquisition module 402 is specifically used for: generating a positioning instruction according to a positioning plan; wherein the positioning instruction includes the positioning plan; sending the positioning instruction to a host computer; wherein the positioning instruction is used to control the image acquisition device to acquire images according to the positioning plan to obtain an X-ray image of at least one internal region of the product to be inspected; and receiving at least one X-ray image of the product to be inspected sent by the host computer.
[0127] In one possible implementation, the device is also used to: adjust the positioning scheme of the image acquisition device in real time based on the image quality information of the X-ray image; wherein the image quality information includes sharpness and contrast.
[0128] The apparatus in this embodiment can execute the technical solutions in the above method. Its specific implementation process and technical principles are the same, and will not be repeated here.
[0129] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 6 As shown, the electronic device includes: a memory 501 and a processor 502; the memory 501 is a memory used to store instructions executable by the processor 502.
[0130] The processor 502 is configured to perform the method provided in the above embodiments.
[0131] The electronic device also includes a receiver 503 and a transmitter 504. The receiver 503 is used to receive instructions and data sent by other devices, and the transmitter 504 is used to send instructions and data to external devices.
[0132] The specific implementation process of the processor can be found in the above method embodiments, and its implementation principle and technical effect are similar, so it will not be repeated here.
[0133] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0134] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed on a computer, cause the computer to perform the technical solutions described above.
[0135] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0136] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. The readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in a device.
[0137] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the technical solutions in the above embodiments.
[0138] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as magnetic disks or optical disks.
[0139] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. An image processing method, characterized in that, include: Obtain the size information of the product to be inspected; and generate a positioning plan for the image acquisition device based on the size information of the product to be inspected; wherein, the positioning plan is the positioning path for the image acquisition device to perform image acquisition; According to the positioning scheme, the image acquisition device is controlled to acquire images to obtain X-ray images of at least one internal region of the product to be inspected; The X-ray images are stitched together to obtain a panoramic image of the interior of the product under test.
2. The method according to claim 1, characterized in that, The step of stitching together the X-ray images to obtain a panoramic image of the interior of the product under inspection includes: The X-ray image is subjected to feature processing to obtain image features of the X-ray image; wherein, the image features include edge features, line features, and at least one image key point; Based on the image features of the X-ray images corresponding to each pair of adjacent internal regions in the product to be inspected, the overlapping area between the X-ray images corresponding to each pair of adjacent internal regions is determined. Based on the overlapping regions, the X-ray images are stitched together to obtain a panoramic image of the interior of the product to be inspected.
3. The method according to claim 2, characterized in that, The step of performing feature processing on the X-ray image to obtain the image features of the X-ray image includes: Obtain the calibration matrix of the image acquisition device; wherein, the calibration matrix includes calibration parameters obtained by calibrating the image acquisition device based on a calibration board; The X-ray image is corrected according to the correction matrix to obtain a corrected image; Feature extraction is performed on the corrected image to obtain the image features corresponding to the X-ray image.
4. The method according to claim 2, characterized in that, The step of stitching together the X-ray images according to the overlapping regions to obtain a panoramic image of the interior of the product to be inspected includes: According to the positioning scheme, each of the overlapping regions is cropped to obtain at least one processed X-ray image; The at least one processed X-ray image is stitched together to obtain a panoramic image of the interior of the product to be inspected.
5. The method according to claim 1, characterized in that, The step of generating a positioning scheme for the image acquisition device based on the size information of the product to be inspected includes: Based on the size and category information of the product to be inspected, a positioning plan for the image acquisition device is generated.
6. The method according to claim 1, characterized in that, The step of controlling the image acquisition device to acquire images according to the positioning scheme to obtain X-ray images of at least one internal region of the product to be inspected includes: Based on the movement plan, movement instructions are generated; wherein, the movement instructions include the movement plan; The positioning instruction is sent to the host computer; wherein, the positioning instruction is used to control the image acquisition device to perform image acquisition according to the positioning scheme, so as to obtain an X-ray image of at least one internal region of the product to be inspected; Receive at least one X-ray image of the product to be tested sent by the host computer.
7. The method according to any one of claims 1-6, characterized in that, The method further includes: The positioning scheme of the image acquisition device is adjusted in real time based on the image quality information of the X-ray image; wherein, the image quality information includes sharpness and contrast.
8. An image processing apparatus, characterized in that, include: The generation module is used to acquire the size information of the product to be inspected; and generate a positioning scheme for the image acquisition device based on the size information of the product to be inspected; wherein, the positioning scheme is the positioning path for the image acquisition device to acquire images; The acquisition module is used to control the image acquisition device to acquire images according to the positioning scheme, so as to obtain an X-ray image of at least one internal region of the product to be inspected; The stitching module is used to stitch together the X-ray images to obtain a panoramic image of the interior of the product to be inspected.
9. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.
11. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.