Method, system and device for extracting target object in image and medium

By identifying and generating polygonal areas, the problem of inaccurate human pixel coordinate sets in images is solved, and an accurate coordinate set can be obtained in a short time, meeting the needs of real-time human body extraction and improving visual effects.

CN118736618APending Publication Date: 2024-10-01SHANGHAI YINGLISHI ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310342608.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

When the existing technology extracts the human body in the image, the obtained human body pixel coordinate set is not completely accurate, resulting in poor visual effects. Especially in real-time video processing, it cannot meet the needs of businesses such as selfies and games.

Method used

By identifying the convex points on the contour line of the target object in the image to be extracted, a polygonal area surrounding the target object is generated, and recognition is performed based on this area. A relatively low-precision algorithm is used to reduce and enlarge the image to shorten the operation time and ensure that the target object is processed in a short time. Obtain an accurate set of human pixel coordinates within a certain time.

Benefits of technology

It achieves the acquisition of accurate human body pixel coordinate sets in a short computing time, meets the business needs of real-time human body extraction, reduces the flickering phenomenon of human body edges in videos, and provides a more natural display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736618A_ABST
    Figure CN118736618A_ABST
Patent Text Reader

Abstract

The invention discloses a strategy for extracting a target object E in an image. The strategy specifically comprises the following steps: step 1, identifying salient points on a contour line of the target object E in a to-be-extracted image A; step 2, generating a polygonal area B surrounding the target object E based on the salient points on the contour line; and step 3, identifying a target object E based on the polygonal region B. According to the invention, a more accurate human body pixel coordinate set can be obtained from the target image in a relatively short operation time, so that the business requirement of extracting a human body from the target image in real time is met; and human bodies can be further continuously extracted in real time from a plurality of frames of pictures containing the motion video of the target object E, and a continuous and natural new display picture is formed according to the human bodies, so that services such as real-time selfie and games can be realized on equipment with various operational capabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and in particular relates to a method, system, device and medium for extracting a target object in an image. Background Art

[0002] When the prior art extracts the human body in an image, the pixel coordinate set of the corresponding area of ​​the human body is not completely accurate, especially when the human body is continuously extracted in real time from multiple frames containing a target object E motion video and a new display screen is required to be formed with a motion frequency basically consistent with the original target object E motion video. Since the human body video is composed of multiple frames of continuously moving images, there are many frames per second, and the operation of extracting the human body in each frame must be completed in a very short time. Due to the limitation of calculation time, the obtained human body often has more or less content than the actual human body, which brings strange visual effects, and the human body pixel coordinate sets obtained from different frames often have significantly different deviations. The human body video is composed of multiple frames of continuously moving images, and there are many frames per second, which will cause the edge of the human body in the video screen to flicker continuously, further bringing uncomfortable visual effects, especially when displayed on a large screen.

[0003] The means of solving the above-mentioned problems in the prior art are mainly to improve the accuracy of the human body extraction algorithm, for example, to obtain a more accurate set of human body pixel coordinates by performing more refined segmentation based on the color and shape differences of the human body edge and the connecting part with the background picture, but the processing time of a single frame is relatively long, and the human body video is composed of multiple frames of continuously moving pictures, and the interval time between two frames is very short, so the human body can usually only be extracted offline, that is, the human body in the continuously moving human body video is extracted from multiple frames of human body pictures respectively, and then combined into a new human body video based on the time interval of the original pictures of the human body video, but this cannot meet the needs of real-time selfie, game and other services. For example, the user's body standing in front of the TV is photographed by a camera above the TV, and the user's body is extracted from the real background of the user end and superimposed on the virtual background picture and played on the TV screen, so that the user can observe the effect of the fusion of his own image and the virtual background on the TV screen in real time and perform corresponding actions. In this way, the human body must be extracted in real time, and the use of the prior art will cause uncomfortable and strange visual effects. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a strategy for extracting a target object E in an image in view of the deficiencies in the above-mentioned prior art, which can obtain a more accurate set of human pixel coordinates from the target image within a relatively short computing time to meet the business needs of extracting the human body from the target image in real time, and can further continuously and in real time extract the human body from multiple frames of moving video containing the target object E and form a continuous and natural new display screen accordingly, thereby realizing real-time selfie-like, gaming and other businesses on devices with various computing capabilities.

[0005] The first aspect of the present invention discloses a method for extracting a target object in an image, comprising the following steps:

[0006] Step 1: Identify the salient points on the contour line of the target object E in the image A to be extracted;

[0007] Step 2: Generate a polygonal area B surrounding the target object E based on the convex points on the contour line;

[0008] Step 3: Identify the target object E based on the polygonal area B.

[0009] In the above method for extracting target objects from images, the accuracy of the recognition algorithm used in step 1 is lower than or equal to the accuracy of the algorithm used in step 3.

[0010] In the above method for extracting a target object from an image, the polygonal area B is the smallest rectangular area surrounding the target object E.

[0011] In the above method for extracting a target object from an image, when identifying the convex points on the contour line of the target object E in step 1, the image A to be extracted is first reduced by T times to generate an image A', and the target object E in the image A' is identified. A ', and then the target object E A The virtual polygonal wireframe or virtual curve wireframe where the convex points on the contour line of the target object E in the image A to be extracted is magnified T times to obtain the positions of the convex points on the contour line of the target object E.

[0012] In the above method for extracting the target object in the image, when the target object E is identified based on the polygonal area B in step 3, the polygonal area B is first magnified S times to generate a polygonal area B', and the target object E in the polygonal area B' is identified. B ', then the target object E B 'Shrink it down by S times and get the target object E.

[0013] A second aspect of the present invention discloses a method for extracting feature points on a target object in an image. After executing any of the above methods for extracting a target object in an image, feature points are identified from the obtained target object E.

[0014] The third aspect of the present invention discloses a method for extracting a local area image on a target object. After executing the method for extracting feature points on the target object E in the image as described above, a circular area surrounding the area to be extracted is established with any feature point close to the local area to be extracted as the center of the circle, and the entire circular area is scanned with the radius of the circular area as the scanning line, and a combination of scanning line segments that meet the characteristics of the local area to be extracted is taken to form an extracted local area image.

[0015] The fourth aspect of the present invention discloses a method for extracting a motion video of a target object in a video, performing any of the above-mentioned methods for extracting a target object in an image on multiple frames of an image A to be extracted containing a human body in a video, and synthesizing the identified multiple frames of target object E images into a motion video of the target object E.

[0016] A fifth aspect of the present invention discloses a system for extracting a target object in an image, comprising: a first recognition module, a region generation module, and a second recognition module;

[0017] The first recognition module is used to recognize salient points on the contour line of the target object E in the image A to be extracted;

[0018] A region generation module, used to generate a polygonal region B surrounding a target object E based on convex points on the contour line;

[0019] The second recognition module recognizes the target object E based on the polygonal area B.

[0020] In the above-mentioned system for extracting target objects in images, the accuracy of the recognition algorithm adopted by the first recognition module for recognition is lower than or equal to the accuracy of the algorithm adopted by the second recognition module for recognition.

[0021] In the above system for extracting a target object from an image, the polygonal area B is the smallest rectangular area surrounding the target object E.

[0022] In the above-mentioned system for extracting target objects from images, when the first recognition module recognizes the convex points on the contour line of the target object E, the image A to be extracted is first reduced by T times to generate an image A', and the target object E in the image A' is recognized. A ', and then the target object E A The virtual polygonal wireframe or virtual curve wireframe where the convex points on the contour line of the target object E in the image A to be extracted is magnified T times to obtain the positions of the convex points on the contour line of the target object E.

[0023] In the above-mentioned system for extracting target objects from images, when the second recognition module recognizes the target object E based on the polygonal area B, the polygonal area B is first magnified S times to generate a polygonal area B', and the target object E in the polygonal area B' is recognized. B ', then the target object E B'Shrink it down by S times and get the target object E.

[0024] The sixth aspect of the present invention discloses a system for extracting motion video of a target object in a video, using any of the above-mentioned systems for extracting target objects in images to be extracted from multiple frames of images A containing human bodies in the video to identify the target object E, and synthesizing the identified multiple frames of target object E images into a motion video of the target object E.

[0025] A seventh aspect of the present invention discloses an electronic device, comprising: a memory and a processor, wherein the processor is connected to the memory;

[0026] The memory is used to store programs;

[0027] The processor calls the program stored in the memory to execute the method disclosed in any one of the first, second, third and fourth aspects above.

[0028] The eighth aspect of the present invention discloses a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a computer to execute the method disclosed in any one of the first, second, third and fourth aspects above.

[0029] Compared with the prior art, the present invention has the following advantages:

[0030] 1. A more accurate set of human pixel coordinates can be obtained from the target image in a relatively short computing time to meet the business needs of extracting the human body from the target image in real time.

[0031] 2. The human body can be further continuously and in real time extracted from multiple frames of the moving video of the target object E and a continuous and natural new display screen can be formed accordingly, thereby realizing real-time selfie-like, gaming and other services on devices with various computing capabilities.

[0032] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 This is a flow chart of the method of Example 1 of the present invention.

[0034] Figure 2 This is an example diagram of image A to be extracted in an embodiment of the present invention.

[0035] Figure 3 For Figure 2 An example image with convex points on the human body contour after being reduced by T times.

[0036] Figure 4 This is an example image after a rectangular frame is generated for the image A to be extracted.

[0037] Figure 5 For single capture Figure 4 Example image after the rectangular frame.

[0038] Figure 6 For Figure 5 An example of an image in the rectangular frame that is magnified S times.

[0039] Figure 7 For Figure 6 Example image after the target object E is recognized.

[0040] Figure 8 For Figure 7 Example image after being reduced by S times.

[0041] Fig. 9 This is a system architecture diagram of Example 3 of the present invention. DETAILED DESCRIPTION

[0042] Example 1

[0043] like Figure 1 As shown, a method for extracting a target object in an image comprises the following steps:

[0044] Step 1: Identify the salient points on the contour line of the target object E in the image A to be extracted;

[0045] Specifically, the target object E is taken as an example of a human body. When identifying convex points on the contour line, the existing deep learning-based human body extraction algorithm is used for identification. First, the pixel point coordinate set or human body key points of the target object E are identified. Then, the pixel point coordinate set or human body key points are screened to screen out the convex points on the boundary of the human body area contour, such as the highest point, the lowest point, the leftmost point, and the rightmost point of the target object E.

[0046] Step 2: Generate a polygonal area B surrounding the target object E based on the convex points on the contour line;

[0047] For example, the minimum rectangular area surrounding the target object E is generated by the highest point, the lowest point, the leftmost point and the rightmost point of the target object E; those skilled in the art should understand that other irregular polygonal areas, areas surrounded by regular curves or areas surrounded by irregular curves may also be used here;

[0048] Step 3: Identify the target object E based on the polygonal area B.

[0049] It should be noted that by identifying the convex points on the contour line of the target object E, the polygonal area B is generated, which can not only completely surround the target object E without any missing area (for example, the pixel point coordinate set of the target object E identified in step 1 is missing a small number of pixel point coordinate sets compared with the actual human body), but also can exclude the rest of the irrelevant content in the image A to be extracted to the greatest extent. In this way, when the target object E is identified based on the polygonal area B in step 3, a relatively high human body accuracy can be obtained in a relatively short calculation time.

[0050] In this embodiment, the accuracy of the recognition algorithm used in the step 1 is lower than or equal to the accuracy of the algorithm used in the step 3.

[0051] It should be noted that the identification of the target object E in step 1 and step 3 can both adopt a relatively low-precision human body extraction algorithm. The recognition accuracy of step 1 can be lower than that of step 3. In the human body extraction algorithm based on deep learning, the overall contour of the human body is relatively easy to identify, and the part that consumes the most time is how to accurately obtain the edge of the human body, because the color, shape of the actual human body edge and the color and shape of the connecting part with the background image are ever-changing, and the larger the area of ​​the background image, the longer the time required for the high-precision segmentation algorithm is usually. This is determined by the basic structure of the existing deep learning model. According to the method disclosed in the present invention, a relatively low-precision human body extraction algorithm is adopted, and the target object E is identified twice based on the image A to be extracted, so that a more accurate pixel coordinate set of the target object E can be obtained within a relatively short computing time, thereby meeting the needs of real-time human body extraction business.

[0052] In this embodiment, when identifying the convex points on the contour line of the target object E in step 1, the image A to be extracted is first reduced by T times to generate an image A', and the target object E in the image A' is identified. A ', and then the target object E A The virtual polygonal wireframe or virtual curve wireframe where the convex points on the contour line of the target object E in the image A to be extracted is magnified T times to obtain the positions of the convex points on the contour line of the target object E.

[0053] It should be noted that the image A to be extracted is reduced by T times to reduce the resolution, and then the target object E corresponding to the target object E is obtained in the reduced image A' to be extracted. A ', and then the convex points on the contour line of the target object E A 'Amplify by T times to obtain the convex points on the contour line of the target object E in the image A to be extracted, and the target object E can also be AThe virtual polygonal wireframe or virtual curve wireframe where the convex points on the contour line of the target object E in the image A to be extracted is magnified by T times to obtain the location of the convex points on the contour line of the target object E to be extracted. At this time, only the coordinate data of the convex points on the contour line are needed, which is more convenient; the operation time of the first recognition of the target object E can be shortened, and the image quality and clarity can be guaranteed when the target object E is recognized for the second time. T here can be selected according to the actual application scenario.

[0054] It should be noted that, due to various actual business situations, the original target object E in the original image A to be extracted may also need to be further scaled. For example, according to the plot of the selfie virtual background picture, it needs to be further scaled to form the target object E to meet the business requirements. At this time, the target object E may also be A The convex point on the contour line of ' is directly referenced and scaled T' times, and the coordinates are moved to make it a convex point on the contour line corresponding to the target object E formed by further scaling, so as to avoid multiple scaling and improve the calculation efficiency.

[0055] In this embodiment, when the target object E is identified based on the polygonal area B in step 3, the polygonal area B is first magnified S times to generate a polygonal area B', and the target object E in the polygonal area B' is identified. B ', then the target object E B 'Shrink it down by S times and get the target object E.

[0056] It should be noted that when extracting a human body from an image, it is difficult to obtain the human body edge with complete accuracy because the color, shape of the actual human body edge and the color and shape of the connecting part with the background image are ever-changing. Therefore, the human body extraction algorithm will reserve a certain safety area according to the changing trend of the color and shape of the human body edge pixels to prevent the extracted human body from having less content than the real human body, especially the human body extraction algorithm with relatively low accuracy. At the same time, since the image containing the human body is usually obtained by taking a camera, and the actual human body and the actual background are at different distances from the camera, limited by the existing camera technology, the human body edge and the connecting part with the background in the captured image will produce a certain range of gradient colors formed by the fusion of the human body edge color and the background connecting part color, which further aggravates the aforementioned difficulties. Therefore, compared with the actual human body, the extracted human body usually has more mixed color pixel areas at the human body edge. Based on the above reasons, it can be seen that when extracting the human body, the larger the target human body area is, the smaller the proportion of the mixed color pixel area in the target human body area is.

[0057] The polygonal area B is enlarged S times to generate the polygonal area B', and then the target object E is obtained based on the polygonal area B' B ', the proportion of the noise pixel area in the target object E can be significantly reduced, and then the acquired target object E B'Scaling down by S times can not only allow the target object to be displayed normally, but also make the noise pixel area less obvious in visual effect, so that the final target object E has a better visual effect. Here, S can be selected according to the actual application scenario.

[0058] It should be noted that, due to various actual business situations, the original target object E in the original image A to be extracted may also need to be further scaled. For example, according to the plot of the selfie virtual background picture, it needs to be further scaled to form the target object E to meet the business requirements. At this time, the target object E may also be B 'Directly scale to the same size as the target object E formed by further scaling to avoid multiple scaling and improve computing efficiency.

[0059] It should be noted that the overall process effect of processing the image A to be extracted to generate the target object E in this embodiment can be seen in Figure 2 — Figure 8 .

[0060] Example 2

[0061] A method for extracting a moving video of a target object in a video comprises the following steps: executing the method for extracting a target object in an image described in Example 1 on multiple frames of an image A to be extracted containing a target object E in the video, and synthesizing the identified multiple frames of the target object E images into a moving video of the target object E.

[0062] It should be noted that, by adopting the above technical solution, it is possible to continuously extract the human body from multiple frames of a video containing the movement of the target object E in real time and form a continuous and natural new display picture (target object E movement video) based on this.

[0063] In practice, by matching the target object E extracted from each frame of the video to a new background picture, the purpose of synthesizing a new video can be achieved, which can meet the business needs of selfies, games, etc.

[0064] Example 3

[0065] like Fig. 9 As shown, a system for extracting a target object in an image includes: a first recognition module, a region generation module, and a second recognition module;

[0066] The first recognition module is used to recognize salient points on the contour line of the target object E in the image A to be extracted;

[0067] Specifically, the target object E takes the human body as an example, and when identifying the salient points on the contour line, the existing deep learning-based human body extraction algorithm is used for identification. First, the pixel point coordinate set or the human body key points of the target object E are identified, and then the pixel point coordinate set or the human body key points are screened to screen out the salient points on the boundary of the human body area contour, such as the highest point, the lowest point, the leftmost point, and the rightmost point of the target object E;

[0068] A region generation module is used to generate a polygonal region B surrounding the target object E based on the convex points on the contour line; for example, the minimum rectangular region surrounding the target object E is generated by the highest point, the lowest point, the leftmost point and the rightmost point of the target object E; those skilled in the art should understand that other irregular polygonal regions, regions surrounded by regular curves or regions surrounded by irregular curves can also be used here;

[0069] The second recognition module recognizes the target object E based on the polygonal area B.

[0070] It should be noted that by identifying the convex points on the contour line of the target object E, the polygonal area B is generated, which can not only completely surround the target object E without any missing area (for example, the pixel point coordinate set of the target object E identified by the first recognition module is missing a small number of pixel point coordinate sets compared with the actual human body), but also can exclude the remaining irrelevant content in the image A to be extracted to the greatest extent. In this way, when the second recognition module identifies the target object E based on the polygonal area B, a relatively high human body accuracy can be obtained in a relatively short computing time.

[0071] In this embodiment, the accuracy of the recognition algorithm used by the first recognition module for recognition is lower than or equal to the accuracy of the algorithm used by the second recognition module for recognition.

[0072] It should be noted that the recognition target object E described in the first recognition module and the second recognition module can both adopt a relatively low-precision human body extraction algorithm. The recognition accuracy of the first recognition module can be lower than that of the second recognition module. In the human body extraction algorithm based on deep learning, the overall outline of the human body is easy to identify, and the part with the highest time consumption is how to accurately obtain the edge of the human body, because the color, shape of the actual human body edge and the color and shape of the connecting part with the background image are ever-changing, and the larger the area of ​​the background image, the longer the time consumption of the high-precision segmentation algorithm is usually. This is determined by the basic structure of the existing deep learning model. According to the method disclosed in the present invention, a relatively low-precision human body extraction algorithm is adopted, and the target object E is identified twice based on the image A to be extracted, so that a more accurate pixel coordinate set of the target object E can be obtained within a relatively short computing time, thereby meeting the needs of real-time human body extraction business.

[0073] In this embodiment, when the first recognition module recognizes the convex points on the contour line of the target object E, the image A to be extracted is first reduced by T times to generate an image A', and the target object E in the image A' is recognized. A ', and then the target object E A The virtual polygonal wireframe or virtual curve wireframe where the convex points on the contour line of the target object E in the image A to be extracted is magnified T times to obtain the positions of the convex points on the contour line of the target object E.

[0074] It should be noted that the image A to be extracted is reduced by T times to reduce the resolution, and then the target object E corresponding to the target object E is obtained in the reduced image A' to be extracted. A ', and then the convex points on the contour line of the target object E A 'Amplify by T times to obtain the convex points on the contour line of the target object E in the image A to be extracted, and the target object E can also be A The virtual polygonal wireframe or virtual curve wireframe where the convex points on the contour line of the target object E in the image A to be extracted is magnified by T times to obtain the location of the convex points on the contour line of the target object E to be extracted. At this time, only the coordinate data of the convex points on the contour line are needed, which is more convenient; the operation time of the first recognition of the target object E can be shortened, and the image quality and clarity can be guaranteed when the target object E is recognized for the second time. T here can be selected according to the actual application scenario.

[0075] It should be noted that, due to various actual business situations, the original target object E in the original image A to be extracted may also need to be further scaled. For example, according to the plot of the selfie virtual background picture, it needs to be further scaled to form the target object E to meet the business requirements. At this time, the target object E may also be A The convex points on the contour line of ' are directly referenced and scaled T times, and the coordinates are moved to make them become the convex points on the contour line corresponding to the target object E formed by further scaling, so as to avoid multiple scaling and improve the operation efficiency.

[0076] In this embodiment, when the second recognition module recognizes the target object E based on the polygonal area B, the polygonal area B is first magnified S times to generate a polygonal area B', and the target object E in the polygonal area B' is recognized. B ', then the target object E B 'Shrink it down by S times and get the target object E.

[0077] It should be noted that when extracting a human body from an image, it is difficult to obtain the human body edge with complete accuracy because the color, shape of the actual human body edge and the color and shape of the connecting part with the background image are ever-changing. Therefore, the human body extraction algorithm will reserve a certain safety area according to the changing trend of the color and shape of the human body edge pixels to prevent the extracted human body from having less content than the real human body, especially the human body extraction algorithm with relatively low accuracy. At the same time, since the image containing the human body is usually obtained by taking a camera, and the actual human body and the actual background are at different distances from the camera, limited by the existing camera technology, the human body edge and the connecting part with the background in the captured image will produce a certain range of gradient colors formed by the fusion of the human body edge color and the background connecting part color, which further aggravates the aforementioned difficulties. Therefore, compared with the actual human body, the extracted human body usually has more mixed color pixel areas at the human body edge. Based on the above reasons, it can be seen that when extracting the human body, the larger the target human body area is, the smaller the proportion of the mixed color pixel area in the target human body area is.

[0078] The polygonal area B is enlarged S times to generate the polygonal area B', and then the target object E is obtained based on the polygonal area B' B ', the proportion of the noise pixel area in the target object E can be significantly reduced, and then the acquired target object E B 'Scaling down by S times can not only allow the target object to be displayed normally, but also make the noise pixel area less obvious in visual effect, so that the final target object E has a better visual effect. Here, S can be selected according to the actual application scenario.

[0079] It should be noted that, due to various actual business situations, the original target object E in the original image A to be extracted may also need to be further scaled. For example, according to the plot of the selfie virtual background picture, it needs to be further scaled to form the target object E to meet business requirements. At this time, the human body E may also be B 'Directly scale to the same size as the target object E formed by further scaling to avoid multiple scaling and improve computing efficiency.

[0080] It should be noted that the overall process effect of processing the image A to be extracted to generate the target object E in this embodiment can be seen in Figure 2 — Figure 8 .

[0081] Example 4

[0082] A system for extracting a moving video of a target object in a video uses the system for extracting a target object in an image described in Example 3 to identify a target object E in multiple frames of images A to be extracted containing a human body in a video, and synthesizes the identified multiple frames of images of the target object E into a moving video of the target object E.

[0083] It should be noted that, by adopting the above technical solution, it is possible to continuously extract the human body from multiple frames of a video containing the movement of the target object E in real time and form a continuous and natural new display picture (target object E movement video) based on this.

[0084] In practice, by matching the target object E extracted from each frame of the video to a new background picture, the purpose of synthesizing a new video can be achieved, which can meet the business needs of selfies, games, etc.

[0085] Example 5

[0086] An electronic device comprises: a memory and a processor, wherein the processor is connected to the memory;

[0087] The memory is used to store programs;

[0088] The processor calls the program stored in the memory to execute the method for extracting the target object in the image described in Embodiment 1.

[0089] It should be noted that the electronic device may be, but is not limited to, a personal computer (PC), a tablet computer, a mobile phone, a mobile internet device (MID), and the like.

[0090] It should be noted that the processor, memory and other components that may appear in the electronic device are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, the processor, memory and other components that may appear may be electrically connected to each other via one or more communication buses or signal lines.

[0091] Example 6

[0092] A computer-readable storage medium stores a computer program, which, when executed by a computer, executes the method for extracting a target object in an image described in an embodiment.

[0093] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0094] In several embodiments provided in the present application, it should be understood that the disclosed system and method can also be implemented in other ways. The system embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0095] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0096] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a laptop, a server, a mobile phone, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0097] Example 7

[0098] A method for extracting feature points on a target object in an image. After executing the method for extracting a target object in an image disclosed in Example 1, feature points are identified from the obtained target object E.

[0099] It should be noted that after the target object E is extracted, the feature points are identified, which can effectively avoid the interference of the background on the feature point identification of the target object E. For example, when the target object E is a human body, the interference of the background color can be shielded when identifying feature points such as wrist joints and larynx points.

[0100] Example 8

[0101] A method for extracting a local area image on a target object. After executing the method for extracting feature points on a target object E in an image disclosed in Example 7, a circular area is established that encloses the area to be extracted with any feature point close to the local area to be extracted as the center of the circle, and the entire circular area is scanned with the radius of the circular area as a scanning line. A combination of scanning line segments that meet the characteristics of the local area to be extracted is taken to form an extracted local area image.

[0102] For example, when the target object E is a human body and the part to be extracted is a hand, the wrist joint point is taken as the center of the circle, and a radius is estimated to make the center area of ​​the circle. The estimated radius can be larger to avoid the situation where the hand cannot be included. Then, the matching scan line segments are combined based on the skin color characteristics of the hand to extract the image of the hand. This can effectively reduce the recognition range when extracting the local image and improve the speed of local image extraction.

[0103] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any simple modification, change and equivalent structural change made to the above embodiment based on the technical essence of the present invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. A method for extracting target objects in an image, It is characterized in that The following steps are involved: Step 1: Identify the salient points on the contour line of the target object E in the image A to be extracted; Step 2: Generate a polygonal area B surrounding the target object E based on the convex points on the contour line; Step 3: Identify the target object E based on the polygonal area B.

2. A method for extracting a target object in an image according to claim 1, It is characterized in that The polygonal area B is the smallest rectangular area surrounding the target object E.

3. A method for extracting a target object in an image according to claim 1, It is characterized in that When identifying the salient points on the contour line of the target object E in step 1, the image A to be extracted is first reduced by T times to generate an image A', and the target object E in the image A' is identified. A ', and then the target object E A The virtual polygonal wireframe or virtual curve wireframe where the convex points on the contour line of the target object E in the image A to be extracted is magnified T times to obtain the positions of the convex points on the contour line of the target object E.

4. A method for extracting a target object in an image according to claim 1, It is characterized in that When the target object E is identified based on the polygonal area B in step 3, the polygonal area B is first magnified S times to generate a polygonal area B', and the target object E in the polygonal area B' is identified. B ', then the target object E B 'Shrink it down by S times and get the target object E.

5. A method for extracting feature points on a target object in an image, It is characterized in that After executing the method for extracting a target object in an image as claimed in any one of claims 1 to 4, feature points are identified from the obtained target object E.

6. A method for extracting a local area image of a target object, It is characterized in that After executing the method for extracting feature points on the target object E in the image as described in claim 5, a circular area enclosing the area to be extracted is established with any feature point close to the local area to be extracted as the center, and the entire circular area is scanned with the radius of the circular area as the scanning line, and the scanning line segments that meet the characteristics of the local area to be extracted are combined to form an extracted local area image.

7. A method for extracting motion video of a target object in a video, It is characterized in that The method for extracting target objects in images as claimed in any one of claims 1 to 4 is performed on multiple frames of images A to be extracted containing human bodies in a video, and the identified multiple frames of target object E images are synthesized into a motion video of the target object E.

8. A system for extracting target objects from images. It is characterized in that include: a first recognition module, a region generation module, and a second recognition module; The first recognition module is used to recognize salient points on the contour line of the target object E in the image A to be extracted; A region generation module, used to generate a polygonal region B surrounding a target object E based on convex points on the contour line; The second recognition module recognizes the target object E based on the polygonal area B.

9. A system for extracting a target object in an image according to claim 8, It is characterized in that The accuracy of the recognition algorithm used by the first recognition module for recognition is lower than or equal to the accuracy of the algorithm used by the second recognition module for recognition.

10. A system for extracting a target object in an image according to claim 8, It is characterized in that When the first recognition module recognizes the convex points on the contour line of the target object E, the image A to be extracted is first reduced by T times to generate an image A', and the target object E in the image A' is recognized. A ', and then the target object E A The virtual polygonal wireframe or virtual curve wireframe where the convex points on the contour line of the target object E in the image A to be extracted is magnified T times to obtain the positions of the convex points on the contour line of the target object E.

11. A system for extracting a target object in an image according to claim 8, It is characterized in that When the second recognition module recognizes the target object E based on the polygonal area B, the polygonal area B is first magnified S times to generate a polygonal area B', and the target object E in the polygonal area B' is recognized. B ', then the target object E B 'Shrink it down by S times and get the target object E.

12. A system for extracting motion video of a target object in a video. It is characterized in that The system for extracting target objects in images as described in any one of claims 8 to 11 is used to identify the target object E in multiple frames of images A to be extracted containing human bodies in the video, and the multiple frames of target object E images obtained by identification are synthesized into a motion video of the target object E.

13. An electronic device, It is characterized in that include: A memory and a processor, wherein the processor is connected to the memory; The memory is used to store programs; The processor calls the program stored in the memory to execute the method according to any one of claims 1 to 7.

14. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and when the computer program is executed by a computer, the method according to any one of claims 1 to 7 is executed.