A uniapp-based white pin position display platform for automobile plastic parts

By combining uniapp and OpenCV.js image processing technology, the problem of white nail location recognition in low-performance mobile terminals and multi-workstation scenarios is solved, realizing efficient, accurate and flexible white nail detection and display across platforms, and supporting efficient recognition and quality traceability in multi-workstation scenarios.

CN120689809BActive Publication Date: 2026-01-02JIANGSU LV NENG AUTO PARTS SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510774462.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2026-01-02
Estimated Expiration
2045-06-11

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve rapid, lightweight, and stable identification of white nail locations on automotive plastic parts in low-performance mobile terminals and multi-workstation scenarios. Furthermore, they lack cross-platform compatibility and recognition accuracy, failing to meet the demands for flexible deployment and efficient inspection in intelligent manufacturing environments.

Method used

A uniapp-based platform for displaying the location of white nails on automotive plastic parts is adopted. Images are acquired using the front-end camera interface encapsulated by uniapp, and image processing and recognition are performed using the OpenCV.js module, including image conversion, filtering, compression, white nail region extraction and coordinate matching. The results are displayed on a Canvas and uploaded to the cloud server in real time.

Benefits of technology

It enables unified deployment of white nail location detection and display on multiple platform terminals, improving the flexibility and efficiency of detection, enhancing the robustness and accuracy of image recognition, and supporting efficient recognition and quality traceability in multi-workstation scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689809B_ABST
    Figure CN120689809B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of automobile assembly quality detection, and discloses a white pin position display platform for automobile plastic parts based on uniapp, which comprises a template configuration acquisition module, an image preprocessing and compression module, a position recognition and extraction module, a visual display module and a result uploading and log module. Compared with the detection scheme in the prior art which depends on a PC terminal or a special industrial camera, especially under the conditions of a low-performance mobile terminal and multi-station deployment, it is difficult to realize the technical problems of fast, light and stable recognition of the white pin position and unified display. Since the application introduces a multi-terminal unified framework based on uniapp, a device performance sensing compression mechanism and a direction sensing error matching algorithm, accurate recognition and efficient labeling of the white pin position in various terminal systems are realized, and the cross-platform deployment capability and terminal running stability of the detection system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of automobile assembly quality detection, and particularly relates to a white pin position display platform for automobile plastic parts based on uniapp. BACKGROUND

[0002] At present, in the field of automobile part assembly, the positioning pin (white pin) on the plastic part plays an important role in assembly precision control and misassembly prevention. The traditional white pin detection method mainly relies on manual visual inspection or industrial camera plus PC terminal software analysis, which has high dependence on equipment environment, personnel experience and system stability, and has the disadvantages of low detection efficiency, non-uniform standard and high deployment cost. For example, some white pin detection systems use local C++ applications combined with high-resolution industrial cameras deployed on PC terminals or industrial computers, which are only suitable for fixed production line positions and do not have mobile terminal deployment capabilities. In terms of image recognition algorithms, existing solutions generally use static threshold, fixed angle and Euclidean distance matching method, which is difficult to adapt to complex scenarios such as slight angle deviation of white pin installation, image noise interference or light changes. In addition, with the rise of intelligent manufacturing and multi-station collaborative detection, the demand for on-site detection is showing a trend of "mobility", "lightweight" and "multi-terminal synchronization". The existing technology cannot fully meet the actual needs of flexible control, rapid deployment and high accuracy recognition in the new manufacturing environment in terms of terminal cross-platform compatibility, low-performance device adaptability, recognition accuracy and result visualization. Therefore, there is an urgent need for a cross-terminal detection method based on emerging software platforms and new information technology service architectures, which can still achieve efficient recognition and position error display of white pins on automobile plastic parts under the limitations of low-performance mobile terminals, multi-station scenarios and natural light interference, so as to improve the stability, adaptability and overall automation level of the detection process. SUMMARY

[0003] In view of the above technical deficiencies, the purpose of the present application is to provide a white pin position display platform and method for automobile plastic parts based on uniapp, which aims to solve the technical problems that the existing detection schemes relying on PC terminals or special industrial cameras cannot achieve rapid and stable recognition of white pin positions and unified display, especially under the conditions of low-performance mobile terminals and multi-station deployment.

[0004] To solve the above technical problems, the present application adopts the following technical scheme: The present application provides a white pin position display platform for automobile plastic parts based on uniapp.

[0005] The white pin position display platform for automobile plastic parts based on uniapp comprises:

[0006] A template configuration acquisition module is configured to call the terminal camera to collect the image of the automobile plastic part through the uniapp-encapsulated front-end camera interface uni.chooseImage, determine the current station according to the image of the automobile plastic part, and download the JSON format station template configuration corresponding to the current station from the server through the uniapp-encapsulated front-end network request interface uni.request;

[0007] An image preprocessing and compression module is configured to perform image conversion from RGB space to HSV space processing, conditional filtering processing and adaptive compression image resolution processing on the image of the automobile plastic part based on the OpenCV.js module in the WebView environment of the uniapp, to obtain an optimized automobile plastic part image.

[0008] A position recognition and extraction module is configured to call the OpenCV.js interface to perform white pin region contour extraction, shape screening and coordinate error matching based on the optimized automobile plastic part image, to obtain a white pin detection result.

[0009] A visual display module is configured to perform graphical annotation display of the white pin detection result on the terminal interface based on the Canvas of the uniapp.

[0010] A result uploading and log module is configured to upload the image processing result subjected to graphical annotation display to the cloud server in real time, and record detection logs.

[0011] Preferably, the station template configuration includes the total number of white pins, the standard white pin coordinate array, and the tolerance distance threshold value.

[0012] Preferably, in the image preprocessing and compression module, the OpenCV.js module in the WebView environment of the uniapp performs image conversion from RGB space to HSV space processing, conditional filtering processing and adaptive compression image resolution processing on the image of the automobile plastic part, to obtain an optimized automobile plastic part image, and the steps specifically include:

[0013] The interface uni.getSystemInfoSync is used in combination with the cv.resize interface of OpenCV.js to determine the resolution size of the image of the automobile plastic part, a resolution threshold value of the automobile plastic part image is preset, and for the image whose resolution size exceeds the resolution threshold value of the automobile plastic part image, the image is subjected to euharic scaling processing first.

[0014] The cv.cvtColor interface in OpenCV.js is called to convert the image of the automobile plastic part from the RGB space to the HSV color space, obtaining an HSV image matrix (H(u, v), S(u, v), V(u, v)); wherein u and v are two-dimensional pixel coordinates of the image of the automobile plastic part, representing the horizontal and vertical positions of a certain pixel point in the image of the automobile plastic part; H(u, v) is the hue component of the pixel point (u, v); S(u, v) is the saturation component of the pixel point (u, v); and V(u, v) is the brightness component of the pixel point (u, v);

[0015] The following threshold conditions are applied based on the HSV image matrix to construct a white pin mask Mask white (u,v), wherein S T = 30, V T = 200 are empirical threshold values suitable for reflection performance under natural light or industrial light;

[0016] According to the constructed white pin mask Mask white (u,v), the candidate white pin region is determined, and for the candidate white pin region, first, median filtering is performed through cv.medianBlur to remove isolated noise points, then open operation is performed through cv.morphologyEx to eliminate interference regions, and finally, an inflation operation is performed to enhance the outline of the candidate white pin region;

[0017] The uni.getsystemInfosync interface is used to obtain the current terminal processor model and memory capacity, and the device performance score P d is calculated, and the compression ratio a is dynamically set in combination with the image size, and the image of the automobile plastic part after the inflation operation to enhance the outline of the candidate white pin region is subjected to adaptive compression by the compression ratio a to obtain an optimized automobile plastic part image.

[0018] Preferably, in the image preprocessing and compression module, wherein β1 and β2 are compression weight factors, T is a preset standard image area threshold, W0 is the original width of the image of the automobile plastic part, and H0 is the original height of the image of the automobile plastic part.

[0019] Preferably, in the position recognition and extraction module, the steps of white pin region outline extraction, shape screening and coordinate error matching are performed based on the optimized automobile plastic part image by calling the OpenCV.js interface, specifically including:

[0020] The white pin region outline is extracted from the optimized automobile plastic part image through the cv.findContours interface;

[0021] The roundness index C of each white pin region outline i is calculatedi , wherein A i is the contour area of the white pin region contour i, P i is the contour perimeter of the white pin region contour i; a roundness index threshold value C T is preset, only the white pin region contour satisfying C i ≥ C T is retained;

[0022] contour center coordinates (x i , y i ) of the white pin region contour i are calculated, the white pin standard coordinates of the white pin region contour i and the current station white pin arrangement mode are obtained from the JSON format station template configuration corresponding to the current station in the template configuration acquisition module;

[0023] when the white pin arrangement mode is nonlinear arrangement, distance error matching method is adopted to perform error matching according to the contour center coordinates (x i , y i ) and the white pin standard coordinates to obtain a tolerance D i ,

[0024] a preset tolerance threshold value δ is set, when D i ≤ δ, it is marked as a qualified white pin, otherwise it is marked as a deviation white pin or a missing white pin;

[0025] when the white pin arrangement mode is linear arrangement, direction perception matching method is adopted to perform error matching according to the contour center coordinates (x i , y i ) and the white pin standard coordinates , the horizontal deviation and the vertical deviation are calculated respectively, a preset horizontal tolerance threshold value δ x and a vertical tolerance threshold value δ y are set, when |Δx i |≤ δ x and |Δy i |≤ δ y , it is determined as a qualified white pin, otherwise it is determined as a deviation white pin;

[0026] when the white pin arrangement mode is linear arrangement and it is determined as a deviation white pin, a relative included angle θ i is introduced to perform rotation trend analysis to obtain a relative included angle θ i , wherein arctan(·) is an inverse tangent function;

[0027] a white pin detection result is generated according to the above white pin determination result.

