CN117911273B - Auxiliary positioning method for cutting protection leather sheath with keyboard by iPad - Google Patents

Auxiliary positioning method for cutting protection leather sheath with keyboard by iPad Download PDF

Info

Publication number
CN117911273B
CN117911273B CN202410295192.7A CN202410295192A CN117911273B CN 117911273 B CN117911273 B CN 117911273B CN 202410295192 A CN202410295192 A CN 202410295192A CN 117911273 B CN117911273 B CN 117911273B
Authority
CN
China
Prior art keywords
value
gray
window
change
change window
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410295192.7A
Other languages
Chinese (zh)
Other versions
CN117911273A (en
Inventor
单芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Hualong Technology Co ltd
Original Assignee
Shenzhen Hualong Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Hualong Technology Co ltd filed Critical Shenzhen Hualong Technology Co ltd
Priority to CN202410295192.7A priority Critical patent/CN117911273B/en
Publication of CN117911273A publication Critical patent/CN117911273A/en
Application granted granted Critical
Publication of CN117911273B publication Critical patent/CN117911273B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

The invention relates to the technical field of image data processing, in particular to a cutting auxiliary positioning method for a protective leather sheath with a keyboard by using an iPad. The method comprises the steps of obtaining a gray image of a protective leather sheath to be cut; constructing variation windows with different sizes; analyzing the gray value in each change window to obtain the noise influence value of the change window; acquiring an actual noise influence value according to the difference of the noise influence values between two adjacent change windows; and according to the actual noise influence value and the gray value in the gray image, acquiring a wiener filter coefficient, denoising the gray image through a wiener filter algorithm to acquire a denoised gray image, and cutting the protective leather sheath. According to the invention, through analyzing the gray value of the pixel point, the wiener filter coefficient is accurately estimated, so that the denoised gray image is accurately obtained, and the cutting precision of the protective leather sheath is improved.

Description

Auxiliary positioning method for cutting protection leather sheath with keyboard by iPad
Technical Field
The invention relates to the technical field of image data processing, in particular to a cutting auxiliary positioning method for a protective leather sheath with a keyboard by using an iPad.
Background
Along with the wide application of the iPad in daily life and work, the demand of users for the protection leather sheath matched with the iPad is continuously increased, and particularly, the protection leather sheath with a keyboard provides a more convenient input mode besides protection equipment. In order to produce an iPad with a keyboard protection leather sheath which is matched accurately, the auxiliary cutting positioning method is particularly important. The areas of the protective holster that need to be cut are typically identified by visual positioning using computer aided design techniques. However, when the image of the to-be-cut protection leather sheath is acquired, noise exists in the acquired image of the to-be-cut protection leather sheath due to the acquisition environment or the heating of the visual sensor, so that the visual positioning of the to-be-cut protection leather sheath is affected, and further, the accurate cutting of the to-be-cut protection leather sheath cannot be performed, and therefore, the denoising treatment is required for the image of the to-be-cut protection leather sheath.
In the existing method, denoising treatment is carried out on the to-be-cut protection leather sheath image through a wiener filtering algorithm. The objective of the wiener filtering algorithm is to estimate an original signal by minimizing a mean square error and inhibit noise in the process, the denoising performance of the wiener filtering algorithm depends on the estimation of a wiener filtering coefficient, when the wiener filtering coefficient is inaccurate, the wiener filtering algorithm may cause image distortion, so that image details are lost, positioning points in a to-be-cut protection leather sheath cannot be accurately determined, and the to-be-cut protection leather sheath cannot be accurately cut.
Disclosure of Invention
In order to solve the technical problems that the estimation of wiener filter coefficients is inaccurate, the image is distorted, and the locating point of a to-be-cut protection leather sheath cannot be accurately determined, the invention aims to provide an auxiliary locating method for cutting the protection leather sheath with an iPad keyboard, and the adopted technical scheme is as follows:
The invention provides a cutting auxiliary positioning method for a protective leather sheath with a keyboard by using an iPad, which comprises the following steps:
Acquiring a gray image of a protective leather sheath to be cut;
Constructing an initial change window with a preset size in the gray level image, and increasing the initial side length of the initial change window according to a preset step length to obtain change windows with different sizes; respectively constructing the gray value of each row of pixel points and the gray value of each column of pixel points in each change window into a gray value sequence, and acquiring the component data of each gray value sequence according to the change of the gray value in each gray value sequence;
according to the fluctuation of each component data of each gray value sequence of each change window, the quantity of the component data of each gray value sequence, the fluctuation difference between each two adjacent lines and each two adjacent columns of gray value sequences and the gray value size in each change window, the gray value fluctuation condition between each change window and two adjacent change windows, the noise influence value of each change window is obtained;
According to the difference of the noise influence values between every two adjacent change windows, the noise influence value of each change window is adjusted, and the actual noise influence value of each change window is obtained; acquiring a wiener filter coefficient of the gray level image according to the actual noise influence value of each change window and the gray level value of each pixel point in the gray level image;
and denoising the gray level image according to the wiener filter coefficient by a wiener filter algorithm to obtain a denoised gray level image, and cutting the protective leather sheath.
Further, the component data acquisition method comprises the following steps:
Performing curve fitting on gray values in each gray value sequence to obtain a gray curve;
Each gray level curve is divided through wavelet change, and gray level values in each divided curve are used as component data.
Further, the method for obtaining the noise influence value comprises the following steps:
acquiring variances of all data in each component data of each gray value sequence as first variances of corresponding component data;
Acquiring variances of all gray values in each gray value sequence as second variances of the corresponding gray value sequences;
acquiring a line characteristic value of each change window according to the first variance of each component data of the gray value sequence of each line in each change window, the quantity of the component data of the gray value sequence of each line and the difference of the second variance between the gray value sequences of every two adjacent lines;
Acquiring a column characteristic value of each change window according to the first variance of each component data of the gray value sequence of each column in each change window, the quantity of the component data of the gray value sequence of each column and the difference of the second variance between the gray value sequences of every two adjacent columns;
Acquiring the integral characteristic value of the corresponding change window according to the gray value mean value of each change window and the gray value fluctuation condition between each change window and two adjacent change windows;
And acquiring the noise influence value of the corresponding change window according to the row characteristic value, the column characteristic value and the integral characteristic value of each change window.
Further, the calculation formula of the line characteristic value is as follows:
In the method, in the process of the invention, A row characteristic value of the a-th change window; i is the total number of rows of the a-th variation window; /(I)The number of component data of the gray value sequence of the i-th row of the a-th variation window; /(I)A first variance of the j-th component data of the gray value sequence of the i-th row of the a-th variation window; /(I)A second variance of the sequence of gray values for the ith row of the a-th variation window; a second variance of the sequence of gray values for the (i+1) th row of the a-th variation window; /(I) As a function of absolute value.
Further, the calculation formula of the integral characteristic value is as follows:
In the method, in the process of the invention, The overall characteristic value of the a-th change window; /(I)The gray value mean value of the a-th change window; /(I)Gray value variance for the a-th variation window; /(I)Gray value variance for the (a-1) th variation window; /(I)Gray value variance for the (a+1) th variation window; /(I)Is a first preset constant, greater than 0.
Further, the method for obtaining the noise influence value of the corresponding change window according to the row characteristic value, the column characteristic value and the overall characteristic value of each change window comprises the following steps:
Taking the product of the row characteristic value and the integral characteristic value of each change window as a first value of the corresponding change window;
The normalization result of the first value is used as a line noise influence value corresponding to the change window;
Taking the product of the column characteristic value and the integral characteristic value of each change window as a second value of the corresponding change window;
The second value is normalized to obtain a column noise influence value corresponding to the change window;
And taking the average value of the row noise influence value and the column noise influence value of each change window as the noise influence value of the corresponding change window.
Further, the method for obtaining the actual noise influence value comprises the following steps:
Acquiring the noise influence value difference between each change window and the next adjacent change window as the influence weight of each change window;
and taking the product of the inverse of the influence weight of each change window and the noise influence value as the actual noise influence value of the corresponding change window.
Further, the method for obtaining the wiener filter coefficient comprises the following steps:
acquiring the gray value average value of all pixel points in the gray image, and taking the gray value average value as the whole gray value average value;
acquiring the difference between the gray value of each pixel point in the gray image and the whole gray average value as a single gray difference;
And obtaining a wiener filter coefficient of the gray level image according to the average value of the actual noise influence values of all the change windows and the average value of the single gray level difference.
Further, the calculation formula of the wiener filter coefficient is as follows:
wherein q is a wiener filter coefficient; n is the total number of variation windows; actual noise impact value for the nth variation window; m is the total number of pixel points in the gray scale image; /(I) The gray value of the mth pixel point in the gray image; /(I)Is the whole gray level average value; /(I)Is a single gray scale difference; /(I)As a function of absolute value.
Further, the method for cutting the protective leather sheath comprises the following steps:
And determining positioning points in the denoised gray image by a three-point positioning method, and cutting the protective leather sheath.
The invention has the following beneficial effects:
The method comprises the steps of constructing variation windows with different sizes in a gray image, facilitating accurate analysis of the distribution condition of noise points in the gray image, further constructing gray values of each row of pixel points and gray values of each column of pixel points in each variation window into a gray value sequence, acquiring component data of each gray value sequence according to variation of the gray values in each gray value sequence, and performing more accurate analysis on the noise condition in each variation window to prepare for accurate evaluation of wiener filter coefficients; further, according to fluctuation of each component data of each gray value sequence of each change window, the quantity of the component data of each gray value sequence, fluctuation difference between each two adjacent lines and each two adjacent columns of gray value sequences and gray value size in each change window, the gray value fluctuation condition between each change window and two adjacent change windows, the noise influence value of each change window is obtained, and the degree of influence of noise on each change window is determined; in order to reduce the phenomenon that the texture pixel point is mistaken for a noise pixel point and further the evaluation of the wiener filter coefficient is inaccurate, the noise influence value of each change window is adjusted according to the difference of the noise influence values between every two adjacent change windows, the actual noise influence value of each change window is obtained, and the texture details in each change window are reserved; further, according to the actual noise influence value of each change window and the gray value of each pixel point in the gray image, the wiener filter coefficient of the gray image is accurately obtained, the gray image is accurately denoised through a wiener filter algorithm, the denoised gray image is obtained, namely, the reduced noise is used for identifying the locating point in the protective leather sleeve to be cut, the interference of identifying the locating point in the gray image is reserved, the accuracy of identifying the locating point is improved, and the protective leather sleeve to be cut is accurately cut.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a method for assisting in positioning cutting an iPad leather sheath with a keyboard according to an embodiment of the invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following is a detailed description of a method for assisting in positioning the cutting of the protection leather sheath with the keyboard according to the invention, which is provided by the invention, with reference to the attached drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The invention provides a specific scheme of an auxiliary positioning method for cutting a protective leather sheath with a keyboard by using an iPad with a keyboard, which is specifically described below with reference to the accompanying drawings.
The scene of the embodiment of the invention is as follows: the gray scale image is a square image with equal side lengths.
The aim of the embodiment of the invention is as follows: the gray image is subjected to denoising treatment through a wiener filtering algorithm, and partial detail information in the gray image is easy to lose because the wiener filtering algorithm is too dependent on the estimation of the wiener filtering coefficient of the gray image. Therefore, the embodiment of the invention accurately estimates the wiener filter coefficient of the gray image by analyzing the gray value of the pixel point in the gray image, accurately denoises the gray image, removes the influence of noise, and accurately identifies the positioning point in the gray image so as to accurately cut the protective leather sheath to be cut. The wiener filtering algorithm is a known technology, and will not be described in detail.
Referring to fig. 1, a flow chart of a method for assisting in positioning cutting of an iPad leather sheath with a keyboard according to an embodiment of the invention is shown, the method includes the following steps:
Step S1: and acquiring a gray image of the protective leather sheath to be cut.
Specifically, when producing the protection leather sheath with the keyboard of the iPad, the protection sheath matched with the iPad needs to be manufactured according to different iPad models, so that a shape image of the protection leather sheath needs to be drawn through a computer, and then the drawn shape image is transmitted to a mechanical arm of a mechanical processing device through a data line to control the path of mechanical arm processing. And installing a high-definition industrial CCD camera at the tail end of the mechanical arm, overlooking and vertically acquiring an image of the protective leather sheath to be cut, analyzing the image of the protective leather sheath to be cut, determining positioning points in the image of the protective leather sheath to be cut, and further determining a cutting area of the protective leather sheath according to the positioning points. In actual conditions, due to the fact that the environment of a processing workshop is complex or the camera works for a long time, noise exists in the to-be-cut protection leather sheath image, the positioning points in the to-be-cut protection leather sheath image are affected and identified, the cutting area of the protection leather sheath is prone to inaccuracy, and therefore denoising treatment is needed to be carried out on the to-be-cut protection leather sheath image. In order to accurately and efficiently perform denoising treatment, the embodiment of the invention performs graying treatment on the image of the protective leather sheath to be cut, and acquires the gray image of the protective leather sheath to be cut. The graying process is the prior art, and will not be described in detail.
Step S2: constructing an initial change window with a preset size in the gray level image, and increasing the initial side length of the initial change window according to a preset step length to obtain change windows with different sizes; the gray value of each row of pixel points and the gray value of each column of pixel points in each change window are respectively constructed into a gray value sequence, and the component data of each gray value sequence are acquired according to the change of the gray value in each gray value sequence.
Specifically, in order to accurately analyze the influence of noise on a gray image, the embodiment of the invention constructs by taking the central pixel point of the gray image as the centerThe initial change window of size, therefore, the initial side length of the initial change window is 5, the preset step length is set to 2, the initial side length is increased according to the preset step length, therefore, the size of the second change window is/>And stopping acquiring the change window until the maximum change window completely covers the gray level image. Wherein each variation window must be a square area with an odd side length. In the embodiment of the invention, the initial change window is constructed by taking the central pixel point of the gray image as the center, and an implementer can determine the central point of the initial change window according to actual conditions without limitation. The size of the initial side length and the preset step length can be set by an operator according to actual conditions, and the method is not limited herein. When the side length of the gray level image is odd, the maximum variation window can completely cover the gray level image; when the side length of the gray image is even, in order to make the change window completely cover the gray image, the embodiment of the present invention sets the last preset step length to 1. So far, the changing windows with different sizes in the gray level image are obtained.
Further, in order to accurately evaluate the wiener filter coefficient according to the noise condition in the gray level image, the embodiment of the invention analyzes the gray level value of each row of pixel points and the gray level value of each column of pixel points in each change window respectively, namely, the gray level value of each row of pixel points and the gray level value of each column of pixel points in each change window are sequentially arranged into a gray level value sequence according to the positions of the pixel points. In order to accurately analyze noise conditions in each gray value sequence, the embodiment of the invention respectively carries out curve fitting on gray values in each gray value sequence to obtain a gray curve; dividing each gray scale curve through wavelet change, and taking gray scale values in each divided curve section as component data, wherein each gray scale curve at least corresponds to one curve section, namely each gray scale value sequence at least corresponds to one component data. The component data of each gray value sequence is determined, so that the noise condition in each change window can be accurately analyzed later. Wherein, the curve fitting and wavelet change are both the prior art, and are not repeated.
Step S3: and acquiring the noise influence value of each change window according to the fluctuation of each component data of each gray value sequence of each change window, the quantity of the component data of each gray value sequence, the fluctuation difference between the gray value sequences of each two adjacent rows and each two adjacent columns and the gray value size in each change window, and the gray value fluctuation condition between each change window and two adjacent change windows.
Specifically, in order to accurately analyze the noise condition in each change window, obtain the noise influence value of each change window, so as to facilitate the accurate evaluation of the wiener filter coefficient in the following steps, the embodiment of the invention analyzes the gray value sequence in each change window, and when the gray value fluctuation in the component data of a certain gray value sequence is larger, the probability that the noise exists in the gray value sequence is larger is indicated, and the influence degree of the noise in the corresponding change window is indirectly indicated to be larger; when the more component data are divided by a certain gray value sequence, the larger the variation fluctuation of gray values in the gray value sequence is, the more noise points exist in the gray value sequence are, and the larger the influence degree of noise in a corresponding variation window is indirectly indicated; for any change window, the larger the difference of gray value variance between a certain gray value sequence and the next adjacent gray value sequence in the change window, the more unstable the gray value distribution in the change window, and the more likely noise exists in the change window. Therefore, the gray value sequence of each row of each change window is analyzed, and the row characteristic value of each change window is obtained; and analyzing the gray value sequence of each column of each change window to obtain the column characteristic value of each change window. And preliminarily reflecting the noise condition in each change window according to the row characteristic value and the column characteristic value of each change window. In order to analyze the noise condition in each change window more accurately, the embodiment of the invention obtains the gray value average value of all the pixel points in each change window, and the larger the gray value average value of all the pixel points in a certain change window is, the more likely the noise pixel points exist in the change window is indicated, because the gray value of the noise pixel points is larger. Further, the gray value fluctuation condition between each change window and two adjacent change windows is analyzed, and when the gray value fluctuation difference between a certain change window and two adjacent change windows is larger, the influence degree of noise in the change window is larger. Therefore, according to the gray value in each change window and the gray value fluctuation condition between each change window and two adjacent change windows, the integral characteristic value of each change window is obtained. And further, acquiring the noise influence value of the corresponding change window according to the row characteristic value, the column characteristic value and the integral characteristic value of each change window. The specific method for acquiring the noise influence value of each change window is as follows:
(1) And acquiring a line characteristic value.
Preferably, the method for acquiring the line characteristic value is as follows: the variance of all data in each component data of each gray value sequence is obtained as a first variance of the corresponding component data, wherein the larger the first variance is, the more noise is likely to exist in the corresponding component data. The variance of all gray values in each gray value sequence is obtained as a second variance of the corresponding gray value sequence, and the larger the second variance is, the more noise is likely to exist in the corresponding gray value sequence. Therefore, the line characteristic value of each variation window is obtained from the first variance of each component data of the gradation value sequence of each line and the number of component data of the gradation value sequence of each line in each variation window, and the difference of the second variance between the gradation value sequences of every adjacent two lines.
Taking the a-th change window as an example, a calculation formula for obtaining the line characteristic value of the a-th change window is as follows:
In the method, in the process of the invention, A row characteristic value of the a-th change window; i is the total number of rows of the a-th variation window; /(I)The number of component data of the gray value sequence of the i-th row of the a-th variation window; /(I)A first variance of the j-th component data of the gray value sequence of the i-th row of the a-th variation window; /(I)A second variance of the sequence of gray values for the ith row of the a-th variation window; a second variance of the sequence of gray values for the (i+1) th row of the a-th variation window; /(I) As a function of absolute value.
It should be noted that the number of the substrates,The larger the probability of noise being present in the j-th component data of the gray value sequence of the i-th row illustrating the a-th variation window is, the greater the/>The larger the gray value sequence of the ith row of the (a) th variation window, the more likely noise exists, and the more the (a) th variation window is affected by the noise, the greater the indirect description is/>The larger; /(I)The larger the gray value variation fluctuation in the gray value sequence of the ith row of the ith variation window is, the more noise points exist in the ith row of the ith variation window are indirectly indicated, the greater the degree of influence of noise on the ith variation window is indirectly indicated,The larger; /(I)The larger the difference between the gray value of the ith row and the gray value of the (i+1) th row of the (a) th variation window, the more likely noise exists in the ith row of the (a) th variation window, the greater the degree to which the (a) th variation window is affected by the noise, and the greater the (i+1) th variation window isThe larger; thus,/>The larger the gray value of each row of pixel points of the a-th variation window is, the greater the degree to which the gray value is affected by noise is.
And acquiring the row characteristic value of each change window according to the method for acquiring the row characteristic value of the a-th change window.
(2) Column feature values are obtained.
In order to perform more accurate analysis on the noise influence degree of each change window, the embodiment of the invention refers to a method for acquiring the row characteristic value of each change window to acquire the column characteristic value of each change window. Taking the a-th change window as an example, a calculation formula for obtaining the column characteristic value of the a-th change window is as follows:
In the method, in the process of the invention, Column eigenvalues for the a-th variation window; v is the total column number of the a-th variation window; /(I)The number of component data of the gradation value sequence of the v th column of the a-th variation window; /(I)A first variance of the kth component data of the gray value sequence of the v th column of the a-th variation window; /(I)A second variance of the sequence of gray values for the v th column of the a-th variation window; /(I)A second variance of the sequence of gray values for column (v+1) of the a-th variation window; /(I)As a function of absolute value.
It should be noted that the number of the substrates,The greater the probability of noise being present in the kth component data of the sequence of gray values of the nth column of the nth variation window, the greater the/>The larger the gray value sequence of the v column of the a-th variation window, the more likely noise exists, and the greater the influence degree of the noise on the a-th variation window is, namely, the greater the influence degree of the noise is, namely, the greater the influence degree of the v column of the a-th variation window is, namely, the greater the influence degree of the noise isThe larger; /(I)The larger the gray value variation fluctuation in the gray value sequence of the v th column of the a-th variation window is, the more noise points exist in the v th column of the a-th variation window, and the greater the degree of influence of noise on the a-th variation window is indirectly indicated as follows/>The larger; The larger the difference between the gray value of the v-th column and the gray value of the (v+1) -th column of the a-th variation window, the more likely noise is present in the v-th column of the a-th variation window, indirectly The larger; thus,/>The larger the gray value of each column of pixels of the a-th variation window, the greater the degree to which the gray value is affected by noise.
According to the method for acquiring the column characteristic value of the a-th change window, acquiring the column characteristic value of each change window.
(3) And obtaining the integral characteristic value.
Taking the a-th change window as an example, a calculation formula for obtaining the overall characteristic value of the a-th change window is as follows:
In the method, in the process of the invention, The overall characteristic value of the a-th change window; /(I)The gray value mean value of the a-th change window; /(I)Gray value variance for the a-th variation window; /(I)Gray value variance for the (a-1) th variation window; /(I)Gray value variance for the (a+1) th variation window; /(I)Is a first preset constant, greater than 0.
Embodiments of the invention willSet to 0.1, avoid denominator to 0, and the practitioner can set/>, according to the actual situationIs not limited herein.
It should be noted that the number of the substrates,The larger the one, the more likely noise points with larger gray values are present in the a-th variation window,The larger; /(I)The larger the/>The larger the gray value distribution in the a-th variation window is, the more unstable the gray value distribution in the a-th variation window is, which means that noise points are more likely to exist in the a-th variation window,/>The larger; thus,/>The larger the a-th variation window is, the greater the degree of influence of noise is.
And according to the method for acquiring the integral characteristic value of the a-th change window, acquiring the integral characteristic value of each change window.
(4) A noise impact value is obtained.
Preferably, the method for obtaining the noise influence value is as follows: taking the product of the row characteristic value and the integral characteristic value of each change window as a first value of the corresponding change window; the normalization result of the first value is used as a line noise influence value corresponding to the change window; taking the product of the column characteristic value and the integral characteristic value of each change window as a second value of the corresponding change window; the second value is normalized to obtain a column noise influence value corresponding to the change window; and taking the average value of the row noise influence value and the column noise influence value of each change window as the noise influence value of the corresponding change window.
Taking the a-th variation window as an example, a calculation formula for obtaining the noise influence value of the a-th variation window is as follows:
In the method, in the process of the invention, Noise impact value for the a-th variation window; /(I)A row characteristic value of the a-th change window; /(I)Column eigenvalues for the a-th variation window; /(I)The overall characteristic value of the a-th change window; norm is a normalization function; /(I)A first value for the a-th variation window; /(I)A row noise impact value for the a-th variation window; /(I)A second value that is the a-th variation window; /(I)The column noise contribution value for the a-th variation window.
It should be noted that the number of the substrates,The larger the pixel point of the row of the a-th variation window is, the greater the gray value of the pixel point of the row of the a-th variation window is affected by noise is, i.e./>The larger the a-th variation window is, the greater the degree of influence of noise is, and therefore, the line noise influence valueThe larger the gray value of each row of pixel points in the a-th variation window is, the larger the influence degree of noise is,The larger. /(I)The larger the gray value of each column of pixel points of the a-th variation window is, the greater the influence degree of noise is, i.e./>The larger the a-th variation window is, the greater the degree of influence of noise, and therefore, the column noise influence value/>The larger the gray value of each column of pixel points in the a-th variation window is, the greater the influence degree of noise is, namely/>The larger. Thus,/>The larger the a-th variation window, the greater the degree of influence of noise.
According to the method for acquiring the noise influence value of the a-th variation window, acquiring the noise influence value of each variation window.
Step S4: according to the difference of the noise influence values between every two adjacent change windows, the noise influence value of each change window is adjusted, and the actual noise influence value of each change window is obtained; and acquiring a wiener filter coefficient of the gray level image according to the actual noise influence value of each change window and the gray level value of each pixel point in the gray level image.
Specifically, the change windows of different sizes of the gray scale image are obtained to represent the possibility of noise in the areas of the different change windows of the gray scale image, but in practical situations, the textures existing in the gray scale image also cause the gray scale value change in the areas of the different change windows of the gray scale image, so that the texture pixel points in the gray scale image are easily mistaken as noise pixel points, and the texture information is easily lost when denoising is performed. In order to avoid losing texture information in a gray image, the embodiment of the invention considers that when different change windows of the gray image are acquired, the pixel point difference between two adjacent change windows is smaller because the pixel point difference between the two adjacent change windows is gradually expanded outwards by taking the central pixel point of the gray image as the center, and further the noise influence value difference between the two adjacent change windows is also smaller. Therefore, when the difference of the noise influence values between a certain variation window and the next adjacent variation window is larger, the more texture information possibly exists in the variation window, the more the noise influence value of the variation window needs to be corrected in order to accurately estimate the wiener filter coefficient, and further the actual noise influence value of each variation window actually participated in the acquisition of the wiener filter coefficient is acquired. Therefore, the wiener filter coefficient of the gray level image is accurately obtained according to the actual noise influence value of each change window and the gray level value of each pixel point in the gray level image. The specific method for acquiring the wiener filter coefficient of the gray level image comprises the following steps:
(1) And acquiring an actual noise influence value.
Preferably, the method for obtaining the actual noise influence value is as follows: acquiring the noise influence value difference between each change window and the next adjacent change window as the influence weight of each change window; and taking the product of the inverse of the influence weight of each change window and the noise influence value as the actual noise influence value of the corresponding change window.
Taking the nth variation window as an example, a calculation formula for obtaining an actual noise influence value of the nth variation window is as follows:
In the method, in the process of the invention, Actual noise impact value for the nth variation window; /(I)Noise impact value for the nth variation window; noise impact value for the (n+1) th variation window; /(I) As a function of absolute value; /(I)Is a second preset constant, greater than 0; The impact weight for the nth variation window.
Embodiments of the invention willSet to 1, avoid denominator to 0, and the practitioner can set/>, according to the actual situationIs not limited herein.
It should be noted that the influence weightThe larger, the greater the likelihood that texture is present in the nth variation windowThe smaller is, make/>The smaller the duty ratio involved in obtaining the wiener filter coefficient is, the more accurate the evaluation of the wiener filter coefficient isThe smaller; thus,/>The smaller the ratio, the smaller the ratio that the nth variation window participates in estimating wiener filter coefficients.
According to the method for acquiring the actual noise influence value of the nth variation window, acquiring the actual noise influence value of each variation window.
(2) And obtaining wiener filter coefficients.
Preferably, the method for obtaining the wiener filter coefficients is as follows: acquiring the gray value average value of all pixel points in the gray image, and taking the gray value average value as the whole gray value average value; acquiring the difference between the gray value of each pixel point in the gray image and the whole gray average value as a single gray difference; and obtaining a wiener filter coefficient of the gray level image according to the average value of the actual noise influence values of all the change windows and the average value of the single gray level difference.
As one example, the calculation formula for obtaining wiener filter coefficients is:
wherein q is a wiener filter coefficient; n is the total number of variation windows; actual noise impact value for the nth variation window; m is the total number of pixel points in the gray scale image; /(I) The gray value of the mth pixel point in the gray image; /(I)Is the whole gray level average value; /(I)Is a single gray scale difference; /(I)As a function of absolute value.
It should be noted that the number of the substrates,The larger the nth variation window is, the greater the degree of influence of noise is, the greater the/>The larger the description is, the more noise is present in the gray image,/>The larger; single gray level difference/>The larger the description that the more likely the mth pixel point in the gray image is a noise point,/>The larger the gray value distribution in the gray image, the more unstable the gray value distribution, the more noise in the gray image,/>The larger; thus,/>The larger the specification the greater the extent to which the greyscale image needs to be denoised.
Step S5: and denoising the gray level image according to the wiener filter coefficient by a wiener filter algorithm to obtain a denoised gray level image, and cutting the protective leather sheath.
And according to the acquired wiener filter coefficient, the accuracy of denoising by the wiener filter algorithm is improved, and then the denoising processing is carried out on the gray level image by the wiener filter algorithm, so that the denoised gray level image is obtained. And determining positioning points in the denoised gray image by a three-point positioning method, further accurately determining a cutting area of the protective leather sheath to be cut, and accurately cutting the protective leather sheath by a mechanical arm. The three-point positioning method is a well-known technique, and will not be described in detail.
The present invention has been completed.
In summary, the embodiment of the invention acquires the gray image of the protective leather sheath to be cut; constructing variation windows with different sizes; analyzing the gray value in each change window to obtain the noise influence value of the change window; acquiring an actual noise influence value according to the difference of the noise influence values between two adjacent change windows; and according to the actual noise influence value and the gray value in the gray image, acquiring a wiener filter coefficient, denoising the gray image through a wiener filter algorithm to acquire a denoised gray image, and cutting the protective leather sheath. According to the invention, through analyzing the gray value of the pixel point, the wiener filter coefficient is accurately estimated, so that the denoised gray image is accurately obtained, and the cutting precision of the protective leather sheath is improved.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.

Claims (7)

1. The auxiliary positioning method for cutting the protective leather sheath with the keyboard by using the iPad is characterized by comprising the following steps of:
Acquiring a gray image of a protective leather sheath to be cut;
Constructing an initial change window with a preset size in the gray level image, and increasing the initial side length of the initial change window according to a preset step length to obtain change windows with different sizes; respectively constructing the gray value of each row of pixel points and the gray value of each column of pixel points in each change window into a gray value sequence, and acquiring the component data of each gray value sequence according to the change of the gray value in each gray value sequence;
according to the fluctuation of each component data of each gray value sequence of each change window, the quantity of the component data of each gray value sequence, the fluctuation difference between each two adjacent lines and each two adjacent columns of gray value sequences and the gray value size in each change window, the gray value fluctuation condition between each change window and two adjacent change windows, the noise influence value of each change window is obtained;
According to the difference of the noise influence values between every two adjacent change windows, the noise influence value of each change window is adjusted, and the actual noise influence value of each change window is obtained; acquiring a wiener filter coefficient of the gray level image according to the actual noise influence value of each change window and the gray level value of each pixel point in the gray level image;
Denoising the gray level image according to a wiener filter coefficient through a wiener filter algorithm to obtain a denoised gray level image, and cutting a protective leather sheath;
the method for acquiring the noise influence value comprises the following steps:
acquiring variances of all data in each component data of each gray value sequence as first variances of corresponding component data;
Acquiring variances of all gray values in each gray value sequence as second variances of the corresponding gray value sequences;
acquiring a line characteristic value of each change window according to the first variance of each component data of the gray value sequence of each line in each change window, the quantity of the component data of the gray value sequence of each line and the difference of the second variance between the gray value sequences of every two adjacent lines;
Acquiring a column characteristic value of each change window according to the first variance of each component data of the gray value sequence of each column in each change window, the quantity of the component data of the gray value sequence of each column and the difference of the second variance between the gray value sequences of every two adjacent columns;
Acquiring the integral characteristic value of the corresponding change window according to the gray value mean value of each change window and the gray value fluctuation condition between each change window and two adjacent change windows;
acquiring noise influence values of corresponding change windows according to the row characteristic values, the column characteristic values and the overall characteristic values of each change window;
the calculation formula of the row characteristic value is as follows:
Wherein H a is the line characteristic value of the a-th variation window; i is the total number of rows of the a-th variation window; j a,i is the number of component data of the gray value sequence of the i-th row of the a-th variation window; s a,i,j is the first variance of the jth component data of the sequence of gray values of the ith row of the ith variation window; s a,i is the second variance of the sequence of gray values for the ith row of the a-th variation window; s a,(i+1) is the second variance of the gray value sequence of the (i+1) th row of the a-th variation window; the I is an absolute value function;
The calculation formula of the integral characteristic value is as follows:
wherein C a is the overall characteristic value of the a-th variation window; The gray value mean value of the a-th change window; s a is the gray value variance of the a-th variation window; s a-1 is the gray value variance of the (a-1) th variation window; s a+1 is the gray value variance of the (a+1) th variation window; alpha is a first preset constant which is greater than 0.
2. The auxiliary positioning method for cutting the protective leather sheath with the keyboard according to claim 1, wherein the component data acquisition method is as follows:
Performing curve fitting on gray values in each gray value sequence to obtain a gray curve;
Each gray level curve is divided through wavelet change, and gray level values in each divided curve are used as component data.
3. The auxiliary positioning method for cutting the protective leather sheath with the keyboard according to claim 1, wherein the method for obtaining the noise influence value of each change window according to the row characteristic value, the column characteristic value and the integral characteristic value of the corresponding change window is as follows:
Taking the product of the row characteristic value and the integral characteristic value of each change window as a first value of the corresponding change window;
The normalization result of the first value is used as a line noise influence value corresponding to the change window;
Taking the product of the column characteristic value and the integral characteristic value of each change window as a second value of the corresponding change window;
The second value is normalized to obtain a column noise influence value corresponding to the change window;
And taking the average value of the row noise influence value and the column noise influence value of each change window as the noise influence value of the corresponding change window.
4. The auxiliary positioning method for cutting the protective leather sheath with the keyboard according to claim 1, wherein the method for acquiring the actual noise influence value is as follows:
Acquiring the noise influence value difference between each change window and the next adjacent change window as the influence weight of each change window;
and taking the product of the inverse of the influence weight of each change window and the noise influence value as the actual noise influence value of the corresponding change window.
5. The auxiliary positioning method for cutting the protective leather sheath with the keyboard according to claim 1, wherein the method for obtaining the wiener filter coefficient is as follows:
acquiring the gray value average value of all pixel points in the gray image, and taking the gray value average value as the whole gray value average value;
acquiring the difference between the gray value of each pixel point in the gray image and the whole gray average value as a single gray difference;
And obtaining a wiener filter coefficient of the gray level image according to the average value of the actual noise influence values of all the change windows and the average value of the single gray level difference.
6. The auxiliary positioning method for cutting the protective leather sheath with the keyboard according to claim 5, wherein the calculation formula of the wiener filter coefficient is as follows:
Wherein q is a wiener filter coefficient; n is the total number of variation windows; p n is the actual noise impact value of the nth variation window; m is the total number of pixel points in the gray scale image; g m is the gray value of the mth pixel point in the gray image; Is the whole gray level average value; /(I) Is a single gray scale difference; i is an absolute function.
7. The auxiliary positioning method for cutting the protection leather sheath with the keyboard according to claim 1, wherein the method for cutting the protection leather sheath is as follows:
And determining positioning points in the denoised gray image by a three-point positioning method, and cutting the protective leather sheath.
CN202410295192.7A 2024-03-15 2024-03-15 Auxiliary positioning method for cutting protection leather sheath with keyboard by iPad Active CN117911273B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410295192.7A CN117911273B (en) 2024-03-15 2024-03-15 Auxiliary positioning method for cutting protection leather sheath with keyboard by iPad

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410295192.7A CN117911273B (en) 2024-03-15 2024-03-15 Auxiliary positioning method for cutting protection leather sheath with keyboard by iPad

Publications (2)

Publication Number Publication Date
CN117911273A CN117911273A (en) 2024-04-19
CN117911273B true CN117911273B (en) 2024-05-28

Family

ID=90692692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410295192.7A Active CN117911273B (en) 2024-03-15 2024-03-15 Auxiliary positioning method for cutting protection leather sheath with keyboard by iPad

Country Status (1)

Country Link
CN (1) CN117911273B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109472756A (en) * 2018-11-15 2019-03-15 昆明理工大学 Image de-noising method based on shearing wave conversion and with directionality local Wiener filtering
CN116205823A (en) * 2023-05-05 2023-06-02 青岛市妇女儿童医院(青岛市妇幼保健院、青岛市残疾儿童医疗康复中心、青岛市新生儿疾病筛查中心) Ultrasonic image denoising method based on spatial domain filtering
CN116363021A (en) * 2023-06-02 2023-06-30 中国人民解放军总医院第八医学中心 Intelligent collection system for nursing and evaluating wound patients
CN116363133A (en) * 2023-06-01 2023-06-30 无锡斯达新能源科技股份有限公司 Illuminator accessory defect detection method based on machine vision

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109472756A (en) * 2018-11-15 2019-03-15 昆明理工大学 Image de-noising method based on shearing wave conversion and with directionality local Wiener filtering
CN116205823A (en) * 2023-05-05 2023-06-02 青岛市妇女儿童医院(青岛市妇幼保健院、青岛市残疾儿童医疗康复中心、青岛市新生儿疾病筛查中心) Ultrasonic image denoising method based on spatial domain filtering
CN116363133A (en) * 2023-06-01 2023-06-30 无锡斯达新能源科技股份有限公司 Illuminator accessory defect detection method based on machine vision
CN116363021A (en) * 2023-06-02 2023-06-30 中国人民解放军总医院第八医学中心 Intelligent collection system for nursing and evaluating wound patients

Also Published As

Publication number Publication date
CN117911273A (en) 2024-04-19

Similar Documents

Publication Publication Date Title
CN115829883B (en) Surface image denoising method for special-shaped metal structural member
CN115063409B (en) Method and system for detecting surface material of mechanical cutter
CN116912248B (en) Irregular hardware surface defect detection method based on computer vision
CN115984148B (en) Denoising enhancement method for high-throughput gene sequencing data
CN110348459B (en) Sonar image fractal feature extraction method based on multi-scale rapid carpet covering method
CN115937231B (en) Infrared image iterative denoising method and system constrained by frequency spectrum structure
CN115841434A (en) Infrared image enhancement method for gas concentration analysis
CN117454096B (en) Motor production quality detection method and system
CN116137036A (en) Gene detection data intelligent processing system based on machine learning
CN116883674B (en) Multispectral image denoising device and food quality detection system using same
CN111047559A (en) Method for rapidly detecting abnormal area of digital pathological section
CN117911273B (en) Auxiliary positioning method for cutting protection leather sheath with keyboard by iPad
CN117437223A (en) Intelligent defect detection method for high-speed board-to-board connector
CN116503426B (en) Ultrasonic image segmentation method based on image processing
CN117437228A (en) Photovoltaic steel structure component fracture detection method based on image characteristics
CN109544593B (en) General image noise estimation method based on self-similarity measurement
CN115564705B (en) Burr detection precision enhancement method and system for precision standard component
CN116309170A (en) Defogging method and device for inspection images of power transmission line
CN114663329A (en) Point cloud quality evaluation method and system
CN117852156B (en) Bayesian-based intelligent road plane line position reconstruction method and system
CN116698855B (en) Production quality detection method for liquid injection pneumatic valve
CN116152806B (en) Bone marrow cell identification method and system based on convolutional neural network
CN112287772B (en) Fingerprint trace detection method, fingerprint detection device and computer readable storage medium
CN111289224B (en) Method for automatically identifying CTF test image and calculating numerical value
CN117574052A (en) Digital monitoring method, medium and system for surface corrosion of power grid equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant