CN112529927A - Self-adaptive contour extraction system and method based on FPGA morphological operator - Google Patents

Self-adaptive contour extraction system and method based on FPGA morphological operator Download PDF

Info

Publication number
CN112529927A
CN112529927A CN202011458861.6A CN202011458861A CN112529927A CN 112529927 A CN112529927 A CN 112529927A CN 202011458861 A CN202011458861 A CN 202011458861A CN 112529927 A CN112529927 A CN 112529927A
Authority
CN
China
Prior art keywords
brightness component
pixel
value
brightness
search structure
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.)
Pending
Application number
CN202011458861.6A
Other languages
Chinese (zh)
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.)
Xidian University
Original Assignee
Xidian 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 Xidian University filed Critical Xidian University
Priority to CN202011458861.6A priority Critical patent/CN112529927A/en
Publication of CN112529927A publication Critical patent/CN112529927A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/181Segmentation; Edge detection involving edge growing; involving edge linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • 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/10Image acquisition modality
    • G06T2207/10024Color image

Landscapes

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

Abstract

The invention discloses a self-adaptive color image contour extraction system and method based on FPGA morphological operators. The invention uses a control module to extract the brightness component of the color image to be processed; the search structure module fills the brightness component into the constructed search structure; the self-adaptive optimization module carries out self-adaptive optimization on elements in the search structure; the expansion and corrosion operator generating module generates expansion and corrosion operators by means of the optimized search structure; the contour information generation module generates contour data of the image by means of expansion and corrosion operators. The method can be used for realizing the contour extraction of the color image on the FPGA and has the advantages of high image processing speed and good detail processing effect.

Description

