CN115511835A - Image processing test platform - Google Patents

Image processing test platform Download PDF

Info

Publication number
CN115511835A
CN115511835A CN202211191332.3A CN202211191332A CN115511835A CN 115511835 A CN115511835 A CN 115511835A CN 202211191332 A CN202211191332 A CN 202211191332A CN 115511835 A CN115511835 A CN 115511835A
Authority
CN
China
Prior art keywords
image
line segment
module
color
comparison
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.)
Granted
Application number
CN202211191332.3A
Other languages
Chinese (zh)
Other versions
CN115511835B (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.)
Xian Aeronautical University
Original Assignee
Xian Aeronautical University
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 Xian Aeronautical University filed Critical Xian Aeronautical University
Priority to CN202211191332.3A priority Critical patent/CN115511835B/en
Publication of CN115511835A publication Critical patent/CN115511835A/en
Application granted granted Critical
Publication of CN115511835B publication Critical patent/CN115511835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30204Marker

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an image processing test platform, comprising: the device comprises an image acquisition module, an image color changing module, an image contour coloring module, a color dispersion determining module and a test result output module. The contour is marked by different colors, the position difference of contour points can be clearly shown directly through the different colors, and further the accuracy of contour extraction can be obtained through the difference of color values among line segments, so that the detection mode is simplified, and the detection efficiency is improved; the invention carries out detection in a line segment mode, automatically sets the color value of each point in the line segment by setting the opening value and the tail end value of the line segment, and leads each color value to be distributed in a balanced way, thereby leading the invention to be capable of carrying out global test and local test when carrying out test, obviously optimizing compared with the current test mode, and being convenient and fast.

Description

Image processing test platform
Technical Field
The invention relates to the field of data testing, in particular to an image processing testing platform.
Background
With the development of current information technology, the demand for image processing is also increasing. In image processing, there are various image processing methods, for example: extracting the outline of the pattern in the image to obtain an outline image; a speckle removing technology for removing the speckles in the image to restore the original appearance of the image; image replacement techniques that replace the pattern of selected areas in the image and have a transition to the surrounding image after the replacement, and the like. In order to ensure the excellent effect of image processing, the image processing techniques are tested before or after being marketed, and then further optimized according to the test result.
The above mentioned pattern contour extraction technology is one of the most widely used image processing technologies, and has been subjected to multiple iterations and optimizations. And testing the image processing result during each iteration optimization to obtain the difference between the image processing result and the standard.
At present, in the process of testing, a processed image and a standard image are subjected to perspective comparison to obtain a contour difference between the processed image and the standard image, and a processing effect is evaluated in a perspective analysis mode. When the outlines of the two images are compared, in the process of perspective analysis, a coordinate set of outline points in the processed image and a standard image needs to be obtained respectively, the outline coordinates of the patterns in the two images are compared to obtain the distance between corresponding coordinates, and then the corresponding difference degree is determined.
Disclosure of Invention
The present invention is directed to overcome the above-mentioned problems in the prior art, and to provide an image processing test platform to solve the above-mentioned problems in the background art.
To this end, the present invention provides an image processing test platform, comprising:
the image acquisition module is used for receiving the image processed by the image processing technology as a contrast image and receiving the image with the outlined outline as a standard image;
the image color changing module is used for receiving an image of which the color is to be changed, acquiring coordinates of corresponding pixel points of a pattern contour in the image, sequentially setting color values of the pixel points of each pattern contour, wherein the color values of the pixel points of the pattern contour are different from each other, the color values of adjacent pixel points in the pattern contour are changed in a step mode, the maximum value and the minimum value of the color values of the pixel points in the pattern contour are uniquely determined respectively, the color values of the pixel points except the pattern contour in the image are all set to be zero, and the image of which the color is changed is output;
the image contour coloring module is used for respectively sending the contrast image and the standard image into the image color changing module to obtain a colored contrast image and a colored standard image;
the color dispersion determining module is used for calculating the dispersion degree of the color value of each pixel point of the pattern contour in the colored contrast image as the contrast dispersion degree, and calculating the dispersion degree of the color value of each pixel point of the pattern contour in the colored standard image as the standard dispersion degree;
and the test result output module is used for obtaining the accuracy difference of the image processing technology according to the difference between the contrast dispersion degree and the standard dispersion degree.
Further, the method also comprises the following steps:
a comparison line segment receiving module, configured to receive a line segment intercepted by a user in the standard image as a standard line segment, and receive the line segment intercepted by the user in the comparison image as a comparison line segment;
the line segment position determining module is used for respectively determining the initial pixel points and the tail pixel points of the comparison line segments and the initial pixel points and the tail pixel points of the standard line segments according to the initial positions intercepted and selected by the user;
the extreme value color setting module is used for respectively endowing the initial pixel points of the comparison line segments and the initial pixel points of the standard line segments with the maximum value of the color value of the pixel points in the pattern contour; respectively endowing the tail pixel point of the comparison line segment and the tail pixel point of the standard line segment with the minimum value of the color values of the pixel points in the pattern contour;
and the line segment comparison module is used for sequentially carrying out the image contour coloring module, the color dispersion determining module and the test result output module to obtain the accuracy difference between the comparison line segment and the standard line segment.
Still further, the method further comprises:
the contour line segment splitting module is used for splitting the comparison image and the standard image in the image acquisition module at corresponding positions respectively to obtain a plurality of split line segments, numbering the split line segments in the comparison image in sequence, numbering the line segments in the standard image at corresponding positions in sequence, and numbering the split line segments in the comparison image with the line segments in the standard image at corresponding positions in sequence;
the line segment comparison module in the figure sequentially sends each group of line segments with consistent numbers in the comparison image and the standard image into the comparison line segment receiving module, the line segment position determining module, the extreme value color setting module and the line segment comparison module, and outputs to obtain the accuracy difference between each group of line segments with consistent numbers;
and the line segment screening module is used for screening line segments of groups with accuracy difference larger than a set numerical value, and outputting the line segments in the comparison image and the standard image respectively through highlight effect.
Still further, the method further comprises:
the line segment shortening module is used for correspondingly shortening the line segments of the groups with the accuracy difference exceeding the set numerical value in a set mode;
the line segment classification module takes the shortened line segments in the group as a new line segment and takes the shortened line segments in the group as a new two line segments;
the line segment determining module is used for respectively and sequentially sending the new line segment group and the new line segment group into the comparison line segment receiving module, the line segment position determining module, the extreme value color setting module and the line segment comparison module to obtain the accuracy difference of the new line segment group and the accuracy difference of the new line segment group;
the screening traversal module is used for respectively judging the relation between the accuracy difference of the group of the new line segment and the set value to obtain the group of the new line segment or the group of the new line segment with the accuracy difference larger than the set value, and the line segment shortening module, the line segment classification module, the line segment determining module and the screening traversal module are executed again on the group with the accuracy difference larger than the set value;
and the line segment difference output module is used for outputting a group as an input in the first case when the screening traversal module obtains the set times, and outputting the reorganized line segments in the comparison image and the standard image respectively through a highlight effect, wherein the conditions are that the accuracy difference of a new line segment group and the accuracy difference of a new line segment group are both larger than the set value.
Further, the setting mode is any one of the following two modes:
the method I comprises the following steps: continuously selecting a set pixel point from the upper end in each line segment in the group, removing the selected pixel points, and leaving the remaining pixel points to obtain a new line segment;
the second method comprises the following steps: and respectively dividing each line segment in the group into two equal segments, removing the pixel points of the upper segment, and obtaining the new line segment from the left lower segment.
Furthermore, when the comparison line segment receiving module intercepts the image, the method comprises the following steps:
receiving the line segment intercepted from the standard image to obtain a starting pixel point and a tail pixel point of the intercepted line segment;
positioning a pixel point corresponding to the comparison image according to the coordinate of the initial pixel point of the intercepted line segment in the standard image, and obtaining a pixel point on the outline closest to the pixel point as the initial pixel point of the intercepted line segment in the comparison image;
positioning a pixel point corresponding to the comparison image according to the coordinates of the last pixel point of the intercepted line segment in the standard image, and obtaining a pixel point on the outline closest to the pixel point as the last pixel point of the intercepted line segment in the comparison image;
and outputting the standard line segment and the comparison line segment according to the line segment between the initial pixel point and the tail pixel point of the intercepted line segment in the comparison image.
Furthermore, when the pixel points corresponding to the contrast images are positioned, the positions of the pixels are corresponding in a perspective mode.
Further, still include:
the image separation module is used for sequentially adding the color values of all pixel points of the pattern contour in the comparison image to the set color values to complete the updating of the pattern contour in the comparison image, and the color values of all pixel points of the pattern contour in the updated comparison image are different from the color values of any pixel point of the pattern contour in the standard image;
the blank picture establishing module is used for establishing a blank picture so that the pixel point set of the blank picture is consistent with the pixel point set of the comparison image and the pixel point set of the standard image;
the picture drawing module is used for respectively corresponding the pixel points with the same coordinate to the color value in the updated contrast image and the color value in the standard image, and expressing the pixel points with the same coordinate into a color coordinate form, wherein each color coordinate corresponds to the pixel point coordinate of a blank picture;
the picture color judging module is used for setting the color value of the pixel point of the blank picture corresponding to the color coordinate as the color value when the color coordinate has only one color value which is not 0; when the two color values of the color coordinate are not 0, setting the color value of the pixel point of the blank picture corresponding to the color coordinate as a set color value; when the two color values of the color coordinate are both 0, setting the color value of the pixel point of the blank picture corresponding to the color coordinate to be 0;
and the picture output module traverses each pixel point of the blank picture through the picture color judgment module and outputs a drawn contour difference picture.
Still further, it includes:
the pixel deviation calculation module is used for calculating the distance between two pixel points with the difference value of the color values as the set color value to obtain a pixel distance, and traversing two pixel points with the difference value of each group of color values as the set color value to obtain the total pixel distance;
the pixel deviation dispersion module calculates the dispersion degree of all pixel distances as dispersion difference;
and the accuracy correction module corrects the accuracy difference according to the dispersion difference, updates the accuracy difference and outputs the accuracy difference.
Further, when the accuracy difference is corrected based on the dispersion difference, the correction is performed by
X=ρX′Z
Wherein X is the corrected accuracy difference, X' is the accuracy difference, Z is the dispersion difference, and rho is a constant.
The image processing test platform provided by the invention has the following beneficial effects:
according to the invention, the contour is marked by different colors, the position difference of contour points can be clearly shown directly by different colors, and further the accuracy of contour extraction can be obtained by the difference of color values among line segments, so that the detection mode is simplified, and the detection efficiency is improved;
when the contour detection is carried out, the color values of points on a standard contour are set, the contour detection is carried out in a line segment mode, the color values of all the points in the line segment are automatically set by setting the opening end value and the tail end value of the line segment, so that the color values are distributed in a balanced mode, and further, when the contour detection is carried out, the contour detection can be carried out globally and also can be carried out locally, so that the contour detection is obviously more optimized compared with the current detection mode, and is convenient and fast;
according to the invention, two ends of the line segment are gradually shortened, the shortened line segment is gradually eliminated in a circulating mode, the part inconsistent with the standard is determined in an eliminating mode, different corresponding line segments are further obtained, and the detection result is finally obtained, so that the detection result can be accurately obtained in the local detection process, and the artificial interaction effect is better compared with the original test mode;
when the invention is used for comparison, the comparison image and the standard image are respectively placed on the same picture, so that the step of perspective can be omitted, the workload of operation is further reduced, and the technical effect of reducing the workload of the system is achieved.
Drawings
FIG. 1 is a schematic block diagram of the overall system connection of the present invention;
FIG. 2 is a schematic block diagram of a system connection for comparing line segments as an action object according to the present invention;
FIG. 3 is a schematic block diagram of a system connection for effect analysis using line segment segmentation in accordance with the present invention;
FIG. 4 is a schematic block diagram of a system connection after effect analysis optimization using line segment segmentation in accordance with the present invention;
FIG. 5 is a schematic block diagram of a flow chart of a method for intercepting a line segment from an outline according to the present invention;
FIG. 6 is a schematic block diagram of the system connection of the present invention using the same frame representation for the contrasting contours;
fig. 7 is a schematic block diagram of the system connection for accuracy difference correction according to the present invention.
Detailed Description
An embodiment of the present invention will be described in detail below with reference to the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the embodiment.
In the present application, the type and structure of components that are not specified are all the prior art known to those skilled in the art, and those skilled in the art can set the components according to the needs of the actual situation, and the embodiments of the present application are not specifically limited.
Specifically, as shown in fig. 1 to 7, an embodiment of the present invention provides an image processing test platform, including: the device comprises an image acquisition module, an image color changing module, an image contour coloring module, a color dispersion determining module and a test result output module. The following is a detailed working description of the respective modules and the cooperative relationship therebetween. The invention tests the processing effect of the image processing technology through the following modules, wherein the image processing technology to be tested in the invention is a technology for extracting a pattern contour from an image and is also a pattern contour extraction technology.
The image acquisition module is used for receiving the image processed by the image processing technology as a contrast image and receiving the image with the outlined outline as a standard image; in the invention, a contrast image is obtained by an image processing mode, when the standard image with the outline is drawn, a user can draw the original image before the image processing to obtain the standard image, or the user can correct the standard image according to the contrast image to obtain the standard image, wherein the drawing obtaining mode of the standard image is not specifically limited and comprises various modes for obtaining the image. It should be noted that the visual representation of the contrast image and the standard image is that only the outline pattern thereon is colored, and the rest is a transparent color.
The image color changing module is used for receiving an image of which the color is to be changed, acquiring coordinates of corresponding pixel points of a pattern contour in the image, sequentially setting color values of the pixel points of each pattern contour, wherein the color values of the pixel points of the pattern contour are different from each other, the color values of adjacent pixel points in the pattern contour are changed in a step mode, the maximum value and the minimum value of the color values of the pixel points in the pattern contour are uniquely determined respectively, the color values of the pixel points except the pattern contour in the image are all set to be zero, and the image of which the color is changed is output; the module is used for executing, namely, a given image (namely, an image with color to be changed) is processed, in the invention, the given image can be a comparison image or a standard image, after the image is given, the color value of each pixel point of the outline on the image is re-assigned, the two pixel points represent numerical values and can be represented by using a multi-dimensional array, so that the colors of each pixel point in the outline are different, the difference of the number of the pixel points can be obtained in a subsequent discrete mode, and the number of the pixel points is more when the discrete degree is larger. The color values of adjacent pixels change in a step-wise manner to represent the continuous smoothness property of the change between the colors of the pixels.
The image contour coloring module is used for respectively sending the contrast image and the standard image into the image color changing module to obtain a colored contrast image and a colored standard image; the module is used for changing the color value of the outline pattern in the area of the contrast image and the standard image by using the image color changing module respectively, and finishing updating and replacing the changed images.
The color dispersion determining module is used for calculating the dispersion degree of the color value of each pixel point of the pattern contour in the colored contrast image as the contrast dispersion degree, and calculating the dispersion degree of the color value of each pixel point of the pattern contour in the colored standard image as the standard dispersion degree; the module respectively calculates the discrete degree of the color values of the colored contrast image and the standard image, and further can calculate the difference between the pixels of the outline.
And the test result output module is used for obtaining the accuracy difference of the image processing technology according to the difference between the contrast discrete degree and the standard discrete degree. According to the invention, the accuracy difference of the image processing technology is evaluated through the difference between the corresponding discrete degrees of the two images, so that the accuracy of the image processing technology can be obtained, and the test effect is realized.
It should be noted that, when the contour is extracted, only the pixel points of the contour are continuous, that is, the contour is composed of lines.
Therefore, in the present invention, the comparison of the comparison image after the image processing and the standard image, which is an image in an optimum state desired to be obtained after the image processing, is performed, and the image processing effect of the image processing technique is obtained by comparing the two images.
In addition, the invention uses a mode of counting pixel points, in order to avoid repeated counting of crossed lines or inaccurate counting of the pixel points, a color value mode is introduced to express the pixel points, and a difference relation between outlines on two images is obtained in a concealed mode by calculating the discrete degree of the color value, namely, the composition of the lines is different on the starry sky of the pixels, and compared with a traditional perspective mode or a mode of directly comparing coordinates, the detection efficiency is greatly improved.
The contour is marked by different colors, the position difference of contour points can be clearly shown directly through the different colors, and further the accuracy of contour extraction can be obtained through the difference of color values among line segments, so that the detection mode is simplified, and the detection efficiency is improved.
In the embodiment of the present invention, the above-mentioned manner may be further optimized, and the line segments in the contour are compared, that is, the corresponding line segments in the comparison image and the standard image are compared, so that when the test of image processing is performed, the test range is narrower and more accurate, and therefore, in the present invention, the method further includes: the device comprises a comparison line segment receiving module, a line segment position determining module, an extreme value color setting module and a line segment comparison module. The following is a detailed operational description of the various modules.
A comparison line segment receiving module, configured to receive a line segment intercepted by a user in the standard image as a standard line segment, and receive the line segment intercepted by the user in the comparison image as a comparison line segment; the module is used for intercepting two line segments to be compared, the positions of the two limits are corresponding, and the correspondence refers to the correspondence of the positions, namely the positions of the line segments in the outlines of the comparison image and the standard image. When the determination is performed, the position of the contour in the contrast image may be determined first, and the position of the contour in the corresponding determination standard image may be determined.
The line segment position determining module is used for respectively determining the initial pixel points and the tail pixel points of the comparison line segments and the initial pixel points and the tail pixel points of the standard line segments according to the initial positions intercepted and selected by the user; the module determines the specific positions of the line segments, also receives and determines the specific positions of two line segments to be compared, and determines the part to be compared according to the initial pixel points and the tail pixel points.
The extreme value color setting module is used for respectively endowing the initial pixel points of the comparison line segments and the initial pixel points of the standard line segments with the maximum value of the color value of the pixel points in the pattern contour; and respectively endowing the tail pixel point of the comparison line segment and the tail pixel point of the standard line segment with the minimum value of the color values of the pixels in the pattern contour. The module is used for comparing the two line segments to obtain the colored parts of the two line segments, so that the two subsequent line segments can be conveniently compared.
And the line segment comparison module is used for sequentially carrying out the image contour coloring module, the color dispersion determining module and the test result output module to obtain the accuracy difference between the comparison line segment and the standard line segment. The module is a process for comparing, analyzing and evaluating the difference between two line segments, so as to obtain the difference between the situation of processing the line segment by the image processing technology, namely the situation after processing and the ideal situation, and the image processing technology can be effectively improved according to the difference.
According to the technical scheme, through the combination of the modules, more detailed judgment can be performed on the comparison image and the standard image, and the difference between the corresponding line segments can be obtained through the corresponding difference evaluation between the line segments, so that the difference between the corresponding line segments can be obtained, and therefore, all parts in the outlines of the comparison image and the standard image can be compared respectively, the problems possibly existing in the image processing technology can be known, and the image processing technology can be adjusted conveniently.
Meanwhile, based on the technical scheme, automatic adjustment is carried out, so that the outlines in the whole contrast image and the standard image are segmented, all the segmented line segments are sequentially compared, and finally, more accurate expression in the contrast of the whole outline is obtained, therefore, the method further comprises the following steps: the contour line segment screening device comprises a contour line segment splitting module, a line segment comparison module in the graph and a line segment screening module. The following is a detailed description of the various modules.
The contour line segment splitting module is used for splitting the comparison image and the standard image in the image acquisition module at corresponding positions respectively to obtain a plurality of split line segments, numbering the split line segments in the comparison image in sequence, numbering the line segments in the standard image at corresponding positions in sequence, and numbering the split line segments in the comparison image with the line segments in the standard image at corresponding positions in sequence; the module is used for marking the contour after segmentation, positions and marks of line segments in a comparison image and a standard image correspond to each other, the line segments corresponding to the same positions can be marked during numbering, and the line segments can be marked in a clockwise mode during marking.
The line segment comparison module in the figure sequentially sends each group of line segments with consistent numbers in the comparison image and the standard image into the comparison line segment receiving module, the line segment position determining module, the extreme value color setting module and the line segment comparison module, and outputs to obtain the accuracy difference between each group of line segments with consistent numbers; the module compares each group of line segments with consistent labels and stores the comparison result.
And the line segment screening module is used for screening line segments of groups with accuracy difference larger than a set numerical value, and outputting the line segments in the comparison image and the standard image respectively through highlight effect. The module is used for outputting the line segments with larger differences, and the line segments are represented in a highlight mode, so that the user can quickly obtain the parts with the differences.
Among the above-mentioned technical scheme, obtain each line segment through segmenting holistic profile, segment each line segment respectively, will cut apart the corresponding line segment of back and carry out the comparison, and then make the line segment that will differ greatly show through the mode of highlight for the user clearly quick obtains the part of difference, conveniently in research and development, optimizes and adjusts image processing technique.
Simultaneously, based on above-mentioned technical scheme, still include: the device comprises a line segment shortening module, a line segment classifying module, a line segment determining module, a screening traversing module and a line segment difference output module. The following is a detailed operational description of the various modules.
The line segment shortening module is used for correspondingly shortening the line segments of the groups with the accuracy difference exceeding the set numerical value in a set mode; the module correspondingly shortens the two line segments with larger difference, so that the line segments with larger difference can be compared again to further obtain the range of the difference.
The line segment classification module takes the shortened line segments in the group as a new line segment and takes the shortened line segments in the group as a new two line segments; the module shortens the line segment to obtain two line segments, namely a new line segment and a new line segment.
The line segment determining module is used for respectively and sequentially sending the new line segment group and the new line segment group into the comparison line segment receiving module, the line segment position determining module, the extreme value color setting module and the line segment comparison module to obtain the accuracy difference of the new line segment group and the accuracy difference of the new line segment group; the module is used for evaluating the difference between the new line segment and the new line segment respectively to obtain poor output accuracy.
The screening traversing module is used for respectively judging the relationship between the accuracy difference of the group of the new line segment and the set value to obtain the group of the new line segment or the group of the new line segment with the accuracy difference larger than the set value, and the line segment shortening module, the line segment classifying module, the line segment determining module and the screening traversing module are executed again on the group with the accuracy difference larger than the set value; the module is a traversal process, and the most accurate difference part is obtained and displayed according to the difference between the new first line segment and the new second line segment.
And the line segment difference output module is used for outputting a group as an input in the first case when the screening traversal module obtains the set times, and outputting the reorganized line segments in the comparison image and the standard image respectively through a highlight effect, wherein the conditions are that the accuracy difference of a new line segment group and the accuracy difference of a new line segment group are both larger than the set value. The module judges the condition of the output as a difference according to the result, and when the set times (generally three times) result is different, the line segment is considered to be different, namely, the comparison procedure is saved.
Therefore, the technical scheme of the invention is that the invention gradually shortens two ends of the line segment, gradually eliminates the reduced line segment in a circulating mode, determines the part inconsistent with the standard by using an eliminating mode, further obtains different line segments corresponding to the part, and finally obtains the detection result, thereby realizing the same accurate detection result in local detection and having more artificial interaction effect compared with the original test mode.
Meanwhile, based on the technical scheme, the setting mode is any one of the following two modes:
the first method is as follows: continuously selecting a set pixel point from the upper end of each line segment in the group, removing the selected pixel points, and leaving the remaining pixel points to obtain a new line segment;
the second method comprises the following steps: and respectively dividing each line segment in the group into two equal segments, removing the pixel points of the upper segment in the two equal segments, and obtaining the new line segment from the remaining lower segment.
One of the above is a method of removing a line segment from one end, and the other is a method of dividing a line segment into two segments from the middle. The implementer can divide according to the requirements of the implementer.
Meanwhile, based on the above technical solution, when the comparison line segment receiving module intercepts an image, the method includes the following steps:
receiving the intercepted line segment in the standard image to obtain a starting pixel point and a tail pixel point of the intercepted line segment;
(II) positioning a pixel point corresponding to the comparison image according to the coordinate of the initial pixel point of the intercepted line segment in the standard image, and obtaining a pixel point on the outline nearest to the pixel point as the initial pixel point of the intercepted line segment in the comparison image;
(III) positioning a pixel point corresponding to the comparison image according to the coordinate of the last pixel point of the intercepted line segment in the standard image, and obtaining a pixel point on the outline closest to the pixel point as the last pixel point of the intercepted line segment in the comparison image;
and (IV) intercepting the line segment between the initial pixel point and the tail pixel point of the line segment according to the contrast image, and outputting the standard line segment and the contrast line segment.
According to the technical scheme, the steps (I) to (IV) are sequentially carried out according to a logic sequence, one intercepted line segment is matched with the other corresponding line segment, pixel ranges are set at the compared pixel points, each pixel point corresponds to one pixel range, so that the combination of the pixel ranges can surround the outline, the line segment of the outline in the pixel ranges can be intercepted, and a standard line segment and a comparison line segment can be conveniently obtained. Meanwhile, the characteristic of error is overcome.
Meanwhile, based on the technical scheme, when the pixel points corresponding to the comparison images are positioned, the positions of the pixels are corresponding in a perspective mode. Therefore, the position of the contrast image can be quickly obtained, surrounding or peripheral pixel points can be quickly obtained, the range of the corresponding pixel points of the standard image can be obtained, and therefore quick positioning is carried out.
In addition, from another aspect, the invention can fuse two images into one picture when comparing, so as to provide visual feeling for users. Therefore, in the embodiment of the present invention, the method further includes: the device comprises an image separation module, a blank picture establishing module, a picture drawing module, a picture color judging module and a picture output module.
The image separation module is used for sequentially adding the color values of all pixel points of the pattern contour in the comparison image to the set color values to complete the updating of the pattern contour in the comparison image, and the color values of all pixel points of the pattern contour in the updated comparison image are different from the color values of any pixel point of the pattern contour in the standard image; the module is used for uniformly adjusting the color value of one of the images, so that none of the color values of the two images is the same, and errors obtained by adding numerical values cannot occur in subsequent coincidence.
The blank picture establishing module is used for establishing a blank picture to ensure that the pixel point set of the blank picture is consistent with the pixel point set of the comparison image and the pixel point set of the standard image; the module presets a preliminary process of displaying two images on the same image for the following modules.
The picture drawing module is used for respectively corresponding pixel points with the same coordinate to the color value in the updated comparison image and the color value in the standard image, and expressing the pixel points with the same coordinate into a color coordinate form, wherein each color coordinate corresponds to the pixel point coordinate of a blank picture; the module is a process of combining two images, namely, two color values are added in a color value mode to obtain other corresponding color values, so that the two images can be fused together.
The picture color judging module is used for setting the color value of the pixel point of the blank picture corresponding to the color coordinate as the color value when the color coordinate has only one color value which is not 0; when the two color values of the color coordinate are not 0, setting the color value of the pixel point of the blank picture corresponding to the color coordinate as a set color value; when the two color values of the color coordinate are both 0, setting the color value of the pixel point of the blank picture corresponding to the color coordinate to be 0; through the setting mode of the module, the inconsistent parts are directly displayed, so that the inconsistent parts can be seen more clearly and intuitively.
And the picture output module traverses each pixel point of the blank picture through the picture color judgment module and outputs a drawn contour difference picture. The module outputs the image, so that inconsistent parts can be displayed more intuitively and clearly.
According to the technical scheme, the compared image and the standard image are respectively placed on the same picture during comparison, so that the step of perspective can be omitted, the workload of operation is further reduced, and the technical effect of reducing the workload of a system is achieved.
Simultaneously, based on above-mentioned technical scheme, still include: the device comprises a pixel deviation calculation module, a pixel deviation dispersion module and an accuracy correction module. The following is a detailed description of the various modules.
The pixel deviation calculation module is used for calculating the distance between two pixel points with the color values different from each other as set color values to obtain a pixel distance, and traversing two pixel points with each group of color values different from each other as set color values to obtain the total pixel distance; the module obtains the deviation degree of each point by calculating the pixel distance of each point, and determines two pixel points participating in distance calculation according to the difference value of the color values between the two pixel points.
The pixel deviation dispersion module calculates dispersion degrees of all pixel distances as dispersion difference; the module obtains the dispersion difference according to the obtained pixel distance of each pixel point.
And the accuracy correction module corrects the accuracy difference according to the dispersion difference, updates the accuracy difference and outputs the accuracy difference. The module corrects the dispersion difference for the accuracy difference.
According to the technical scheme, the dispersion difference of the corresponding pixel distance is calculated in a color value mode, and the dispersion difference is corrected by obtaining one dispersion difference, so that the accuracy difference obtained through calculation tends to be more accurate.
Based on the above technical solution, when the accuracy difference is corrected according to the dispersion difference, the accuracy difference is calculated by the following formula:
X=ρX′Z
wherein, X is the corrected precision difference, X' is the precision difference, Z is the dispersion difference, and rho is a constant. The invention fully considers the parallel relation between the dispersion difference and the accuracy difference, thereby using the relation of product to correspondingly amplify and express the two numerical values, and simultaneously introducing the constant rho to harmonize the numerical values, so that the numerical values have readability in range.
The above disclosure is only for a few specific embodiments of the present invention, however, the present invention is not limited to the above embodiments, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.

Claims (10)

1. An image processing test platform, comprising:
the image acquisition module is used for receiving the image processed by the image processing technology as a comparison image and receiving the image with the outlined outline as a standard image;
the image color changing module is used for receiving an image of which the color is to be changed, acquiring coordinates of corresponding pixel points of a pattern contour in the image, sequentially setting color values of the pixel points of each pattern contour, wherein the color values of the pixel points of the pattern contour are different from each other, the color values of adjacent pixel points in the pattern contour are changed in a step mode, the maximum value and the minimum value of the color values of the pixel points in the pattern contour are uniquely determined respectively, the color values of the pixel points except the pattern contour in the image are all set to be zero, and the image of which the color is changed is output;
the image contour coloring module is used for respectively sending the contrast image and the standard image into the image color changing module to obtain a colored contrast image and a colored standard image;
the color dispersion determining module is used for calculating the dispersion degree of the color value of each pixel point of the pattern contour in the colored contrast image as the contrast dispersion degree, and calculating the dispersion degree of the color value of each pixel point of the pattern contour in the colored standard image as the standard dispersion degree;
and the test result output module is used for obtaining the accuracy difference of the image processing technology according to the difference between the contrast dispersion degree and the standard dispersion degree.
2. The image processing test platform of claim 1, further comprising:
a comparison line segment receiving module, configured to receive a line segment intercepted by a user in the standard image as a standard line segment, and receive the line segment intercepted by the user in the comparison image as a comparison line segment;
the segment position determining module is used for respectively determining initial pixel points and tail pixel points of the comparison segment and initial pixel points and tail pixel points of the standard segment according to the initial position intercepted and selected by the user;
the extreme value color setting module is used for respectively endowing the initial pixel points of the comparison line segments and the initial pixel points of the standard line segments with the maximum value of the color value of the pixel points in the pattern contour; respectively endowing the tail pixel point of the comparison line segment and the tail pixel point of the standard line segment with the minimum value of the color values of the pixel points in the pattern contour;
and the line segment comparison module is used for sequentially carrying out the image contour coloring module, the color dispersion determining module and the test result output module to obtain the accuracy difference between the comparison line segment and the standard line segment.
3. The image processing test platform of claim 2, further comprising:
the contour line segment splitting module is used for splitting the comparison image in the image acquisition module and the standard image at corresponding positions respectively to obtain a plurality of split line segments, numbering the split line segments in the comparison image in sequence, and numbering the line segments in the standard image at the corresponding positions in sequence, wherein the number of the split line segments in the comparison image is consistent with that of the line segments in the standard image at the corresponding positions;
the in-graph line segment comparison module is used for sequentially sending each group of line segments with the same serial number in the comparison image and the standard image into the comparison line segment receiving module, the line segment position determining module, the extreme value color setting module and the line segment comparison module, and outputting to obtain the accuracy difference between each group of line segments with the same serial number;
and the line segment screening module is used for screening line segments of groups with accuracy difference larger than a set numerical value, and outputting the line segments in the comparison image and the standard image respectively through highlight effect.
4. The image processing test platform of claim 3, further comprising:
the line segment shortening module is used for correspondingly shortening the line segments of the groups with the accuracy difference exceeding the set numerical value in a set mode;
the line segment classification module takes the shortened line segments in the group as a new line segment and takes the shortened line segments in the group as a new two line segments;
the line segment determining module is used for respectively and sequentially sending the new line segment group and the new line segment group into the comparison line segment receiving module, the line segment position determining module, the extreme value color setting module and the line segment comparison module to obtain the accuracy difference of the new line segment group and the accuracy difference of the new line segment group;
the screening traversal module is used for respectively judging the relation between the accuracy difference of the group of the new line segment and the set value to obtain the group of the new line segment or the group of the new line segment with the accuracy difference larger than the set value, and the line segment shortening module, the line segment classification module, the line segment determining module and the screening traversal module are executed again on the group with the accuracy difference larger than the set value;
and the line segment difference output module is used for outputting a group as an input in the first case when the screening traversal module obtains the set times, and outputting the reorganized line segments in the comparison image and the standard image respectively through a highlight effect, wherein the conditions are that the accuracy difference of a new line segment group and the accuracy difference of a new line segment group are both larger than the set value.
5. The image processing test platform of claim 4, wherein the setting mode is any one of the following two modes:
the first method is as follows: continuously selecting a set pixel point from the upper end of each line segment in the group, removing the selected pixel points, and leaving the remaining pixel points to obtain a new line segment;
the second method comprises the following steps: and respectively dividing each line segment in the group into two equal segments, removing the pixel points of the upper segment, and obtaining the new line segment from the left lower segment.
6. The image processing test platform of claim 2, wherein the contrast line segment receiving module, when capturing the image, comprises the following steps:
receiving the line segment intercepted from the standard image to obtain a starting pixel point and a tail pixel point of the intercepted line segment;
positioning a pixel point corresponding to the comparison image according to the coordinate of the initial pixel point of the intercepted line segment in the standard image, and obtaining a pixel point on the outline closest to the pixel point as the initial pixel point of the intercepted line segment in the comparison image;
positioning a pixel point corresponding to the comparison image according to the coordinates of the last pixel point of the intercepted line segment in the standard image, and obtaining a pixel point on the outline closest to the pixel point as the last pixel point of the intercepted line segment in the comparison image;
and outputting the standard line segment and the comparison line segment according to the line segment between the initial pixel point and the tail pixel point of the intercepted line segment in the comparison image.
7. The image processing test platform of claim 6, wherein the mapping is performed in a perspective manner when locating the pixel points corresponding to the comparison image.
8. The image processing test platform of claim 1, further comprising:
the image separation module is used for sequentially adding the color value of each pixel point of the pattern contour in the comparison image to the set color value to complete the updating of the pattern contour in the comparison image, and the color value of each pixel point of the pattern contour in the updated comparison image is different from the color value of any pixel point of the pattern contour in the standard image;
the blank picture establishing module is used for establishing a blank picture so that the pixel point set of the blank picture is consistent with the pixel point set of the comparison image and the pixel point set of the standard image;
the picture drawing module is used for respectively corresponding the pixel points with the same coordinate to the color value in the updated contrast image and the color value in the standard image, and expressing the pixel points with the same coordinate into a color coordinate form, wherein each color coordinate corresponds to the pixel point coordinate of a blank picture;
the picture color judging module is used for setting the color value of the pixel point of the blank picture corresponding to the color coordinate as the color value when the color coordinate has only one color value which is not 0; when the two color values of the color coordinate are not 0, setting the color value of the pixel point of the blank picture corresponding to the color coordinate as a set color value; when the two color values of the color coordinate are both 0, setting the color value of the pixel point of the blank picture corresponding to the color coordinate to be 0;
and the picture output module traverses each pixel point of the blank picture through the picture color judgment module and outputs a drawn contour difference picture.
9. The image processing test platform of claim 8, further comprising:
the pixel deviation calculation module is used for calculating the distance between two pixel points with the difference value of the color values as the set color value to obtain a pixel distance, and traversing two pixel points with the difference value of each group of color values as the set color value to obtain the total pixel distance;
the pixel deviation dispersion module calculates dispersion degrees of all pixel distances as dispersion difference;
and the accuracy correction module corrects the accuracy difference according to the dispersion difference, updates the accuracy difference and outputs the accuracy difference.
10. The image processing test platform of claim 9, wherein the accuracy difference is corrected according to the dispersion difference by
X=ρX′Z
Wherein X is the corrected accuracy difference, X' is the accuracy difference, Z is the dispersion difference, and rho is a constant.
CN202211191332.3A 2022-09-28 2022-09-28 Image processing test platform Active CN115511835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211191332.3A CN115511835B (en) 2022-09-28 2022-09-28 Image processing test platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211191332.3A CN115511835B (en) 2022-09-28 2022-09-28 Image processing test platform

Publications (2)

Publication Number Publication Date
CN115511835A true CN115511835A (en) 2022-12-23
CN115511835B CN115511835B (en) 2023-07-25

Family

ID=84506735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211191332.3A Active CN115511835B (en) 2022-09-28 2022-09-28 Image processing test platform

Country Status (1)

Country Link
CN (1) CN115511835B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140270489A1 (en) * 2013-03-12 2014-09-18 Microsoft Corporation Learned mid-level representation for contour and object detection
CN105678347A (en) * 2014-11-17 2016-06-15 中兴通讯股份有限公司 Pedestrian detection method and device
CN107194940A (en) * 2017-05-23 2017-09-22 北京计算机技术及应用研究所 A kind of coloured image contour extraction method based on color space and line segment
CN111986254A (en) * 2020-08-21 2020-11-24 四川大学华西医院 Target area contour analysis method and device, storage medium and electronic equipment
CN113034528A (en) * 2021-04-01 2021-06-25 福建自贸试验区厦门片区Manteia数据科技有限公司 Target area and organ-at-risk delineation contour accuracy testing method based on image omics

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140270489A1 (en) * 2013-03-12 2014-09-18 Microsoft Corporation Learned mid-level representation for contour and object detection
CN105678347A (en) * 2014-11-17 2016-06-15 中兴通讯股份有限公司 Pedestrian detection method and device
CN107194940A (en) * 2017-05-23 2017-09-22 北京计算机技术及应用研究所 A kind of coloured image contour extraction method based on color space and line segment
CN111986254A (en) * 2020-08-21 2020-11-24 四川大学华西医院 Target area contour analysis method and device, storage medium and electronic equipment
CN113034528A (en) * 2021-04-01 2021-06-25 福建自贸试验区厦门片区Manteia数据科技有限公司 Target area and organ-at-risk delineation contour accuracy testing method based on image omics

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
展益彬;林大钧;安琦;: "图像处理中曲线矢量化的最优化算法", 东华大学学报(自然科学版), no. 03 *

Also Published As

Publication number Publication date
CN115511835B (en) 2023-07-25

Similar Documents

Publication Publication Date Title
CN112115895B (en) Pointer type instrument reading identification method, pointer type instrument reading identification device, computer equipment and storage medium
CN109948522B (en) X-ray hand bone maturity interpretation method based on deep neural network
CN110677639B (en) Non-reference video quality evaluation method based on feature fusion and recurrent neural network
CN103093456B (en) Corn ear character index computing method based on images
CN109520706B (en) Screw hole coordinate extraction method of automobile fuse box
CN108510477B (en) Method and device for positioning color block of test paper
CN111179362B (en) Test paper color uniformity detection method based on dynamic illumination correction algorithm
CN113870267B (en) Defect detection method, defect detection device, computer equipment and readable storage medium
CN114241326B (en) Progressive intelligent production method and system for ground feature elements of remote sensing images
CN111862254A (en) Cross-rendering platform based material rendering method and system
CN112990179A (en) Single-pointer type dial reading automatic identification method based on picture processing
CN105989588A (en) Irregular-shaped material cutting image correction method and system
CN113158272A (en) Automatic printing method and system for personalized clothing customization
CN111277809A (en) Image color correction method, system, device and medium
CN109410241A (en) The metamorphic testing method of image-region growth algorithm
CN113888472A (en) Detection method and equipment for consumer electronics defects
CN113205511B (en) Electronic component batch information detection method and system based on deep neural network
CN115511835A (en) Image processing test platform
CN111986266A (en) Photometric stereo light source parameter calibration method
CN105427315B (en) Digital instrument image position testing method and device
CN114882095B (en) Object height online measurement method based on contour matching
CN107657262A (en) A kind of computer automatic sorting Accuracy Assessment
CN101409770B (en) Method and apparatus for determining two-dimension Lab color range map contour
CN113486904B (en) Feature self-adaptive laser scanning projection graph control point extraction and optimization method
CN113223098B (en) Preprocessing optimization method for image color classification

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