Method and device for image region recognition, and electronic equipment

By acquiring and fitting the shape information of interest in the image and identifying and determining the image area, the problem of manual misjudgment in the prior art is solved, and the accuracy and efficiency of recognition are improved.

CN114359545BActive Publication Date: 2025-06-06PEKING UNIVERSITY FIRST HOSPITAL (PEKING UNIVERSITY FIRST CLINICAL MEDICAL COLLEGE)
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111619351.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-06-06
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

In the prior art, image area recognition relies on manual experience, resulting in errors that are prone to occur when recognizing images with greater difficulty.

Method used

By obtaining the shape information of the pending image and the target of interest, target recognition and fitting are performed, and the area of ​​interest is determined, thereby avoiding manual misjudgment.

Benefits of technology

It improves the accuracy and efficiency of image area recognition, reduces manual misjudgment, and enhances work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114359545B_ABST
    Figure CN114359545B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer science and technology, and specifically to a method and device for image region recognition, and electronic equipment, wherein the method comprises obtaining shape information of an image to be processed and an object of interest, performing object recognition on the image to be processed, determining the contour of a preset object in the image to be processed, fitting the contour of the preset object based on the shape information of the object of interest, determining an area of ​​interest in the image to be processed, and determining parameters of the area of ​​interest. The final recognition area is limited by the pre-set shape information of the object of interest, and at the same time, the correctness of the final recognition area is guaranteed by a further fitting step. Finally, the final calculation step further avoids manual misjudgment, and greatly improves work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer science and technology, and in particular to a method and device for image region recognition, and electronic equipment. Background Art

[0002] With the development of society, image region recognition has attracted more and more attention. For example, in the medical field, doctors can evaluate the efficacy of patients and provide reference for subsequent treatment plans by analyzing their conditions before and after wearing orthokeratology lenses.

[0003] Under the existing technology, if the above situation occurs, the demarcation of special areas usually relies on manual experience to judge the images. When encountering some images that are difficult to recognize, large errors may occur in manual judgment.

[0004] Therefore, a method and device for image region recognition and electronic equipment are needed to overcome the above-mentioned defects. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides an image region recognition method to solve the problem of manual misjudgment.

[0006] According to a first aspect, an embodiment of the present invention provides an image region recognition method, comprising:

[0007] Obtain the image to be processed and the shape information of the object of interest;

[0008] Performing target recognition on the image to be processed to determine the outline of a preset target in the image to be processed;

[0009] The contour of the preset target is fitted based on the shape information of the target of interest, and the region of interest in the image to be processed is determined, so as to determine parameters of the region of interest.

[0010] The image region recognition method provided by the embodiment of the present invention realizes the limitation of the final recognition region through pre-set shape information of the target of interest. At the same time, through a further fitting step, the correctness of the final recognition region is guaranteed. Finally, through the final calculation step, artificial misjudgment is further avoided, thereby greatly improving work efficiency.

[0011] In combination with the first aspect, in a first implementation of the first aspect, the performing target recognition on the image to be processed to determine the contour of a preset target in the image to be processed includes:

[0012] Performing target recognition on the image to be processed to obtain a target contour of at least one target;

[0013] The target contour is screened to determine the contour of the preset target in the image to be processed.

[0014] The image region recognition method provided by the embodiment of the present invention further screens all contours obtained by preliminary recognition, thereby eliminating unnecessary noise data, greatly improving work efficiency. At the same time, it further ensures the accuracy of determining the region of interest in subsequent recognition, thereby greatly improving work efficiency.

[0015] In combination with the first implementation of the first aspect, in the second implementation of the first aspect, the performing target recognition on the image to be processed includes:

[0016] Binarizing the image to be processed according to a preset threshold value to obtain a binary image;

[0017] Performing an image dilation operation on the binary image to determine at least one closed area in the binary image;

[0018] The contour of the closed area is used as the target contour.

[0019] The image region recognition method provided by the embodiment of the present invention simplifies the data by binarizing the image, which facilitates the calculation of the data in the subsequent steps. At the same time, through operations such as image expansion, some closed areas are determined, which paves the way for the subsequent selection of areas of interest, thereby greatly improving work efficiency.

[0020] In combination with the first embodiment of the first aspect, in a third embodiment of the first aspect, the screening process for the target contour includes:

[0021] Acquire the center of the image to be processed;

[0022] The target contour of the at least one target is screened based on the center of the image to be processed to determine the contour of the preset target.