[0028] Preferably, in the visualization display module, the step of displaying the white pin detection result on the terminal interface based on the Canvas canvas of uniapp includes:

[0029] The Canvas canvas of uniapp draws a green circular mark on the position of the qualified white pin, draws a red circular mark on the position of the deviation white pin, and labels the tolerance D i or the lateral deviation Δx i and the longitudinal deviation Δy i ; a hollow warning mark is drawn on the position of the standard white pin that is not matched, and "missing" is prompted; all labeling styles are dynamically loaded from the JSON format station template configuration corresponding to the current station in the template configuration acquisition module, to realize consistency of multiple terminals.

[0030] Preferably, in the result uploading and log module, the step of uploading the image processing result for graphical annotation display to the cloud server in real time and recording the detection log includes: uploading the image processing result for graphical annotation display to the cloud server in JSON format through the HTTP protocol by using the uni.uploadFile interface and the white pin detection result in the position recognition and extraction module, recording the recognition mode in each white pin detection result, the error matching result and the center coordinates of each white pin, and the terminal device information of processing time consumption; and binding the white pin detection result with the station number, the user ID and the timestamp, for quality traceability and report analysis.

[0031] The application also provides a white pin position display method for automobile plastic parts based on uniapp, which includes:

[0032] Step S10: calling the terminal camera to collect the image of the automobile plastic part by the front camera interface uni.chooseImage encapsulated by uniapp, determining the current station according to the image of the automobile plastic part, and downloading the JSON format station template configuration corresponding to the current station from the server by the front network request interface uni.request encapsulated by uniapp;

[0033] Step S20: converting the image of the automobile plastic part from RGB space to HSV space, performing conditional filtering processing and adaptive compression image resolution processing on the image of the automobile plastic part based on the OpenCV.js module in the WebView environment of uniapp, and obtaining an optimized image of the automobile plastic part;

[0034] Step S30: calling the OpenCV.js interface based on the optimized image of the automobile plastic part to perform white pin region contour extraction, shape screening and coordinate error matching, and obtaining a white pin detection result;

[0035] Step S40: The Canvas canvas based on uniapp performs graphical annotation display of the white pin detection result on the terminal interface.

[0036] Step S50: Real-time upload of the image processing result subjected to graphical annotation display to the cloud server, and record the detection log.

[0037] The application also provides a uniapp-based white pin position display device for automobile plastic parts, comprising a memory, a processor, and a uniapp-based white pin position display program for automobile plastic parts stored in the memory and capable of running on the processor, which realizes the uniapp-based white pin position display method for automobile plastic parts when executed by the processor.

[0038] The application also provides a computer program product comprising a uniapp-based white pin position display program for automobile plastic parts, which realizes the uniapp-based white pin position display method for automobile plastic parts when executed by a processor.

[0039] The application has the advantages that the application constructs a multi-terminal adaptive image processing front-end system based on the emerging computer software framework uniapp, combines the OpenCV.js image recognition module in the WebView environment, realizes unified deployment of white pin position detection and display on multiple platforms such as Android, iOS, and applets, solves the problems of traditional detection systems, such as dependence on special hardware, large deployment difficulty, and serious terminal differentiation, and improves flexibility and landing efficiency in mobile quality inspection scenarios.

[0040] The application integrates a new information technology service mechanism, effectively improves the robustness of image recognition in low-performance devices and complex environments by introducing a "directional perception error matching algorithm" and a "terminal performance adaptive compression control strategy", combines cloud configuration retrieval and result feedback services, realizes a closed-loop quality traceability process from image acquisition, recognition, visual display to cloud recording of white pin detection, and significantly improves the accuracy and scalability of assembly detection in intelligent manufacturing processes. BRIEF DESCRIPTION OF DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0042] Figure 1This is a schematic diagram of the platform of the first embodiment of the automotive plastic part white nail position display platform based on uniapp according to the present invention.

[0043] Figure 2 This is a schematic diagram of a device for displaying the location of white nails on automotive plastic parts based on uniapp, according to the present invention. Detailed Implementation

[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] Example 1: As Figure 1 The diagram shown is a flowchart of the first embodiment of the automotive plastic part white nail position display platform based on uniapp according to the present invention, and proposes the first embodiment of the automotive plastic part white nail position display platform based on uniapp according to the present invention.

[0046] In the first embodiment, the uniapp-based automotive plastic part white nail location display platform includes:

[0047] The template configuration acquisition module is used to call the terminal camera to capture images of automotive plastic parts through the front-end camera interface uni.chooseImage encapsulated by uniapp, determine the current workstation based on the images of automotive plastic parts, and download the workstation template configuration in JSON format corresponding to the current workstation from the server through the front-end network request interface uni.request encapsulated by uniapp.

[0048] It's worth noting that uniapp is a cross-platform development framework based on Vue.js, enabling "develop once, deploy to multiple platforms," ​​meaning a single codebase can be deployed to multiple platforms simultaneously. This is suitable for rapidly developing cross-platform applications, especially for scenarios requiring coverage of mini-programs, H5 pages, and apps. The process of "determining the current workstation based on the image of the automotive plastic part" can be achieved by pre-setting a workstation QR code or workstation number identifier area in the image acquisition interface. The current workstation can be automatically identified by parsing the QR code content or embedded text in the image, or it can be manually selected and confirmed by the operator.

[0049] Understandably, this module implements cross-terminal calls to a unified encapsulated front-end API on the uniapp platform, ensuring consistency in image acquisition and configuration retrieval logic across systems such as Android, iOS, and WeChat Mini Programs, and avoiding data structure parsing errors or template incompatibility issues caused by platform differences.

[0050] For example, when it is detected that the current image contains the station number W012 corresponding to the "left front door inner panel" label, the server address / template / W012.json will be accessed through the uni.request interface to download the configuration parameters including the white pin quantity of 6, the position coordinate array of [{x: 120, y: 340}], the roundness threshold of 0.85, the horizontal tolerance of 10 pixels, the vertical tolerance of 6 pixels, and the green color as the qualified mark and the red color as the abnormal mark, etc., which are used to guide the subsequent image processing and UI display.

[0051] The image preprocessing and compression module is used to convert the image of the automobile plastic part from the RGB space to the HSV space, condition filtering processing and adaptive compression image resolution processing based on the OpenCV.js module in the WebView environment of the uniapp, and obtain the optimized automobile plastic part image.

[0052] It should be noted that in the image preprocessing and compression module, the OpenCV.js module in the WebView environment of the uniapp is used to convert the image of the automobile plastic part from the RGB space to the HSV space, condition filtering processing and adaptive compression image resolution processing, and obtain the optimized automobile plastic part image. The steps specifically include: using the interface uni.getSystemInfoSync combined with the cv.resize interface of OpenCV.js to determine the resolution size of the automobile plastic part image, and presetting the resolution threshold of the automobile plastic part image. For the image whose resolution size exceeds the resolution threshold of the automobile plastic part image, the image is first subjected to equal ratio scaling processing; calling the cv.cvtColor interface in OpenCV.js to convert the automobile plastic part image from the RGB space to the HSV color space, and obtaining the HSV image matrix (H(u, v), S(u, v), V(u, v)); wherein u and v are two-dimensional pixel coordinates of the automobile plastic part image, representing the horizontal and vertical positions of a certain pixel point in the automobile plastic part image; H(u, v) is the hue component of the pixel point (u, v); S(u, v) is the saturation component of the pixel point (u, v); V(u, v) is the brightness component of the pixel point (u, v); based on the HSV image matrix, the following threshold conditions are applied to construct a white pin mask Mask white (u,v), Wherein, S T = 30, V T = 200 is an empirical threshold value suitable for reflection under natural light or industrial light; according to the constructed white pin mask Mask white(u, v) determines the candidate white nail region, and for the candidate white nail region, first, the median filter is performed through cv.medianBlur to remove isolated noise points, then the open operation is performed through cv.morphologyEx to eliminate interference regions, and finally, an inflation operation is performed to enhance the outline of the candidate white nail region; the uni.getsystemInfosync interface is used to obtain the current terminal processor model and memory capacity, and the device performance score P is calculated d And the compression ratio a is dynamically set according to the image size, and the image adaptive compression is performed on the automobile plastic part image after the inflation operation to enhance the outline of the candidate white nail region, to obtain an optimized automobile plastic part image. In the image preprocessing and compression module, the compression ratio Wherein, β1 and β2 are compression weight factors, T is a preset standard image area threshold, W0 is the original width of the automobile plastic part image, and H0 is the original height of the automobile plastic part image.

[0053] It can be understood that the above adaptive compression mechanism combines the terminal performance and image resources in two dimensions for comprehensive evaluation, increases the compression ratio when the device resources are weak, and retains more feature information when the image resolution is small, so as to balance the operation efficiency and recognition accuracy.

[0054] It should be understood that the module as a whole runs in the WebView environment provided by uniapp, uses OpenCV.js for image matrix level operation, has high cross-platform compatibility, does not depend on the local C / C++ image processing library of the operating system, is suitable for Android, iOS and small program running environments, and is suitable for factory inspection scenes with high consistency deployment requirements.

[0055] For example, in a certain model of Android terminal, the original image size is 1920x1080, the performance score algorithm is evaluated to be a medium performance level, the compression ratio a=0.6 is calculated, and the final image is isometrically compressed to 1152x648 size, which not only reduces the calculation burden of subsequent outline extraction and error analysis, but also retains enough white nail image details for matching, ensuring a balance between recognition accuracy and smooth operation.

[0056] The position recognition and extraction module is used to call the OpenCV.js interface based on the optimized automobile plastic part image to perform white nail region outline extraction, shape screening and coordinate error matching, and obtain a white nail detection result.

[0057] It should be noted that in the location recognition and extraction module, the steps of extracting the white nail region contour, shape filtering, and coordinate error matching based on the optimized automotive plastic part image and calling the OpenCV.js interface specifically include: extracting the white nail region contour from the optimized automotive plastic part image through the cv.findContours interface; and calculating the roundness index C for each white nail region contour i. i , Among them, A i Let P be the contour area of ​​the white nail region contour i. i Let i be the perimeter of the white nail region; set a pre-defined roundness index threshold C. T Only retain those that satisfy C i ≥C T The outline of the white nail region; calculate the outline center coordinates (x, y) of the white nail region outline i. i ,y i The template configuration retrieves the standard coordinates of the white nail area outline i from the JSON-formatted workstation template configuration corresponding to the current workstation in the template configuration module. And the current white nail arrangement pattern; when the white nail arrangement pattern is non-linear, according to the contour center coordinates (x i ,y i ) and white nail standard coordinates The tolerance D is obtained by using the distance error matching method for error matching. i , Preset tolerance threshold δ, when D i If the value is ≤δ, it is marked as a qualified white nail; otherwise, it is marked as a deviation white nail or a missing white nail. When the white nail arrangement pattern is linear, it is based on the contour center coordinates (x... i ,y i ) and white nail standard coordinates Error matching is performed using the direction-aware matching method, and the lateral deviation is calculated separately. longitudinal deviation Preset lateral tolerance threshold δ x and longitudinal tolerance threshold δ y , when |Δx i |≤δ x And |Δy i |≤δ y If the white nails are arranged linearly and are determined to be deviation white nails, then a relative angle θ is introduced. i The relative angle θ is obtained by performing rotation trend analysis. i , Where arctan(·) is the arctangent function; the white nail detection result is generated based on the above white nail determination result.

[0058] It can be understood that the introduction of the white pin arrangement mode enables the platform to flexibly select the matching mode according to the actual structure of different components (such as linear for door panels and nonlinear for bumpers), thereby improving the accuracy and engineering practicability of error identification.

[0059] It should be understood that the direction perception matching method not only supports independent threshold control of X / Y direction error components, but also further judges the overall skew trend in the installation process when necessary, thereby avoiding identification misjudgment caused by local rotation.

[0060] For example, for a white pin standard coordinate (150, 300) and a detected contour center coordinate (158, 306), Δx = 8 and Δy = 6; if δx = 10 and δy = 10 are set, the white pin is determined to be qualified; if the white pin is arranged in a linear structure and the adjacent white pin rotation angle difference is 8°, which exceeds the preset θ = 5°, the white pin can be further determined as “installation trend deviation” and is marked with a special icon in the display. x y T

[0061] The visualization display module is used to perform graphical annotation display of the white pin detection result on the terminal interface based on the Canvas of uniapp.

[0062] It should be noted that in the visualization display module, the step of performing graphical annotation display of the white pin detection result on the terminal interface based on the Canvas of uniapp includes: drawing a green circular mark on the position of the white pin determined to be qualified, drawing a red circular mark on the position of the white pin determined to be deviated, and marking the tolerance D i or the horizontal deviation Δx i and the vertical deviation Δy i ; drawing a hollow warning mark on the position of the standard white pin that is not matched and prompting “missing”; all annotation styles are dynamically loaded from the JSON format station template configuration corresponding to the current station in the template configuration acquisition module, to realize consistency of multiple terminals.

[0063] It can be understood that the Canvas is a cross-end renderable underlying graphics container in uniapp, and the annotation logic controls the context operation through JS script, has the advantages of high drawing efficiency and low refresh delay, and is particularly suitable for embedding into detection type light applications to feedback the identification result in real time.

[0064] ​​​It should be understood that the module does not directly modify the original image content during the labeling process, but labels the output in a layer superposition manner, so that the real image and the recognition result can coexist in the user interface, and the problem of labeling deviation caused by quality loss after image compression is avoided.

[0065] For example, when the platform identifies that among the 6 white pegs, the 1st, 2nd, 4th, and 5th are qualified, the 3rd is deviated (deviation: horizontal +8px, vertical -5px), and the 6th is missing, the Canvas canvas will draw: 4 green circles; 1 red circle with the label "x:+8, y:-5" beside it; 1 gray hollow circle with the text "missing" beside it; all the label positions, colors, and font sizes are automatically rendered according to the workstation template settings, and the operator can identify the problem position through the terminal page at a glance.

[0066] The result uploading and log module is used to upload the image processing results for graphical labeling display to the cloud server in real time and record detection logs.

[0067] It should be noted that in the result uploading and log module, the steps of uploading the image processing results for graphical labeling display to the cloud server in real time and recording detection logs include: uploading the image processing results for graphical labeling display to the cloud server in real time using the uni.uploadFile interface and the white peg detection results in the position recognition and extraction module in JSON format through the HTTP protocol, recording the recognition mode, error matching results and center coordinates of each white peg, and terminal device information in each white peg detection result; and binding the white peg detection results with the workstation number, user ID, and timestamp for quality traceability and report analysis. For example, the JSON format record can be {"workstation number": "W013", "user ID": "U00821", "timestamp": "2025-05-16T10:18:30Z", "recognition mode": "local / OpenCV.js", "white peg detection results": [{"id": 1, "status": "qualified", "x": 120, "y": 340, "Δx": 0, "Δy": 0}, {"id": 2, "status": "deviation", "x": 182, "y": 291, "Δx": 8, "Δy": -5}, {"id": 3, "status": "missing"}], "terminal information": {"system": "Android 13", "device model": "Mi 10", "CPU score": 2450, "memory": "6GB"}, "processing time ms": 1080}.

[0068] It can be understood that the "uploading to the cloud server" does not rely on a third-party image recognition platform, and only based on the enterprise self-built quality inspection data platform or the industrial internet platform to realize data archiving and unified management, to ensure data security and project controllability.

[0069] It should be understood that the "recognition mode" field in the log is used to distinguish whether this detection is processed by the local OpenCV.js module or whether the cloud auxiliary recognition mechanism is triggered, which is used to provide a basis for judgment in the later performance evaluation and algorithm optimization.

[0070] For example, when the detection personnel completes the W013 station image detection on the mobile terminal, the system completes the labeling within 1 second and uploads the data through uni.uploadFile, and the cloud can backtrack all the white pin deviation conditions of this detection in the background system in a chart manner, and identify inefficient equipment or abnormal working conditions combined with terminal performance information; if it is found later that a certain station continuously appears deviation white pin out-of-limit problem, it can be traced back to the corresponding batch, operator and specific image, to realize closed-loop control.

[0071] Embodiment two: In addition, the present application provides a kind of based on uniapp's white pin position display method of automobile plastic parts, using the white pin position display platform based on uniapp of one of the above embodiments, can solve the technical problem of a kind of based on uniapp's white pin position display of automobile plastic parts.Compared with the prior art, the beneficial effects of the white pin position display method based on uniapp of automobile plastic parts provided by the present application are the same as those of the white pin position display platform based on uniapp of automobile plastic parts provided by the above embodiments, and other technical features in the white pin position display method based on uniapp of automobile plastic parts are the same as those disclosed in the above embodiment method, which will not be repeated here.

[0072] Embodiment three: the present application provides a kind of based on uniapp's white pin position display equipment of automobile plastic parts, please refer to Figure 2A uniapp-based white pin position display device for a car plastic part includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform a uniapp-based white pin position display method for a car plastic part as described in Embodiment 1. The uniapp-based white pin position display device for a car plastic part can include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Portable Application Description), a PMP (Portable Media Player), a car terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The uniapp-based white pin position display device for a car plastic part is only one example, and should not limit the functions and use range of the uniapp-based white pin position display device for a car plastic part. The uniapp-based white pin position display device for a car plastic part can include a processing device 1001 (e.g., a central processing unit, a graphic processing unit, or the like) that can perform various appropriate actions and processes according to a program stored in a ROM (Read Only Memory) 1002 or a program loaded from a storage device 1003 to a RAM (Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the uniapp-based white pin position display device for a car plastic part are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An I / O (Input / Output) interface 1006 is also connected to the bus. Generally, the following platforms can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, and the like; an output device 1008 including, for example, an LCD (Liquid Crystal Display), a speaker, a vibrator, and the like; the storage device 1003 including, for example, a magnetic tape, a hard disk, and the like; and a communication device 1009. The communication device 1009 can allow the uniapp-based white pin position display device for a car plastic part to communicate with other devices to exchange data wirelessly or by wire. Although the uniapp-based white pin position display device for a car plastic part having various platforms is shown in the drawing, it should be understood that all the shown platforms are not required to be implemented or provided. More or less platforms can be alternatively implemented or provided.

[0073] Embodiment four: the application also provides a computer program product, comprising a computer program which, when executed by a processor, implements the steps of a uniapp-based white pin position display method for automobile plastic parts as described above. The computer program product provided by the application can solve the technical problem of a uniapp-based white pin position display for automobile plastic parts. Compared with the prior art, the beneficial effects of the computer program product provided by the application are the same as those of the uniapp-based white pin position display method for automobile plastic parts provided by the above-mentioned embodiments, and are not described here.

[0074] In particular, according to the embodiments disclosed by the application, the processes described above with reference to the flowcharts can be implemented as computer platform programs. For example, the embodiments disclosed by the application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program codes for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from the network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiments disclosed by the application are executed.

[0075] It should be understood that various parts of the application disclosed can be realized with hardware, platforms, firmware or a combination thereof. In the description of the above-mentioned embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0076] Obviously, those skilled in the art can make various modifications and variations to the application without departing from the spirit and scope of the application. Thus, if these modifications and variations of the application fall within the scope of the claims of the application and their equivalent technologies, the application also intends to include these modifications and variations.

Claims

1. A uniapp-based white pin position display platform for automobile plastic parts, characterized in that, The platform comprises: A template configuration acquisition module configured to call a terminal camera to collect an image of a plastic part of a vehicle through a front-end camera interface uni.chooseImage encapsulated by uniapp, determine a current station according to the image of the plastic part of the vehicle, and download a JSON format station template configuration corresponding to the current station from a server through a front-end network request interface uni.request encapsulated by uniapp; An image preprocessing and compression module configured to perform image conversion from RGB space to HSV space processing, conditional filtering processing and adaptive compression image resolution processing on the image of the plastic part of the vehicle based on an OpenCV.js module in a WebView environment of uniapp, and obtain an optimized image of the plastic part of the vehicle; A position recognition and extraction module configured to call an OpenCV.js interface to perform white pin region contour extraction, shape screening and coordinate error matching based on the optimized image of the plastic part of the vehicle, and obtain a white pin detection result; The step of calling the OpenCV.js interface to perform white pin region contour extraction, shape screening and coordinate error matching based on the optimized image of the plastic part of the vehicle specifically comprises: extracting a white pin region contour from the optimized image of the plastic part of the vehicle through a cv.findContours interface; calculating a roundness index for each white nail region contour i , ; wherein, is the contour area of the white nail region contour i, is the contour perimeter of the white nail region contour i; a roundness index threshold is predefined only the white nail region contours satisfying are retained; obtain the white pin standard coordinate of the white pin area contour i from the JSON format station template configuration corresponding to the current station in the template configuration acquisition module obtain the white pin standard coordinate of the white pin area contour i from the JSON format station template configuration corresponding to the current station in the template configuration acquisition module and the current station white pin arrangement mode; When the white pin arrangement mode is a nonlinear arrangement, according to the contour center coordinates and the white pin standard coordinates , error matching is performed by using a distance error matching method to obtain a tolerance , , a preset tolerance threshold , when , the white pin is marked as qualified, otherwise, the white pin is marked as a deviation white pin or a missing white pin; When the white pin arrangement mode is linear arrangement, according to the contour center coordinates and the white pin standard coordinates , the error matching is performed by using the direction perception matching method, the transverse deviation and the longitudinal deviation are calculated respectively, the preset transverse tolerance threshold and the longitudinal tolerance threshold are set, when and , it is determined as a qualified white pin, otherwise it is determined as a deviation white pin; When the white pin arrangement pattern is linear arrangement, and the deviation white pin is determined, the relative included angle is introduced The relative included angle is obtained by rotation trend analysis , wherein ( ) is an inverse tangent function; generating the white pin detection result according to the determination result of the white pin; A visual display module configured to perform graphical annotation display of the white pin detection result on a terminal interface based on a Canvas canvas of uniapp; A result uploading and log module configured to upload the image processing result subjected to graphical annotation display to a cloud server in real time and record a detection log.

2. The uniapp-based white pin position display platform for automobile plastic parts of claim 1, wherein, The station template configuration comprises a total number of white pins, a standard white pin coordinate array and a tolerance distance threshold value display style control parameter.

3. The uniapp-based white pin position display platform for automobile plastic parts of claim 1, wherein, In the image preprocessing and compression module, the step of performing image conversion from RGB space to HSV space processing, conditional filtering processing and adaptive compression image resolution processing on the image of the plastic part of the vehicle based on the OpenCV.js module in the WebView environment of uniapp to obtain the optimized image of the plastic part of the vehicle specifically comprises: using an interface uni.getSystemInfoSync in combination with a cv.resize interface of OpenCV.js to determine the resolution size of the image of the plastic part of the vehicle, presetting a resolution threshold value of the image of the plastic part of the vehicle, and performing equal ratio scaling processing on the image of the plastic part of the vehicle first if the resolution size of the image of the plastic part of the vehicle exceeds the resolution threshold value of the image of the plastic part of the vehicle; The cv.cvtColor interface in OpenCV.js is called to convert the image of the automobile plastic part from the RGB space to the HSV color space, to obtain an HSV image matrix (H(u, v), S(u, v), V(u, v)); wherein u and v are two-dimensional pixel coordinates of the image of the automobile plastic part, representing the horizontal and vertical positions of a certain pixel point in the image of the automobile plastic part; H(u, v) is the hue component of the pixel point (u, v); S(u, v) is the saturation component of the pixel point (u, v); and V(u, v) is the brightness component of the pixel point (u, v); The following threshold conditions are applied based on the HSV image matrix to construct a white nail mask , wherein, is an empirical threshold value, applicable to reflectance performance under natural or industrial light; According to the constructed white pin mask A candidate white pin region is determined, and for the candidate white pin region, first, median filtering is performed through cv.medianBlur to remove isolated noise points, then an open operation is performed through cv.morphologyEx to eliminate interference regions, and finally, an inflation operation is performed to enhance the outline of the candidate white pin region. Get the current terminal processor model and memory capacity through the uni.getSystemInfoSync interface, and calculate the device performance score And dynamically set the compression ratio according to the image size Apply the compression ratio to the image of the automobile plastic part after enhancing the profile of the candidate white nail region in the expansion operation Carry out image adaptive compression to obtain an optimized automobile plastic part image.

4. The uniapp-based white pin position display platform for automobile plastic parts of claim 3, wherein, In the image preprocessing and compression module, the compression ratio wherein, is a compression weight factor, is a preset standard image area threshold value, is an original width of the image of the automobile plastic part, is an original height of the image of the automobile plastic part.

5. The uniapp-based white pin position display platform for automobile plastic parts of claim 1, wherein, In the visualization display module, the Canvas canvas based on uniapp is used to perform graphical annotation display of the white pin detection result on the terminal interface, specifically including: The Canvas canvas based on uniapp draws a green circular mark on the position of the qualified white pin, draws a red circle on the position of the deviated white pin, and labels the tolerance or lateral deviation and longitudinal deviation ; a hollow warning mark is drawn on the position of the non-matched standard white pin, and a "missing" prompt is given; all labeling styles are dynamically loaded from the JSON format station template configuration corresponding to the current station in the template configuration acquisition module, to realize consistency of multiple terminals.

6. The uniapp-based white pin position display platform for automobile plastic parts of claim 1, wherein, In the result uploading and log module, the image processing result subjected to graphical annotation display is uploaded to the cloud server in real time, and the detection log is recorded, specifically including: the image processing result subjected to graphical annotation display is uploaded to the cloud server in JSON format through the HTTP protocol by using the uni.uploadFile interface and the white pin detection result in the position recognition and extraction module, the recognition mode in each white pin detection result, the error matching result and the center coordinates of each white pin, the processing time consumption and the terminal device information are recorded; and the white pin detection result is bound with the station number, the user ID and the time stamp, for use in quality tracing and report analysis.

7. A white pin position display method for a uniapp-based automotive plastic part, applied to the uniapp-based automotive plastic part white pin position display platform of any one of claims 1-6, characterized in that, The method comprises: Step S10: calling the terminal camera to collect the image of the automobile plastic part by using the front-end camera interface uni.chooseImage encapsulated by uniapp, determining the current station according to the image of the automobile plastic part, and downloading the station template configuration in JSON format corresponding to the current station from the server by using the front-end network request interface uni.request encapsulated by uniapp; Step S20: performing image conversion from the RGB space to the HSV space, condition filtering and adaptive compression of the image resolution on the image of the automobile plastic part based on the OpenCV.js module in the WebView environment of uniapp, to obtain an optimized image of the automobile plastic part; Step S30: calling the OpenCV.js interface based on the optimized image of the automobile plastic part to perform white pin region contour extraction, shape screening and coordinate error matching, to obtain a white pin detection result; The step of calling the OpenCV.js interface based on the optimized image of the automobile plastic part to perform white pin region contour extraction, shape screening and coordinate error matching specifically comprises: extracting the white pin region contour from the optimized image of the automobile plastic part by using the cv.findContours interface; calculating a roundness index for each white pin region contour i , ; wherein, is the contour area of the white pin region contour i, is the contour perimeter of the white pin region contour i; a roundness index threshold value is predefined only the white pin region contours satisfying are retained; obtain the white pin standard coordinate of the white pin area contour i from the JSON format station template configuration corresponding to the current station in the template configuration acquisition module obtain the white pin standard coordinate of the white pin area contour i from the JSON format station template configuration corresponding to the current station in the template configuration acquisition module and the current station white pin arrangement mode; When the white pin arrangement mode is a nonlinear arrangement, according to the contour center coordinates and the white pin standard coordinates , error matching is performed by using a distance error matching method to obtain a tolerance , , a preset tolerance threshold , if , the white pin is marked as qualified, otherwise, the white pin is marked as a deviation white pin or a missing white pin; When the white pin arrangement mode is linear arrangement, according to the contour center coordinates and the white pin standard coordinates , the error matching is performed by using the direction perception matching method, the transverse deviation and the longitudinal deviation are calculated respectively, the preset transverse tolerance threshold and the longitudinal tolerance threshold are set, when and , it is determined as a qualified white pin, otherwise it is determined as a deviation white pin; When the white pin arrangement pattern is linear arrangement, and the deviation white pin is determined, the relative included angle is introduced The relative included angle is obtained by rotation trend analysis , , wherein ( ) is an inverse tangent function; generating the white pin detection result according to the determination result of the white pin; Step S40: performing graphical annotation display of the white pin detection result on the terminal interface based on the Canvas canvas of uniapp; Step S50: uploading the image processing result subjected to graphical annotation display to the cloud server in real time, and recording the detection log.

8. A uniapp-based white pin position display device for a car plastic part, characterized in that, The uniapp-based white pin position display device for automobile plastic parts comprises a memory, a processor, and a uniapp-based white pin position display program for automobile plastic parts stored in the memory and capable of running on the processor.

9. A computer program product, characterised in that, The computer program product comprises a uniapp-based white pin position display program for automobile plastic parts, which, when executed by a processor, implements the uniapp-based white pin position display method for automobile plastic parts in claim 7.

Citation Information

Patent Citations

  • Vehicle part defect detection method and system and electronic equipment

    CN114418998A

  • Automobile plastic member positioning and detecting apparatus

    CN204165478U