Self-adaptive contour extraction system and method based on FPGA morphological operator
Technical Field
The invention belongs to the technical field of image processing, and further relates to a color image contour extraction system and method based on a Field Programmable Gate Array (FPGA) (field Programmable Gate array) adaptive morphological operator in the technical field of color image processing. The invention can carry out noise suppression, image segmentation, edge detection, feature extraction and other processing on the color images obtained in the fields of remote sensing, military, industry, medicine and the like.
Background
With the continuous development of information technology, digital images have become an important means for human beings to acquire information, and are widely applied to the fields of communication, military, medicine and the like. The method has the advantages that the method can obtain good effect by processing the digital image by using mathematical morphology, and can effectively solve the problems of noise suppression, image segmentation, edge detection, feature extraction and the like in the field of digital image processing. The FPGA adopts a parallel computing mode, and can achieve a fast processing speed for the operation with fixed rules, so that the combination of researching the FPGA and the mathematical morphology can be well applied to digital image processing.
The Shandong Rich worker university provides an image hybrid filtering device and method based on comprehensive morphology in the owned patent technology of image hybrid filtering device and method based on comprehensive morphology (application date: 2016, 05 and 10, application number: 201610305134.3, publication number: 106023095B). The device comprises a basic model building module, a constraint condition building module, a mixed model building module and a noise image processing module. The basic model building module is used for building a basic morphological filtering model, wherein the basic morphological filtering model comprises an open filtering calculation model and a closed filtering calculation model of basic morphological filtering, a cascade morphological filtering calculation model built according to the open filtering calculation model and the closed filtering calculation model, and a generalized morphological filtering calculation model built according to the cascade morphological filtering calculation model. And the constraint condition construction module is used for constructing constraint conditions of the filtering calculation model, and the constraint conditions comprise the number of structural elements and weight constraint conditions. And the mixed model building module is used for building a comprehensive morphological mixed filtering calculation model for the graph filtering according to the built basic morphological filtering model and the constraint conditions. And the noise image processing module is used for performing filtering processing on the input noise image to be processed by using the constructed hybrid filtering calculation model. The system has the following disadvantages: the filtering model constructed by adopting the basic morphology in the basic model construction module has low processing precision, which causes that the comprehensive morphology mixed filtering calculation model constructed by mixing the basic morphology with the constraint conditions in the mixed model construction module has low calculation efficiency and low processing precision. The method comprises the following implementation processes: step 1, constructing a basic morphological filtering model; step 2, constructing constraint conditions of a filtering calculation model, wherein the constraint conditions comprise the number of structural elements and weight constraint conditions; and 3, constructing a comprehensive morphological mixed filtering calculation model for the image filtering. Filtering the input noise image to be processed; step 4, filtering the input noise image to be processed by using the constructed hybrid filtering calculation model; the method has the following defects: in a basic morphological filtering model, filtering is performed by using a fixed structural element, which may cause problems of low flexibility, low robustness, general processing precision, and the like in image processing, and has a certain influence on a final processing result.
An adaptive threshold color image edge detection method based on FPGA and Kirsch is proposed in patent document 'FPGA and Kirsch-based adaptive threshold color image edge detection method' applied by southern China university (application date: 2017, 4, 24, application number: 201710269426.0, publication number: 107169977A). The method comprises the following implementation processes: step 1, collecting a color image to be detected to obtain image data in a YUV format, converting the image data into YCbCr, and extracting a brightness component Y for subsequent processing; step 2, denoising the brightness component Y in the image by adopting Gaussian filtering and median filtering; step 3, performing edge detection on the image subjected to denoising processing, and calculating a gradient value and an improved adaptive threshold value; comparing the gradient value with the improved adaptive threshold value to realize edge extraction and image binarization, if the gradient value is greater than the improved adaptive threshold value, judging that the current pixel point is an edge point, and taking the value as 1, otherwise, taking the value as 0; step 4, performing morphological processing on the edge image to obtain a component Y' subjected to morphological processing; and 5, synthesizing the color components Cb and Cr which are not processed in the step 1 with the component Y 'in the step 4 into Y' Cb 'Cr' after time delay operation, and then synthesizing RGB888 format data by using a YCbCr to RGB888 algorithm. The method has the following defects: when the Y component is obtained, binary morphology is used for processing, and for a color image, the use of binary morphology results in low precision and general robustness.
Disclosure of Invention
The invention aims to provide a color image contour extraction system and method based on an FPGA (field programmable gate array) adaptive morphological operator, aiming at the defects of the prior art, which are used for rapidly, efficiently and flexibly acquiring a contour image of a color image and effectively solving the problems of low processing speed, low efficiency, insufficient real-time performance and low robustness of technologies such as noise suppression, image segmentation, edge detection, feature extraction and the like in the field of digital image processing.
The idea for realizing the purpose of the invention is as follows: the method has the advantages that the method can effectively improve the speed and efficiency of image segmentation in the digital image processing field by using the FPGA (field programmable gate array), adopts a self-adaptive method to optimize the brightness component, can generate corresponding morphological operators according to the values of elements in different transformation processing structures of an input image, and makes up the problems of low robustness and low flexibility in the technologies of edge detection, characteristic extraction and the like in the digital image processing field.
The system comprises a control module, a search structure generation module, a self-adaptive optimization module, an expansion operator generation module, a corrosion operator generation module and a contour extraction module, wherein:
the control module is used for converting the color image to be processed into an image in a YCbCr format by a color space conversion method and extracting a brightness component Y in the image;
the search structure generation module is used for caching two lines of data of the brightness component Y through a shift register in the FPGA, meanwhile, forming a 3-line array with one line of currently input data, and delaying each line of data in the array by using a D trigger to obtain a 3 multiplied by 3 pixel search structure;
the adaptive optimization module is used for carrying out absolute value operation on the difference between the brightness component of each element in the pixel search structure and the brightness component of the central position element of the pixel search structure to obtain the distance between the brightness component of the element in the pixel search structure and the brightness component of the central position element of the pixel search structure, and replacing the brightness components of all elements with the brightness component value of the central position element of the pixel search structure, wherein the distance is greater than 30, so as to obtain the brightness components of all elements in the pixel search structure after adaptive transformation;
the expansion operator generating module is used for inputting the brightness components of all elements in the pixel searching structure after the self-adaptive transformation into the tree-shaped pipeline comparator, obtaining the maximum value in the brightness components of all elements in the pixel searching structure after the self-adaptive transformation by adopting an iterative comparison method, replacing the brightness component of the central position element of the pixel searching structure with the maximum value, and taking the brightness component value of the central position element of the pixel searching structure after the replacement as an expansion operator;
the corrosion operator generating module is used for inputting the brightness components of all elements in the pixel searching structure after the self-adaptive transformation into the tree-shaped pipeline comparator, obtaining the minimum value in the brightness components of all elements in the pixel searching structure after the self-adaptive transformation by adopting an iterative comparison method, replacing the brightness component of the central position element of the pixel searching structure with the minimum value, and taking the brightness component value of the central position element of the pixel searching structure after the replacement as corrosion calculation;
the contour information generation module is used for subtracting the corrosion operator from the expansion operator to obtain a gradient value of the pixel search structure central position element brightness component after self-adaptive transformation, then combining the blue chromaticity component and the red chromaticity component in the image converted into the YCbCr format with the gradient value of the pixel search structure central position element brightness component after time delay operation to obtain a combined YCbCr value, and synthesizing the combined YCbCr value into RGB888 format data by utilizing a YCbCr to RGB888 algorithm.
The method comprises the following steps:
(1) extracting the brightness component of the color image to be processed:
the control module converts the color image to be processed into an image in a YCbCr format by adopting a color space conversion method, and extracts a brightness component Y in the image;
(2) generating a pixel search structure:
the search structure generation module caches two lines of data of the brightness component Y through a shift register in the FPGA, and simultaneously forms a 3-line array with one line of currently input data, and each line of data in the array is delayed by a D trigger to obtain a 3 multiplied by 3 pixel search structure;
(3) the luminance component is optimized by an adaptive method:
(3a) the self-adaptive optimization module performs absolute value operation on the difference between the brightness component of each element in the pixel search structure and the brightness component of the central position element of the pixel search structure to obtain the distance between the brightness component of the element in the pixel search structure and the brightness component of the central position element of the pixel search structure;
(3b) the adaptive optimization module replaces the brightness components of all elements with the distance larger than 30 by the brightness component value of the element at the central position of the pixel search structure to obtain the brightness components of all elements in the pixel search structure after adaptive transformation;
(4) generating an expansion operator:
the expansion operator generation module inputs the brightness components of all elements in the pixel search structure after the self-adaptive transformation into a tree-shaped pipeline comparator, obtains the maximum value in the brightness components of all elements in the pixel search structure after the self-adaptive transformation by adopting an iterative comparison method, replaces the brightness component of the central position element of the pixel search structure by the maximum value, and takes the brightness component value of the central position element of the pixel search structure after the replacement as an expansion operator;
(5) generating a corrosion operator:
the corrosion operator generation module inputs the brightness components of all elements in the pixel search structure after the self-adaptive transformation into a tree-shaped pipeline comparator, obtains the minimum value in the brightness components of all elements in the pixel search structure after the self-adaptive transformation by adopting an iterative comparison method, replaces the brightness component of the central position element of the pixel search structure by the minimum value, and takes the brightness component value of the central position element of the pixel search structure after the replacement as a corrosion operator;
(6) obtaining the gradient value of the brightness component of the central position element:
the contour information generation module subtracts the corrosion operator from the expansion operator to obtain the gradient value of the brightness component of the pixel search structure central position element after self-adaptive transformation;
(7) generating contour data:
the contour information generation module combines the blue chrominance component and the red chrominance component in the image converted into the YCbCr format with the gradient value of the element luminance component at the central position of the pixel search structure after time delay operation to obtain a combined YCbCr value, and the combined YCbCr value is combined into RGB888 format data by utilizing a YCbCr to RGB888 algorithm.
Compared with the prior art, the invention has the following advantages:
first, due to the adaptive optimization module in the system of the present invention, the search structure can be continuously optimized according to the difference of the input images, before the morphological operator is constructed, according to the distances between the brightness components of all elements in the pixel search structure and the brightness component of the element at the central position of the pixel search structure, replacing the brightness components of all elements with the brightness component value of the element at the central position of the pixel search structure, wherein the distances meet the condition, the searching structure during the morphological filtering can adjust itself, overcomes the defect of poor contour extraction effect caused by the fact that the basic morphological filtering model can not adjust according to the characteristics of the image when the prior art carries out contour extraction on the color image, the system of the invention can realize the contour extraction of the color image, so that the robustness and the flexibility of the contour extraction effect are higher, and the system better conforms to the visual characteristics of human eyes.
Secondly, because the method of the invention adopts the self-adaptive optimization to search the structural brightness component, and further carries out the expansion and corrosion operation on the brightness component of the central element of the search structure, the problem that the local characteristic information such as the original image detail is seriously lost when the fixed structural element is used for carrying out the contour extraction on the color image in the prior art is overcome, so that the method of the invention can better keep the local characteristic information of the original image when carrying out the contour extraction on the color image, and the obtained image contour detail is finer and more real.
Thirdly, because the method of the invention realizes the outline extraction of the color image on the field programmable gate array FPGA, when the FPGA realizes the outline extraction, the called physical storage operation unit is less and the energy consumption is lower compared with the computer software to realize the outline extraction, and the invention overcomes the defect that the speed of only realizing the outline extraction of the color image on the software in the prior art is lower, so that the method of the invention has the advantages of high speed and high efficiency of the outline extraction of the color image.
Drawings
FIG. 1 is a schematic diagram of the system of the present invention;
FIG. 2 is a flow chart of the method of the present invention;
FIG. 3 is a graph of the results of a simulation experiment of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
The system architecture of the present invention is further described with reference to fig. 1.
The system comprises a control module, a search structure generation module, a self-adaptive optimization module, an expansion operator generation module, a corrosion operator generation module and a contour extraction module.
The control module is used for converting the color image to be processed into an image in a YCbCr format by a color space conversion method and extracting a brightness component Y in the image.
The search structure generation module is used for caching two lines of data of the brightness component Y through a shift register in the FPGA, meanwhile, the brightness component Y and one line of currently input data form a 3-line array, and each line of data in the array is delayed by a D trigger to obtain a 3 multiplied by 3 pixel search structure.
The adaptive optimization module is used for carrying out absolute value operation on the difference between the brightness component of each element in the pixel search structure and the brightness component of the central position element of the pixel search structure to obtain the distance between the brightness component of the element in the pixel search structure and the brightness component of the central position element of the pixel search structure, and replacing the brightness components of all elements with the brightness component value of the central position element of the pixel search structure, wherein the distance is greater than 30, so as to obtain the brightness components of all elements in the pixel search structure after adaptive transformation.
The expansion operator generating module is used for inputting the brightness components of all elements in the pixel searching structure after the self-adaptive transformation into the tree-shaped pipeline comparator, obtaining the maximum value in the brightness components of all elements in the pixel searching structure after the self-adaptive transformation by adopting an iterative comparison method, replacing the brightness component of the central position element of the pixel searching structure with the maximum value, and taking the brightness component value of the central position element of the pixel searching structure after the replacement as an expansion operator.
And the corrosion operator generating module is used for inputting the brightness components of all elements in the pixel searching structure after the self-adaptive transformation into the tree-shaped pipeline comparator, obtaining the minimum value in the brightness components of all elements in the pixel searching structure after the self-adaptive transformation by adopting an iterative comparison method, replacing the brightness component of the central position element of the pixel searching structure with the minimum value, and taking the brightness component value of the central position element of the pixel searching structure after the replacement as corrosion calculation.
The contour information generation module is used for subtracting the corrosion operator from the expansion operator to obtain a gradient value of the pixel search structure central position element brightness component after self-adaptive transformation, then combining the blue chromaticity component and the red chromaticity component in the image converted into the YCbCr format with the gradient value of the pixel search structure central position element brightness component after time delay operation to obtain a combined YCbCr value, and synthesizing the combined YCbCr value into RGB888 format data by utilizing a YCbCr to RGB888 algorithm.
The specific steps of the method of the present invention are further described with reference to fig. 2.
Step 1, extracting the brightness component of the color image to be processed.
The control module converts the color image to be processed into an image in a YCbCr format by adopting a color space conversion method, and extracts a brightness component Y in the image.
And 2, generating a pixel search structure.
The search structure generation module caches two lines of data of the brightness component Y through a shift register in the FPGA, and simultaneously forms a 3-line array with one line of currently input data, and each line of data in the array is delayed by a D trigger to obtain a 3 multiplied by 3 pixel search structure.
And 3, optimizing the brightness component by adopting a self-adaptive method.
And the self-adaptive optimization module performs an absolute value operation on the difference between the brightness component of each element in the pixel search structure and the brightness component of the central position element of the pixel search structure to obtain the distance between the brightness component of the element in the pixel search structure and the brightness component of the central position element of the pixel search structure.
And the self-adaptive optimization module replaces the brightness components of all elements with the distance larger than 30 by the brightness component value of the element at the central position of the pixel search structure to obtain the brightness components of all elements in the pixel search structure after self-adaptive transformation.
And 4, generating an expansion operator.
The expansion operator generation module inputs the brightness components of all elements in the pixel search structure after the self-adaptive transformation into the tree-shaped pipeline comparator, obtains the maximum value in the brightness components of all elements in the pixel search structure after the self-adaptive transformation by adopting an iterative comparison method, replaces the brightness component of the central position element of the pixel search structure by the maximum value, and takes the brightness component value of the central position element of the pixel search structure after the replacement as an expansion operator.
The tree-shaped pipeline comparator is composed of 4 layers, the structure of the tree-shaped pipeline comparator is that the 1 st layer is provided with four comparators connected in parallel, the 2 nd layer is provided with two comparators connected in parallel, the 3 rd layer is provided with one comparator, the 4 th layer is provided with one comparator, and 1 register is connected behind each comparator.
The steps of the iterative comparison method are as follows.
And step 1, sequentially and adjacently combining brightness component values of 8 pixels except the brightness component value of the central pixel in the search template into a group, dividing the group into 4 groups, inputting the groups into four comparators at the 1 st layer of the tree-shaped pipeline comparator, and outputting the maximum value in each group, wherein the maximum value is 4.
And 2, dividing the 4 maximum values into 2 groups in pairs according to the output sequence, inputting the 2 groups into two comparators at the 2 nd layer of the tree-shaped pipeline comparator, and outputting the maximum values in each group for 2.
And step 3, inputting the 2 maximum values into a comparator at the 3 rd layer of the tree-shaped pipeline comparator, and obtaining the maximum value of the brightness component values of 8 pixels except the brightness component value of the central pixel in the search template through comparison.
And 4, inputting the maximum value of the brightness component values of 8 pixels except the brightness component value of the central pixel in the search template and the brightness component value of the central pixel in the search template into 1 comparator in the 4 th layer in a group in pairs to obtain the maximum values of all the brightness component values in the search template.
And 5, generating a corrosion operator.
And the corrosion operator generation module inputs the brightness components of all elements in the pixel search structure after the self-adaptive transformation into the tree-shaped pipeline comparator, obtains the minimum value in the brightness components of all elements in the pixel search structure after the self-adaptive transformation by adopting an iterative comparison method, replaces the brightness component of the central position element of the pixel search structure by the minimum value, and takes the brightness component value of the central position element of the pixel search structure after the replacement as a corrosion operator.
The tree-shaped pipeline comparator is composed of four layers, the structure of the tree-shaped pipeline comparator is that the 1 st layer is provided with four comparators connected in parallel, the 2 nd layer is provided with two comparators connected in parallel, the 3 rd layer is provided with one comparator, the 4 th layer is provided with one comparator, and 1 register is connected behind each comparator.
The steps of the iterative comparison method are as follows.
And step 1, sequentially and adjacently combining brightness component values of 8 pixels except the brightness component value of the central pixel in the search template into a group, dividing the group into 4 groups, inputting the groups into four comparators at the 1 st layer of the tree-shaped pipeline comparator, and outputting the minimum values in each group for 4 groups.
And 2, dividing the 4 minimum values into 2 groups in pairs according to the output sequence, inputting the 2 groups of the 4 minimum values into two comparators at the 2 nd layer of the tree-shaped pipeline comparator, and outputting the minimum values in each group for 2.
And step 3, inputting the 2 minimum values into a comparator at the 3 rd layer of the tree-shaped pipeline comparator, and obtaining the minimum value of the brightness component values of 8 pixels except the brightness component value of the central pixel in the search template through comparison.
And 4, inputting the minimum value of the brightness component values of 8 pixels except the brightness component value of the central pixel in the search template and the brightness component value of the central pixel in the search template into 1 comparator of the 4 th layer in a group in pairs to obtain the minimum value of all the brightness component values in the search template.
And 6, obtaining the gradient value of the brightness component of the element at the central position.
And the contour information generation module subtracts the erosion operator from the expansion operator to obtain the gradient value of the brightness component of the pixel search structure central position element after self-adaptive transformation.
And 7, generating contour data.
The contour information generation module combines the blue chrominance component and the red chrominance component in the image converted into the YCbCr format with the gradient value of the element luminance component at the central position of the pixel search structure after time delay operation to obtain a combined YCbCr value, and the combined YCbCr value is combined into RGB888 format data by utilizing a YCbCr to RGB888 algorithm.
The effect of the present invention will be further described with reference to simulation experiments.
1. Simulation conditions are as follows:
the simulation experiment of the invention is realized by programming in MATLAB R2018a software and ModelSim SE-6410.5 software. The input image used in the simulation experiment of the present invention is a color image with a size of 512 × 512 pixels and a format of JPEG.
2. Simulation content and result analysis:
the simulation experiment 1 of the present invention respectively adopts the method of the present invention and the color image contour extraction method based on the Sobel operator commonly used in the prior art to respectively extract the contour of the color image with the input image size of 512 × 512. A time comparison table for the method of the invention listed in table 1 and the prior art method for obtaining the contour of a color image was obtained.
TABLE 1 time comparison Table (unit: ms) for obtaining the contour of a color image
Sobel operator-based method time consumption 400
The method of the invention is time consuming 50
As can be seen from table 1, compared with the color image contour extraction method based on Sobel operator, the color image contour extraction method based on the field programmable gate array FPGA adaptive morphology operator provided by the present invention has the advantage that the time for extracting the contour of one color image is significantly reduced.
The simulation experiment 2 of the present invention respectively adopts the contour extraction method based on the adaptive morphological operator of the present invention and the contour extraction method based on the fixed structural element commonly used in the prior art to respectively perform contour extraction on the input 512 × 512 color image, and obtain a processed result image, as shown in fig. 3.
FIG. 3 is a graph showing the results of simulation experiment 2 of the present invention. Fig. 3(a) shows an original image of a 512 × 512 color image input, and fig. 3(b) shows a result of extracting an outline of the 512 × 512 color image input by the conventional technique. Fig. 3(c) is a diagram showing the result of contour extraction of an input 512 × 512 color image by the method of the present invention.
Compared with the prior art and the method of the invention, the image 3(b) and the image 3(c) after the contour extraction is respectively carried out on the input 512X 512 color image can be seen, the image obtained by the method of the invention is clearer, the detail processing is better, the image is brighter, and the local characteristic information of the image is better kept.

Claims (4)

1. The utility model provides a self-adaptation contour extraction system based on FPGA morphological operator, includes control module, search structure generation module, self-adaptation optimization module, inflation operator generation module, corrodes operator generation module, contour extraction module, wherein:
the control module is used for converting the color image to be processed into an image in a YCbCr format by a color space conversion method and extracting a brightness component Y in the image;
the search structure generation module is used for caching two lines of data of the brightness component Y through a shift register in the FPGA, meanwhile, forming a 3-line array with one line of currently input data, and delaying each line of data in the array by using a D trigger to obtain a 3 multiplied by 3 pixel search structure;
the adaptive optimization module is used for carrying out absolute value operation on the difference between the brightness component of each element in the pixel search structure and the brightness component of the central position element of the pixel search structure to obtain the distance between the brightness component of the element in the pixel search structure and the brightness component of the central position element of the pixel search structure, and replacing the brightness components of all elements with the brightness component value of the central position element of the pixel search structure, wherein the distance is greater than 30, so as to obtain the brightness components of all elements in the pixel search structure after adaptive transformation;
the expansion operator generating module is used for inputting the brightness components of all elements in the pixel searching structure after the self-adaptive transformation into the tree-shaped pipeline comparator, obtaining the maximum value in the brightness components of all elements in the pixel searching structure after the self-adaptive transformation by adopting an iterative comparison method, replacing the brightness component of the central position element of the pixel searching structure with the maximum value, and taking the brightness component value of the central position element of the pixel searching structure after the replacement as an expansion operator;
the corrosion operator generating module is used for inputting the brightness components of all elements in the pixel searching structure after the self-adaptive transformation into the tree-shaped pipeline comparator, obtaining the minimum value in the brightness components of all elements in the pixel searching structure after the self-adaptive transformation by adopting an iterative comparison method, replacing the brightness component of the central position element of the pixel searching structure with the minimum value, and taking the brightness component value of the central position element of the pixel searching structure after the replacement as corrosion calculation;
the contour information generation module is used for subtracting the corrosion operator from the expansion operator to obtain a gradient value of the pixel search structure central position element brightness component after self-adaptive transformation, then combining the blue chromaticity component and the red chromaticity component in the image converted into the YCbCr format with the gradient value of the pixel search structure central position element brightness component after time delay operation to obtain a combined YCbCr value, and synthesizing the combined YCbCr value into RGB888 format data by utilizing a YCbCr to RGB888 algorithm.
2. The adaptive contour extraction method based on the FPGA morphological operator as claimed in claim 1 is characterized in that a luminance component is optimized by adopting an adaptive method, and an expansion operator and a corrosion operator are generated for calculation to obtain contour information of an image; the method comprises the following steps:
(1) extracting the brightness component of the color image to be processed:
the control module converts the color image to be processed into an image in a YCbCr format by adopting a color space conversion method, and extracts a brightness component Y in the image;
(2) generating a pixel search structure:
the search structure generation module caches two lines of data of the brightness component Y through a shift register in the FPGA, and simultaneously forms a 3-line array with one line of currently input data, and each line of data in the array is delayed by a D trigger to obtain a 3 multiplied by 3 pixel search structure;
(3) the luminance component is optimized by an adaptive method:
(3a) the self-adaptive optimization module performs absolute value operation on the difference between the brightness component of each element in the pixel search structure and the brightness component of the central position element of the pixel search structure to obtain the distance between the brightness component of the element in the pixel search structure and the brightness component of the central position element of the pixel search structure;
(3b) the adaptive optimization module replaces the brightness components of all elements with the distance larger than 30 by the brightness component value of the element at the central position of the pixel search structure to obtain the brightness components of all elements in the pixel search structure after adaptive transformation;
(4) generating an expansion operator:
the expansion operator generation module inputs the brightness components of all elements in the pixel search structure after the self-adaptive transformation into a tree-shaped pipeline comparator, obtains the maximum value in the brightness components of all elements in the pixel search structure after the self-adaptive transformation by adopting an iterative comparison method, replaces the brightness component of the central position element of the pixel search structure by the maximum value, and takes the brightness component value of the central position element of the pixel search structure after the replacement as an expansion operator;
(5) generating a corrosion operator:
the corrosion operator generation module inputs the brightness components of all elements in the pixel search structure after the self-adaptive transformation into a tree-shaped pipeline comparator, obtains the minimum value in the brightness components of all elements in the pixel search structure after the self-adaptive transformation by adopting an iterative comparison method, replaces the brightness component of the central position element of the pixel search structure by the minimum value, and takes the brightness component value of the central position element of the pixel search structure after the replacement as a corrosion operator;
(6) obtaining the gradient value of the brightness component of the central position element:
the contour information generation module subtracts the corrosion operator from the expansion operator to obtain the gradient value of the brightness component of the pixel search structure central position element after self-adaptive transformation;
(7) generating contour data:
the contour information generation module combines the blue chrominance component and the red chrominance component in the image converted into the YCbCr format with the gradient value of the element luminance component at the central position of the pixel search structure after time delay operation to obtain a combined YCbCr value, and the combined YCbCr value is combined into RGB888 format data by utilizing a YCbCr to RGB888 algorithm.
3. The self-adaptive contour extraction method based on the FPGA morphological operator according to claim 2, wherein the tree-shaped pipeline comparator in the step (4) and the step (5) is composed of 4 layers, and the structure thereof is that four comparators connected in parallel are arranged on the 1 st layer, two comparators connected in parallel are arranged on the 2 nd layer, one comparator is arranged on the 3 rd layer, one comparator is arranged on the 4 th layer, and 1 register is connected behind each comparator.
4. The adaptive contour extraction method based on the FPGA morphological operator as recited in claim 2, wherein the iterative comparison method in the steps (4) and (5) comprises the following steps:
firstly, the brightness component values of 8 pixels except the brightness component value of the central pixel in the search template are adjacent in sequence to form a group, the group is divided into 4 groups and then input into four comparators at the 1 st layer of the tree-shaped pipeline comparator, and the maximum value or the minimum value in each group is output for 4;
secondly, dividing the 4 maximum values or minimum values into 2 groups in pairs according to the output sequence, inputting the 2 groups into two comparators at the 2 nd layer of the tree-shaped pipeline comparator, and outputting the maximum values or minimum values in each group for 2;
thirdly, inputting the 2 maximum values or the 2 minimum values into a comparator at the 3 rd layer of the tree-shaped pipeline comparator, and obtaining the maximum value or the minimum value of the brightness component values of 8 pixels except the brightness component value of the central pixel in the search template through comparison;
and fourthly, inputting the maximum value or the minimum value of the brightness component values of 8 pixels except the brightness component value of the central pixel in the search template and the brightness component value of the central pixel in the search template into 1 group of comparators on the 4 th layer in pairs to obtain the maximum value or the minimum value of all the brightness component values in the search template.
CN202011458861.6A 2020-12-11 2020-12-11 Self-adaptive contour extraction system and method based on FPGA morphological operator Pending CN112529927A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011458861.6A CN112529927A (en) 2020-12-11 2020-12-11 Self-adaptive contour extraction system and method based on FPGA morphological operator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011458861.6A CN112529927A (en) 2020-12-11 2020-12-11 Self-adaptive contour extraction system and method based on FPGA morphological operator

Publications (1)

Publication Number Publication Date
CN112529927A true CN112529927A (en) 2021-03-19

Family

ID=74999117

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011458861.6A Pending CN112529927A (en) 2020-12-11 2020-12-11 Self-adaptive contour extraction system and method based on FPGA morphological operator

Country Status (1)

Country Link
CN (1) CN112529927A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040179737A1 (en) * 2003-03-14 2004-09-16 Skourikhine Alexei N. Method for contour extraction for object representation
CN105160661A (en) * 2015-08-19 2015-12-16 西安电子科技大学 Color image edge extraction method based on center pixel similarity weights
JP2017111129A (en) * 2015-12-11 2017-06-22 国立大学法人旭川医科大学 Contour extraction device, contour extraction method and program
CN107169977A (en) * 2017-04-24 2017-09-15 华南理工大学 Adaptive threshold color image edge detection method based on FPGA and Kirsch
WO2019015477A1 (en) * 2017-07-18 2019-01-24 Oppo广东移动通信有限公司 Image correction method, computer readable storage medium and computer device
CN109671042A (en) * 2018-12-19 2019-04-23 西安电子科技大学 Gray-scale image processing system and method based on FPGA morphological operator
CN109978869A (en) * 2019-03-29 2019-07-05 清华大学 A kind of sea horizon detection method and system based on gray level co-occurrence matrixes and Hough transform

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040179737A1 (en) * 2003-03-14 2004-09-16 Skourikhine Alexei N. Method for contour extraction for object representation
CN105160661A (en) * 2015-08-19 2015-12-16 西安电子科技大学 Color image edge extraction method based on center pixel similarity weights
JP2017111129A (en) * 2015-12-11 2017-06-22 国立大学法人旭川医科大学 Contour extraction device, contour extraction method and program
CN107169977A (en) * 2017-04-24 2017-09-15 华南理工大学 Adaptive threshold color image edge detection method based on FPGA and Kirsch
WO2019015477A1 (en) * 2017-07-18 2019-01-24 Oppo广东移动通信有限公司 Image correction method, computer readable storage medium and computer device
CN109671042A (en) * 2018-12-19 2019-04-23 西安电子科技大学 Gray-scale image processing system and method based on FPGA morphological operator
CN109978869A (en) * 2019-03-29 2019-07-05 清华大学 A kind of sea horizon detection method and system based on gray level co-occurrence matrixes and Hough transform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李文娜等: "获取医学灰度图像轮廓图的算法", 《中国组织工程研究与临床康复》 *

Similar Documents

Publication Publication Date Title
CN107909556B (en) Video image rain removing method based on convolutional neural network
CN109035149B (en) License plate image motion blur removing method based on deep learning
CN110599486A (en) Method and system for detecting video plagiarism
CN107679495B (en) Detection method for movable engineering vehicles around power transmission line
CN107169977B (en) Self-adaptive threshold color image edge detection method based on FPGA and Kirsch
CN110782477A (en) Moving target rapid detection method based on sequence image and computer vision system
CN110598673A (en) Remote sensing image road extraction method based on residual error network
CN110309806A (en) A kind of gesture recognition system and its method based on video image processing
CN108711160B (en) Target segmentation method based on HSI (high speed input/output) enhanced model
CN108288030B (en) Airborne infrared small target detection and identification real-time processing system and method
Jonnerby et al. Machine learning based novel architecture implementation for image processing mechanism
CN111414938A (en) Target detection method for bubbles in plate heat exchanger
Sun et al. Progressive multi-branch embedding fusion network for underwater image enhancement
CN116993737B (en) Lightweight fracture segmentation method based on convolutional neural network
CN103136530A (en) Method for automatically recognizing target images in video images under complex industrial environment
CN112529927A (en) Self-adaptive contour extraction system and method based on FPGA morphological operator
Tan et al. The research of implementation method of canny edge detection of video on FPGA
CN115861349A (en) Color image edge extraction method based on reduction concept structural elements and matrix sequence
CN109801245B (en) Color image enhancement method based on self-adaptive morphology
CN111461259B (en) Image classification method and system based on red-black morphological wavelet pooling network
Tang et al. Sky-preserved image dehazing and enhancement for outdoor scenes
Sun et al. A new infrared image enhancement algorithm
Xu et al. A CNN-based edge detection algorithm for remote sensing image
Trigka et al. Joint Power and Contrast Shrinking in RGB Images with Exponential Smoothing
CN112308772A (en) Super-resolution reconstruction method based on deep learning local and non-local information

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210319