[0023] Based on the above screening processing results, the outline of the preset target in the image to be processed is determined.

[0024] The image region recognition method provided by the embodiment of the present invention screens a series of closed contours according to a preset center to determine the contour that needs to be processed in the end, further deletes a large amount of noise data, and greatly improves work efficiency.

[0025] In combination with the first aspect, in a fourth implementation of the first aspect, fitting the contour of the preset target based on the shape information of the target of interest to determine the region of interest in the image to be processed includes:

[0026] Superimposing the shape information of the object of interest and the outline of the preset object, and determining the distance between the pixel point corresponding to the shape information of the object of interest and the pixel point corresponding to the outline of the preset object;

[0027] Comparing the distance with a preset distance threshold to determine a comparison result;

[0028] When the distance is greater than the distance threshold, the pixel points corresponding to the shape information of the object of interest are deleted, and the pixel points of the outline of the preset object are retained;

[0029] Otherwise, the pixel points corresponding to the shape information of the object of interest are retained, and the pixel points of the outline of the preset object are deleted.

[0030] The image region recognition method provided by the embodiment of the present invention further reduces the error by fitting the target contour and the shape information of the target of interest, ensures the accuracy and authenticity of the region finally recognized, and greatly improves the work efficiency.

[0031] In combination with the first aspect, in a fifth implementation of the first aspect, fitting the contour of the preset target based on the shape information of the target of interest, determining the region of interest in the image to be processed, and determining parameters of the region of interest includes:

[0032] The region of interest is calculated and processed to obtain the area of ​​the region of interest and the coordinates of the center point of the region of interest.

[0033] The image region recognition method provided by the embodiment of the present invention further performs calculation operations on the region of interest after obtaining the region of interest to obtain further calculation results, thereby eliminating the complexity of manual calculations and also avoiding manual misjudgment, thereby greatly improving work efficiency.

[0034] In combination with the fifth implementation of the first aspect, in the sixth implementation of the first aspect, the calculating and processing the region of interest to obtain the area of ​​the region of interest includes:

[0035] Counting is performed on the pixels of the region of interest, and the area of ​​the region of interest is determined according to the number of the pixels.

[0036] The image region recognition method provided by the embodiment of the present invention further performs calculation operations on the region of interest after obtaining the region of interest to obtain further calculation results, thereby eliminating the complexity of manual calculations and also avoiding manual misjudgment, thereby greatly improving work efficiency.

[0037] According to a second aspect, an embodiment of the present invention provides a device for image region recognition, including:

[0038] An acquisition module is used to acquire the shape information of the image to be processed and the object of interest;

[0039] A first processing module, used for performing target recognition on the image to be processed, and determining the outline of a preset target in the image to be processed;

[0040] The second processing module is used to fit the contour of the preset target based on the shape information of the target of interest, determine the region of interest in the image to be processed, and determine parameters of the region of interest.

[0041] The image region recognition method provided by the embodiment of the present invention realizes the limitation of the final recognition region through pre-set shape information of the target of interest. At the same time, through a further fitting step, the correctness of the final recognition region is guaranteed. Finally, through the final calculation step, artificial misjudgment is further avoided, thereby greatly improving work efficiency.

[0042] According to the third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for image area recognition described in the first aspect or any one of the embodiments of the first aspect by executing the computer instructions.

[0043] According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for image region recognition described in the first aspect or any one of the embodiments of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 is a flowchart of a method for image region recognition according to an embodiment of the present invention;

[0046] Figure 2 is a schematic diagram of image conversion according to an embodiment of the present invention;

[0047] Figure 3 is a flowchart of a method for image region recognition according to an embodiment of the present invention;

[0048] Figure 4 is a schematic diagram of target contour recognition according to an embodiment of the present invention;

[0049] Figure 5 is a schematic diagram of image expansion processing according to an embodiment of the present invention;

[0050] Figure 6 is a schematic diagram of determining a target profile according to an embodiment of the present invention;

[0051] Figure 7 is a schematic diagram of image fitting according to an embodiment of the present invention;

[0052] Figure 8 is a schematic diagram of determining the center coordinates of a region of interest according to an embodiment of the present invention;

[0053] Fig. 9 is a flowchart of a method for image region recognition according to an embodiment of the present invention;

[0054] Fig.10 is a structural block diagram of an apparatus for image region recognition according to an embodiment of the present invention;

[0055] Fig.11 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0057] The image region recognition method provided by the embodiment of the present invention realizes the limitation of the final recognition region through pre-set shape information of the target of interest. At the same time, through a further fitting step, the correctness of the final recognition region is guaranteed. Finally, through the final calculation step, artificial misjudgment is further avoided, thereby greatly improving work efficiency.

[0058] According to an embodiment of the present invention, an embodiment of an image region recognition method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0059] In this embodiment, a method for identifying an image region is provided, which can be used in electronic devices such as computers, servers, tablet computers, etc. Figure 1 is a flow chart of an image region recognition method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0060] S11, obtaining the image to be processed and the shape information of the object of interest;

[0061] Specifically, the shape information of the object of interest may be selected based on experience.

[0062] For example, in a specific implementation, assuming that the method is used in human ophthalmology, what needs to be identified is the human eye area, which must be circular, so it can be determined that the shape of the target of interest is circular.

[0063] S12, performing target recognition on the image to be processed to determine the outline of a preset target in the image to be processed;

[0064] Specifically, after obtaining the image, the obtained three primary colors (red, green, blue, RGB) image is converted into a saturation (Hue, Saturation, Value, HSV) image, and then the contour of the preset target in the image to be processed is determined by performing target recognition on the saturation image.

[0065] In practical applications, see Figure 2 As shown, assuming that after obtaining RGB image A, the RGB image A is converted to obtain HSV image A ′ , and then by image A ′ , perform target recognition and determine the outline of the preset target in the image to be processed.

[0066] This step will be described in detail below.

[0067] S13, fitting the contour of the preset target based on the shape information of the target of interest, determining the region of interest in the image to be processed, and determining parameters of the region of interest.

[0068] Specifically, the identified area is repaired according to the preset shape information of the object of interest, so that the identified image is more realistic and beautiful.

[0069] Specifically, still taking the case of using this method in human ophthalmology as an example, at this time, a circle can be used for fitting and modification to generate an image.

[0070] Furthermore, the final parameter determination can be based on further operations on the pixels of the image to achieve data calculation.

[0071] This step will be described in detail below.

[0072] The image region recognition method provided by the embodiment of the present invention realizes the limitation of the final recognition region through pre-set shape information of the target of interest. At the same time, through a further fitting step, the correctness of the final recognition region is guaranteed. Finally, through the final calculation step, artificial misjudgment is further avoided, thereby greatly improving work efficiency.

[0073] In this embodiment, a method for image region recognition is provided, which can be used in electronic devices such as computers, servers, tablet computers, etc. Figure 3 is a flow chart of an image region recognition method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0074] S21, obtaining the image to be processed and the shape information of the object of interest;

[0075] For details, please see Figure 1 S11 of the illustrated embodiment will not be described in detail here.

[0076] S22, performing target recognition on the image to be processed to determine the outline of a preset target in the image to be processed;

[0077] Specifically, the above S22 includes:

[0078] S221, performing target recognition on the image to be processed to obtain a target contour of at least one target;

[0079] For details, see Figure 4 As shown, the saturation image is recognized, and three target contours are identified, namely target contour A, target contour B, and target contour C.

[0080] In some optional implementations of this embodiment, the above S221 may include:

[0081] (1) performing binarization processing on the image to be processed according to a preset threshold value to obtain a binarized image;

[0082] Specifically, the image can be binarized by setting corresponding thresholds for hue, saturation, and brightness.

[0083] In a specific implementation, for example, it is stipulated that the hue value greater than 180° is regarded as 360°, otherwise, it is treated as 0°. It is stipulated that the saturation value greater than 50% is regarded as 100%, otherwise, it is treated as 0%, and it is stipulated that the brightness value greater than 50% is regarded as 100%, otherwise, it is treated as 0%. According to the above provisions, the image is binarized.

[0084] (2) performing an image dilation operation on the binary image to determine at least one closed area in the binary image;

[0085] Specifically, since some blanks may be generated in the binarized image, the blanks are supplemented by performing a dilation operation on the binarized image.

[0086] For example, see Figure 5 As shown, image B is an image after binarization processing, and some breakpoints appear in the image. Therefore, the breakpoints are filled by dilating the image.

[0087] (3) The outline of the closed area is used as the target outline.

[0088] Specifically, the closed area obtained after the image dilation operation is used as the target contour.

[0089] For example, still Figure 5 Taking the illustrated figure as an example, closed area A, closed area B and closed area C are taken as target contour A, target contour B and target contour C.

[0090] S222, screening the target contours to determine the contours of the preset targets in the image to be processed.

[0091] In some optional implementations of this embodiment, the above S222 may include:

[0092] (1) obtaining the center of the image to be processed;

[0093] Specifically, the image center may be determined according to a preset threshold.

[0094] For further information, see Figure 6 As shown, it is assumed that there is an image that has completed target contour screening. There are three target contours on the image, namely target contour A, target contour B, and target contour C. The resolution of the image has been determined to be 301×401, that is, the long side of the image is composed of 400 pixels, and the wide side of the image is composed of 300 pixels. It is limited that the central area of ​​the image must contain pixel point A, and pixel point A is 150 pixels away from the upper and lower edges, and 200 pixels away from the left and right edges.

[0095] (2) Screening the target contour of the at least one target based on the center of the image to be processed to determine the contour of the preset target.

[0096] Specifically, the target contour including the center of the image is used as the preset target contour.

[0097] For example, see Figure 6 As shown, it is determined whether each target contour contains pixel point A one by one. Through observation, it can be obtained that target contour A and target contour C do not contain pixel point A, while target contour B contains pixel point A.

[0098] (3) Based on the above screening results, the contour of the preset target in the image to be processed is determined.

[0099] Specifically, according to the above results, the outline of the preset target is determined.

[0100] For example, see Figure 6 As shown, the target contour B is used as the contour of the preset target.

[0101] S23, fitting the contour of the preset target based on the shape information of the target of interest, determining the region of interest in the image to be processed, and determining parameters of the region of interest.

[0102] Specifically, the above S23 includes:

[0103] S231, superimposing the shape information of the object of interest and the outline of the preset object, and determining the distance between the pixel points corresponding to the shape information of the object of interest and the pixel points corresponding to the outline of the preset object;

[0104] Specifically, the obtained outline of the preset target is overlapped and compared with the shape information of the target of interest to determine the distance between each corresponding pixel point.

[0105] See also Figure 7 As shown, taking the shape information of the target of interest as a circle as an example, the distance between each corresponding pixel point is compared after overlapping. In the figure, two groups of corresponding pixel points, pixel points b and b', and pixel points c and c', are taken as examples, where the distance between pixel points b and b' is 15 pixels, and the distance between pixel points c and c' is 3 pixels.

[0106] S232, comparing the distance with a preset distance threshold to determine a comparison result;

[0107] Specifically, assuming that the preset distance threshold is 5, it is determined that the distance between pixel points b and b' is greater than the distance threshold, while the distance between pixel points c and c' is less than the distance threshold.

[0108] S233, when the distance is greater than the distance threshold, deleting the pixel points corresponding to the shape information of the object of interest, and retaining the pixel points of the outline of the preset object;

[0109] Specifically, still taking the above-mentioned pixel points b and b', and pixel points c and c', two groups of corresponding pixel points as an example, assuming that pixel points b and c are pixel points on the shape information of the target of interest, and pixel points b' and c' are pixel points on the contour of the preset target, according to the above comparison results, for pixel points b and b', delete pixel point b and retain pixel point b'.

[0110] S234: Otherwise, retain the pixel points corresponding to the shape information of the object of interest, and delete the pixel points of the outline of the preset object.

[0111] Specifically, still taking the above-mentioned pixel points b and b', and pixel points c and c', two groups of corresponding pixel points as an example, assuming that pixel points b and c are pixel points on the shape information of the target of interest, and pixel points b' and c' are pixel points on the contour of the preset target, according to the above comparison results, for pixel points c and c', retain pixel point c and delete pixel point c'.

[0112] S235: Calculate and process the region of interest to obtain the area of ​​the region of interest and the coordinates of the center point of the region of interest.

[0113] Specifically, the coordinates of the center point of the region of interest can be calculated using the minimum circumscribed rectangle method.

[0114] See also Figure 8 As shown, a minimum circumscribed rectangle of the region of interest C is made, and the center point coordinates A(x, y) of the rectangle are used as the center point coordinates of the region of interest C.

[0115] In some optional implementations of this embodiment, the above S235 may include:

[0116] Counting is performed on the pixels of the region of interest, and the area of ​​the region of interest is determined according to the number of the pixels.

[0117] Specifically, assuming that the area of ​​each pixel is m, and the region of interest contains n pixels, the area of ​​the region of interest can be calculated according to the following formula:

[0118] Area of ​​region of interest = m × n

[0119] Furthermore, other data may be calculated based on the obtained region of interest and corresponding information, such as the distance between the center point coordinates and the fixed point, the angle formed by the line connecting the center point and the fixed point and the horizontal line, and the like.

[0120] The image region recognition method provided by the embodiment of the present invention realizes the limitation of the final recognition region through pre-set shape information of the target of interest. At the same time, through a further fitting step, the correctness of the final recognition region is guaranteed. Finally, through the final calculation step, artificial misjudgment is further avoided, thereby greatly improving work efficiency.

[0121] As a specific application example of this embodiment, Fig. 9 As shown, the image region recognition method includes:

[0122] S1, obtaining the image to be processed and the shape information of the object of interest.

[0123] S2, performing target recognition on the image to be processed to obtain a target contour of at least one target.

[0124] S3, screening the target contours to determine the contours of the preset targets in the image to be processed.

[0125] S4, superimposing the shape information of the object of interest and the outline of the preset object, and determining the distance between the pixel points corresponding to the shape information of the object of interest and the pixel points corresponding to the outline of the preset object.

[0126] S5, determine whether the distance is greater than a preset distance threshold, if so, execute step S6, otherwise execute step S7.

[0127] S6, deleting the pixel points corresponding to the shape information of the object of interest, and retaining the pixel points of the outline of the preset object.

[0128] S7, retaining the pixel points corresponding to the shape information of the object of interest, and deleting the pixel points of the outline of the preset object.

[0129] S8, calculating and processing the region of interest to obtain the area of ​​the region of interest and the coordinates of the center point of the region of interest.

[0130] In this embodiment, an embodiment of a method for image region recognition is also provided. In a specific scenario, for example, in medicine, this method can be used to observe eye-related parameters of a patient after wearing orthokeratology lenses, as follows:

[0131] The patient's eye RGB image is obtained, and the obtained eye RGB image is converted to obtain the eye HSV image. Based on the preset saturation, hue and brightness parameters, the HSV is binarized to obtain an image containing multiple closed areas. The closed areas in the image are screened to obtain a closed area containing a preset image center identification mark. Since it has been determined that the human eye area is identified, and more relevant empirical knowledge can determine that the plastic area is a circular area, the screened closed space is fitted with the circle to obtain a fitted figure, and the identified area is used as the plastic area. Furthermore, in practical applications, it is necessary to calculate the area, eccentricity angle and eccentricity distance of the plastic area, wherein the area of ​​the plastic area can be achieved by calculating the pixel points in the plastic area, the eccentricity distance can be obtained by calculating the distance between the center of the plastic area and the pupil, and the eccentricity angle is obtained by calculating the angle between the line connecting the center of the plastic area and the pupil and the horizontal line.

[0132] In this embodiment, a device for image region recognition is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0133] This embodiment provides a device for image region recognition, such as Fig.10 As shown, including:

[0134] An acquisition module 101 is used to acquire the shape information of the image to be processed and the object of interest;

[0135] The first processing module 102 is used to perform target recognition on the image to be processed and determine the outline of a preset target in the image to be processed;

[0136] The second processing module 103 is used to fit the contour of the preset target based on the shape information of the target of interest, determine the region of interest in the image to be processed, and determine parameters of the region of interest.

[0137] The image region recognition device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and a memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0138] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.

[0139] The embodiment of the present invention also provides an electronic device having the above Fig.10 An apparatus for identifying an image region is shown.

[0140] See also Fig.11 , Fig.11 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, such as Fig.11 As shown, the electronic device may include: at least one processor 111, such as a CPU (Central Processing Unit), at least one communication interface 113, a memory 114, and at least one communication bus 112. The communication bus 112 is used to realize the connection and communication between these components. The communication interface 113 may include a display screen (Display) and a keyboard (Keyboard), and the optional communication interface 113 may also include a standard wired interface and a wireless interface. The memory 114 may be a high-speed RAM memory (Random Access Memory) or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 114 may optionally be at least one storage device located away from the aforementioned processor 111. The processor 111 may be combined with Fig.11 In the described device, the memory 114 stores an application program, and the processor 111 calls the program code stored in the memory 114 to execute any of the above method steps.

[0141] The communication bus 112 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The communication bus 112 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0142] Among them, the memory 114 may include a volatile memory (English: volatile memory), such as a random access memory (English: random-access memory, abbreviated: RAM); the memory may also include a non-volatile memory (English: non-volatile memory), such as a flash memory (English: flash memory), a hard disk drive (English: hard disk drive, abbreviated: HDD) or a solid-state drive (English: solid-state drive, abbreviated: SSD); the memory 114 may also include a combination of the above types of memory.

[0143] The processor 111 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.

[0144] The processor 111 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0145] Optionally, the memory 114 is also used to store program instructions. The processor 111 can call the program instructions to implement the image region recognition method shown in any embodiment of the present application.

[0146] The embodiment of the present invention further provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the method of image region recognition in any of the above method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory.

[0147] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for image region recognition, It is characterized in that include: Obtain the image to be processed and the shape information of the object of interest; The shape information of the object of interest is selected based on experience; Performing target recognition on the image to be processed and determining the contour of a preset target in the image to be processed includes: performing target recognition on the image to be processed and obtaining the target contour of at least one target; performing screening processing on the above target contour and determining the contour of the preset target in the image to be processed; performing target recognition on the image to be processed includes: performing binarization processing on the image to be processed according to a preset threshold value to obtain a binarized image; performing an image dilation operation on the binarized image and determining at least one closed area in the binarized image; and using the contour of the closed area as the target contour; Fitting the contour of the preset target based on the shape information of the target of interest, determining the region of interest in the image to be processed, and determining parameters of the region of interest; The step of fitting the contour of the preset target based on the shape information of the target of interest to determine the region of interest in the image to be processed includes: Superimposing the shape information of the object of interest and the outline of the preset object, and determining the distance between the pixel point corresponding to the shape information of the object of interest and the pixel point corresponding to the outline of the preset object; Comparing the distance with a preset distance threshold to determine a comparison result; When the distance is greater than the distance threshold, the pixel points corresponding to the shape information of the object of interest are deleted, and the pixel points of the outline of the preset object are retained; Otherwise, retain the pixel points corresponding to the shape information of the object of interest, and delete the pixel points of the outline of the preset object; The contour of the preset target is fitted based on the shape information of the target of interest to determine the region of interest in the image to be processed so as to determine the parameters of the region of interest, including: calculating and processing the region of interest to obtain the area of ​​the region of interest and the coordinates of the center point of the region of interest.

2. The method according to claim 1, It is characterized in that The screening process for the target profile comprises: Acquire the center of the image to be processed; Screening the target contour of the at least one target based on the center of the image to be processed to determine the contour of the preset target; Based on the above screening processing results, the outline of the preset target in the image to be processed is determined.

3. The method according to claim 1, It is characterized in that The calculating and processing the region of interest to obtain the area of ​​the region of interest comprises: Counting is performed on the pixels of the region of interest, and the area of ​​the region of interest is determined according to the number of the pixels.

4. A device for image region recognition, It is characterized in that include: An acquisition module is used to acquire the shape information of the image to be processed and the object of interest; The shape information of the object of interest is selected based on experience; The first processing module is used to perform target recognition on the image to be processed and determine the contour of the preset target in the image to be processed, including: performing target recognition on the image to be processed to obtain the target contour of at least one target; screening the above target contour to determine the contour of the preset target in the image to be processed; the target recognition on the image to be processed includes: binarizing the image to be processed according to a preset threshold to obtain a binary image; performing an image dilation operation on the binary image to determine at least one closed area in the binary image; and using the contour of the closed area as the target contour; The second processing module is used to fit the contour of the preset target based on the shape information of the target of interest, determine the region of interest in the image to be processed, and determine the parameters of the region of interest; wherein, the fitting of the contour of the preset target based on the shape information of the target of interest to determine the region of interest in the image to be processed includes: superimposing the shape information of the target of interest and the contour of the preset target to determine the distance between the pixel points corresponding to the shape information of the target of interest and the pixel points corresponding to the contour of the preset target; comparing the distance with a preset distance threshold to determine the comparison result; when the distance is greater than the distance threshold, deleting the pixel points corresponding to the shape information of the target of interest and retaining the pixel points of the contour of the preset target; otherwise, retaining the pixel points corresponding to the shape information of the target of interest and deleting the pixel points of the contour of the preset target; the fitting of the contour of the preset target based on the shape information of the target of interest to determine the region of interest in the image to be processed, and determining the parameters of the region of interest, includes: calculating and processing the region of interest to obtain the area of ​​the region of interest and the coordinates of the center point of the region of interest.

5. An electronic device, It is characterized in that include: at least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of any method described in claims 1-3.

6. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Pupil radius detection method and device, computer equipment and storage medium

    CN110555875A

  • Ultrasonic image focus description method and device, computer equipment and storage medium

    CN113034426A

  • Defect detection method, device and system for functional holes in cover plate of electronic equipment

    CN113554582A