CN110796664A - Image processing method, image processing device, electronic equipment and computer readable storage medium - Google Patents

Image processing method, image processing device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN110796664A
CN110796664A CN201910974930.XA CN201910974930A CN110796664A CN 110796664 A CN110796664 A CN 110796664A CN 201910974930 A CN201910974930 A CN 201910974930A CN 110796664 A CN110796664 A CN 110796664A
Authority
CN
China
Prior art keywords
target object
image
frame
image frame
calculating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910974930.XA
Other languages
Chinese (zh)
Other versions
CN110796664B (en
Inventor
吕绍辉
李小奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910974930.XA priority Critical patent/CN110796664B/en
Publication of CN110796664A publication Critical patent/CN110796664A/en
Application granted granted Critical
Publication of CN110796664B publication Critical patent/CN110796664B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • 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/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/107Static hand or arm
    • 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/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Abstract

The disclosure discloses an image processing method, an image processing device, an electronic device and a computer-readable storage medium. The image processing method comprises the following steps: acquiring a first image frame of a video image, wherein the first image frame is an image frame played by the video image at the current moment; in response to detecting that a target object is included in the first image frame, segmenting the target object from the first image frame to obtain a target object image; acquiring a circumscribed rectangle frame of the target object in the first image frame; calculating the drawing size and the drawing position of the target object image in the first image frame according to the circumscribed rectangle frame; and saving the target object image, the drawing size of the target object image and the drawing position of the target object image in a cache. By the method, the technical problem that the video effect cannot be simply and quickly generated in the prior art is solved.

Description

Image processing method, image processing device, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of image processing, and in particular, to an image processing method and apparatus, an electronic device, and a computer-readable storage medium.
Background
With the development of computer networks and the popularization of smart phones, common users cannot express their emotions by using monotonous pictures and words. The video is deeply loved by users in order to present more abundant and various contents and forms and bring visual feelings, and is gradually popular, and it is gradually a trend that ordinary users make original videos. But on the other hand, the expression form of the original self-timer video is flat and tasteless, and meanwhile, the application of the video special effect in the film and television works is more and more abundant, the content expression form is more diversified, and the video persistence is successful support and guarantee of the film and television works.
However, the existing video special effect production is generally finished by recording a video first and then performing post production, and the displayed special effect is fixed and can only be played until the end according to the preset time logic; and the threshold of post-production is higher, so that a common user cannot quickly generate a special effect or produce a complicated special effect. Therefore, how to simply and rapidly generate the video effect becomes a technical problem to be solved urgently.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, an embodiment of the present disclosure provides an image processing method, including:
acquiring a first image frame of a video image, wherein the first image frame is an image frame played by the video image at the current moment;
in response to detecting that a target object is included in the first image frame, segmenting the target object from the first image frame to obtain a target object image;
acquiring a circumscribed rectangle frame of the target object in the first image frame;
calculating the drawing size and the drawing position of the target object image in the first image frame according to the circumscribed rectangle frame;
and saving the target object image, the drawing size of the target object image and the drawing position of the target object image in a cache.
In a second aspect, an embodiment of the present disclosure provides an image processing apparatus, including:
the first image frame acquisition module is used for acquiring a first image frame of a video image, wherein the first image frame is an image frame played by the video image at the current moment;
a target object image segmentation module, configured to, in response to detecting that a target object is included in the first image frame, segment the target object from the first image frame to obtain a target object image;
the rectangular frame acquisition module is used for acquiring a circumscribed rectangular frame of the target object in the first image frame;
the drawing attribute calculation module is used for calculating the drawing size and the drawing position of the target object image in the first image frame according to the circumscribed rectangle frame;
and the target object image storage module is used for storing the target object image, the drawing size of the target object image and the drawing position of the target object image into a cache.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the image processing method of any of the preceding first aspects.
In a fourth aspect, the present disclosure provides a non-transitory computer-readable storage medium, which stores computer instructions for causing a computer to execute the image processing method according to any one of the foregoing first aspects.
The disclosure discloses an image processing method, an image processing device, an electronic device and a computer-readable storage medium. The image processing method comprises the following steps: acquiring a first image frame of a video image, wherein the first image frame is an image frame played by the video image at the current moment; in response to detecting that a target object is included in the first image frame, segmenting the target object from the first image frame to obtain a target object image; acquiring a circumscribed rectangle frame of the target object in the first image frame; calculating the drawing size and the drawing position of the target object image in the first image frame according to the circumscribed rectangle frame; and saving the target object image, the drawing size of the target object image and the drawing position of the target object image in a cache. By the method, the technical problem that the video effect cannot be simply and quickly generated in the prior art is solved.
The foregoing is a summary of the present disclosure, and for the purposes of promoting a clear understanding of the technical means of the present disclosure, the present disclosure may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a flowchart of an embodiment of an image processing method provided by the present disclosure;
fig. 2 is a flowchart illustrating a specific example of step S104 in an embodiment of an image processing method provided in the present disclosure;
fig. 3 is a flowchart illustrating a specific example of step S201 in an embodiment of an image processing method provided in the present disclosure;
fig. 4 is a flowchart of a specific example of calculating a rendering offset in an embodiment of an image processing method provided in the present disclosure;
FIG. 5 is a flow chart of a further embodiment of an image processing method provided by the present disclosure;
fig. 6 is a flowchart of a specific example of step S503 in an embodiment of an image processing method provided in the present disclosure;
fig. 7 is a schematic structural diagram of an embodiment of an image processing apparatus according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device provided according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart of an embodiment of an image processing method provided in an embodiment of the present disclosure, where the image processing method provided in this embodiment may be executed by an image processing apparatus, the image processing apparatus may be implemented as software, or implemented as a combination of software and hardware, and the image processing apparatus may be integrated in a certain device in an image processing system, such as an image processing server or an image processing terminal device. As shown in fig. 1, the method comprises the steps of:
step S101, acquiring a first image frame of a video image;
the first image frame is an image frame played by the video image at the current moment;
optionally, in this step, the video image is a video image received from an image sensor. The image sensor refers to various devices capable of acquiring images, and typical image sensors are video cameras, cameras and the like. In this embodiment, the image sensor may be a camera on the terminal device, such as a front-facing or rear-facing camera on a smart phone, and an image acquired by the camera may be directly displayed on a display screen of the smart phone.
Optionally, in this step, the video image is a video image file received from a memory, and the video image file is a video recorded in advance and stored in the memory. Optionally, the memory is a local memory or a network memory. Before this step, the video image file transmitted from the memory is received and displayed on the display device of the apparatus.
In this step, a first image frame of the video image is obtained, where the first image frame refers to an image frame played by the video image at the current time. The video image comprises a plurality of image frames, the image frames are played at a certain speed to form the video image, typically 30 image frames are played every second, when the video image is played, the image frames are replaced every 33 milliseconds, the first image frame refers to the image frame played at the current moment, such as 0 second just played, the first image frame is the first frame of the whole video image, when the first image frame is played to the 1 st second, the first image frame is the 31 th frame of the whole video image, and so on. It is understood that the frame rate (number of frames played per second) of the video image can be any value, and the above example is only an example and does not limit the disclosure in any way.
Step S102, in response to the fact that the first image frame comprises a target object, segmenting the target object from the first image frame to obtain a target object image;
the target object may be any preset object to be recognized from the video image, and a typical target object may be a palm.
Identifying the target object in the video image may use any target identification algorithm. Typically, as based on deep learning, if the target object is a palm, training a neural network by using an image with the palm, classifying a first image frame in the acquired video images by using the trained neural network to determine whether the first image frame contains the palm, and when it is determined that the first image frame contains the palm, detecting a key point of the palm by using a palm detection algorithm to determine a contour of the palm; or training a neural network by using an image marked with a palm outline, performing regression of the outline on each image frame in the video image by using the trained neural network to reduce the range of the palm, and detecting key points of the palm by using a palm detection algorithm to determine the outline of the palm; or training a neural network by using the image marked with the palm key points, performing palm key point regression on each image frame in the video image by using the trained neural network to determine whether the image frame contains the palm or not, and determining the outline of the palm according to the key points.
It is to be understood that the palm and the recognition method are only examples and do not limit the present disclosure, and the target object and the suitable recognition algorithm for the target object may be selected in advance according to the effect to be achieved and the scene.
Segmenting a target object from the first image frame after determining that the target object is included in the first image frame. While determining whether the target object is included in the first image frame, it is determined whether the first image frame includes certain features of the target object, from which the contour of the target object can be determined so as to segment the target object from the first image frame.
Optionally, the identifying and segmenting may also be performed in the same step, typically, each pixel in the first image frame is classified by using a trained convolutional neural network, and whether the pixel is a pixel in the palm is determined, when all the pixels are classified, if the first image frame includes the palm, the image of the palm is also segmented.
In this step, only one image of the target object is recognized, the position information and the size information of which are not recorded in the process, and the image of the target object has the same size as the first image frame, and at this time, the size and the position of the image of the target object in the first image frame cannot be known, which is inconvenient for the subsequent further processing, so that the size and the position of the target object in the first image frame need to be further determined in the subsequent step.
Step S103, acquiring a circumscribed rectangle frame of the target object in the first image frame;
in this step, typically, a target object detection algorithm may be used to generate a bounding rectangle of the target object in the first image frame, the target object detection algorithm generates a plurality of rectangles in the first image frame, and then calculates how many features of the target object are included in the rectangles, and the rectangle including the most features of the target object is taken as the bounding rectangle of the target object in the first image frame. The circumscribed rectangle frame comprises global position information and size information of the circumscribed rectangle frame in the first image frame.
Optionally, coordinates of four corner points of a circumscribed rectangle frame in the coordinate system of the first image frame are used to represent the position and size of the circumscribed rectangle frame in the first image frame. Typically, the coordinates of the four corner points are respectively coordinates (left, top) of an upper left corner point, coordinates (right, top) of an upper right corner point, coordinates (right, bottom) of a lower right corner point, and coordinates (left, bottom) of a lower left corner point, where the target object is in the external rectangular frame in the first image frame for obtaining the coordinates of the four corner points. It is understood that the coordinates of the four corner points are absolute coordinates of the four corner points in the first image frame, typically, the first image frame is a 720 × 1280 pixel image frame, then the values of left and right are in the range of [0,720], and the values of top and bottom are in the range of [0,1280 ].
Optionally, the obtaining of the circumscribed rectangle frame of the target object in the first image frame is to obtain a side length and a coordinate of a center position of the circumscribed frame. The side length and the center position coordinate can be calculated from the coordinates or can be directly obtained through a target identification algorithm, and details are not repeated here.
It is understood that, in this step, the obtaining of the circumscribed rectangle frame of the target object in the first image frame may use any method to obtain the circumscribed rectangle and the parameters representing the size and the position of the circumscribed rectangle, which are not described herein again, and the foregoing optional embodiments do not constitute a limitation to the present disclosure.
Step S104, calculating the drawing size and the drawing position of the target object image in the first image frame according to the circumscribed rectangle frame;
optionally, the calculating a drawing size and a drawing position of the target object image in the first image frame according to the circumscribed rectangle frame includes:
step S201, calculating the width and height of the circumscribed rectangle frame according to the rectangle information of the circumscribed rectangle frame;
step S202, setting a calculation matrix of the drawing size according to the width and the height;
step S203, calculating a drawing offset according to the rectangle information of the circumscribed rectangle frame, wherein the drawing offset represents the offset from the center of the circumscribed rectangle frame to the coordinate center of the first image frame.
Optionally, the step S201 further includes:
s301, acquiring coordinates of four corner points of an external rectangular frame;
step S302, carrying out normalization processing on the coordinates of the four corner points;
step S303, calculating the width and height of the circumscribed rectangle frame in the normalized coordinate system according to the coordinates after the normalization processing.
Typically, the size of the first image frame is 720 × 1280 pixels, and the coordinates of the four corner points of the circumscribed rectangle frame obtained in step S301 are: coordinates (left, top) of an upper left corner point, coordinates (right, top) of an upper right corner point, coordinates (right, bottom) of a lower right corner point, and coordinates (left, bottom) of a lower left corner point; then in step S302, the four coordinates are normalized according to the following formula:
left1=left/720,
right1=right/720,
top1=top/1280,
bottom1=bottom/1280,
the above left1, right1, top1, bottom1 are the values of left, right, top and bottom after normalization. From the above values, the width and height of the bounding rectangle after normalization can be calculated, and in step S303, the following is calculated:
w=right1-left1;
h=top1-bottom1;
wherein w is the width of the circumscribed rectangle frame in the normalized coordinate system, and h is the height of the circumscribed rectangle frame in the normalized coordinate system.
Optionally, the setting of the calculation matrix of the drawing size according to the width and the height includes:
setting the calculation matrix of the drawing size as follows:
this matrix is used in the lower step to scale the image of the target object.
Optionally, the calculating a drawing offset according to the rectangle information of the circumscribed rectangle frame includes:
step S401, calculating the center coordinate of the rectangular frame according to the normalized coordinate;
step S402, calculating a position difference between the center coordinates and coordinates of the origin of the coordinate system after the normalization.
After normalization, the coordinates of the center of the rectangular frame are x1 ═ right1+ left1)/2 and y1 ═ top1+ bottom1)/2, and after the normalization of the coordinate system of the first image frame, the range of the coordinate system is limited to [0,1], so that the center point of the coordinate system is (0.5 ); accordingly, a position difference between the center coordinate and the coordinate of the origin of the coordinate system after the normalization can be calculated, X ═ ((right1+ left1)/2) -0.5, and Y ═ ((top1+ bottom1)/2) -0.5. In practical implementation, there are some schemes to normalize the coordinate system to [ -1,1], so that the position difference needs to be doubled with respect to the coordinate of [0,1], and then X is right1+ left1-1, and Y is top1+ bottom 1-1. When normalized to other coordinate ranges, the difference calculated in the coordinate system of [0,1] can be amplified in the above manner, and will not be described herein again.
Step S105, saving the target object image, the rendering size of the target object image, and the rendering position of the target object image in a cache.
In this step, the target object image and the drawing size of the target object image and the drawing position of the target object image at the current time are saved in a cache.
Optionally, the buffer includes a plurality of buffer locations, the buffer is implemented by using a data structure of a queue, the image of the target object is stored in the queue according to a sequence (i.e., a time sequence) of image frames, when all the plurality of buffer locations of the buffer are full, the target object image at a head location in the queue is deleted, the target object image at a second location in the queue is used as a head of the queue, and the target object image at the current time is stored at a tail of the queue.
And the rendering size of the target object image and the rendering position of the target object image are also stored in the cache, and according to step S104, optionally, the rendering size of the target object image is a calculation matrix of the rendering size, and the rendering position of the target object image is a position difference between the center coordinate of the rectangular frame and the coordinate of the origin of the coordinate system after normalization. Of course, the drawing size of the target object image may also be a scaling ratio of the target object image, and the drawing position of the target object image may be a calculated coordinate value, which is not described herein again.
In the above-described embodiment, the image processing method divides an image of a target object in a video image, and calculates a parameter indicating a size of the image of the target object in a first image frame and a parameter indicating a position of the image of the target object in the first image frame. Therefore, under the condition that the divided target object image has no size and position information, the size and the position information of the target object image in the first image frame can be calculated through the attribute of the target object in the circumscribed rectangular frame of the first image frame and stored, and the problem of acquiring and storing the attribute of the local image in the global image is solved.
Furthermore, various effects in the video can be realized by using the information stored in the cache. As shown in fig. 5, the image processing method further includes:
step S501, in response to that the number of target object images stored in the cache at the current moment reaches M, extracting N target object images from the M target object images as target object images to be processed;
step S502, obtaining the N target object images and the drawing sizes and the drawing positions of the N target object images in the first image frame from the cache;
step S503, superimposing the N target object images on the first image frame according to the drawing sizes and the drawing positions of the N target object images in the first image frame.
In step S501, M and N are both integers greater than 0, and M is greater than N. Typically, M is 30, N is 6, M may be a size of the buffer, that is, the length of the queue in step S105, when 30 buffer locations of the buffer are full, target object images at 6 locations are randomly obtained from the buffer, the size of the target object image is the same as that of the first image frame, for example, the size of the first image frame is 720 x 1280, and the size and the location of the target object image in the corresponding first image frame need to be known if the effect of superimposing the target object image before the current time in the first image frame is to be achieved. Therefore, in step S502, the rendering size matrix and the position difference value corresponding to the 6 target object images and the 6 target object images are obtained from the buffer. In step S503, the superimposing the N target object images on the first image frame according to the drawing sizes and the drawing positions of the N target object images in the first image frame includes: calculating N actual drawing images corresponding to the N target object images according to the calculation matrixes of the N drawing sizes corresponding to the N target object images; calculating N actual drawing positions of the N actual drawing images according to N position difference values corresponding to the N target object images; superimposing the N actual rendered images on the first image frame according to the N actual rendered positions. Taking the above example as an example, scaling the 6 target object images according to the 6 rendering size matrices corresponding to the 6 target object images to obtain 6 actual rendering images, calculating 6 actual rendering positions of the 6 target object images in the first frame image according to the 6 position difference values, and then rendering the 6 actual rendering images at the actual rendering positions, so as to superimpose the target object images at 6 moments before the current moment in the first image frame at the current moment, thereby achieving the ghost effect of the target object. In the following, a scaling process of a target object image is described according to an actual example, and in a coordinate system after normalization, coordinates of four corner points of the circumscribed rectangle frame are respectively (0.1,0.6), (0.3,0.6), (0.1,0.2), (0.3,0.2), and a width of the circumscribed rectangle frame can be calculated by the coordinates of the four corner points: w is 0.3-0.1-0.2, h is 0.6-0.2-0.4, i.e. the plotting size calculation matrix is:
Figure BDA0002233290510000091
normalizing the image of the target object, and setting the position of each pixel point on the normalized image of the target object as pos, then
Figure BDA0002233290510000092
pos1 is the coordinates of the pixels of the zoomed target object image, and the set of pos1 is the zoomed target object image. The position of each pixel point in pos1 plus the position difference can obtain the drawing position of each pixel point in the zoomed target object image, and the state of the target object image in the corresponding first image frame can be drawn by drawing each pixel point in the zoomed target object image at the calculated drawing position. The position difference may be calculated according to the method described in step S402, and will not be described herein.
Further, in order to achieve a more realistic effect, the superimposing, according to the rendering size and the rendering position of the N target object images in the first image frame, the N target object images on the first image frame further includes:
step S601, obtaining N transparencies corresponding to the N target object images respectively;
step S602, respectively scaling the N target object images to the corresponding drawing sizes;
step S603, drawing the N target object images after scaling at the positions of the first image frame indicated by the drawing positions according to the N transparency levels.
In the above step, N transparencies corresponding to the N target object images are obtained, where the N transparencies may be preset or calculated according to parameters. Typically, if N is 6, 6 transparencies may be preset, and the 6 target object images are sorted according to time, where the earlier the time, the higher the transparency corresponding to the target object image is, and the later the time, the lower the transparency corresponding to the target object image is; then, in step S602, the 6 target object images are scaled, and the description in step S503 can be seen specifically; in step S603, the 6 target object images are drawn at the drawing positions with their corresponding transparency levels. In this embodiment, since transparency is added, the more advanced the transparency of the target object image is, the more various true ghost effects have been achieved.
It is understood that the above steps S501 to S503 may not be performed after step S105, and as long as the target object is identified to be included in the first image frame, it may be determined whether the number of target object images saved in the buffer memory reaches M, and if M is reached, steps S502 and S503 may be performed next. The execution of the method does not conflict with the processing of the target object image in the image frame at the current moment, and the method can be executed before or after any step after the target object is identified, as long as the target object image, the drawing size of the target object image and the drawing position of the target object image are stored in the cache, and the N target object images and the drawing sizes and the drawing positions of the N target object images in the first image frame, which are obtained from the cache, do not conflict with each other, so that the method is not described herein again.
The disclosure discloses an image processing method, an image processing device, an electronic device and a computer-readable storage medium. The image processing method comprises the following steps: acquiring a first image frame of a video image, wherein the first image frame is an image frame played by the video image at the current moment; in response to detecting that a target object is included in the first image frame, segmenting the target object from the first image frame to obtain a target object image; acquiring a circumscribed rectangle frame of the target object in the first image frame; calculating the drawing size and the drawing position of the target object image in the first image frame according to the circumscribed rectangle frame; and saving the target object image, the drawing size of the target object image and the drawing position of the target object image in a cache. By the method, the technical problem that the video effect cannot be simply and quickly generated in the prior art is solved.
In the above, although the steps in the above method embodiments are described in the above sequence, it should be clear to those skilled in the art that the steps in the embodiments of the present disclosure are not necessarily performed in the above sequence, and may also be performed in other sequences such as reverse, parallel, and cross, and further, on the basis of the above steps, other steps may also be added by those skilled in the art, and these obvious modifications or equivalents should also be included in the protection scope of the present disclosure, and are not described herein again.
Fig. 7 is a schematic structural diagram of an embodiment of an image processing apparatus according to an embodiment of the present disclosure, and as shown in fig. 7, the apparatus 700 includes: a first image frame acquisition module 701, a target object image segmentation module 702, a rectangular frame acquisition module 703, a rendering attribute calculation module 704, and a target object image saving module 705. Wherein the content of the first and second substances,
a first image frame obtaining module 701, configured to obtain a first image frame of a video image, where the first image frame is an image frame played by the video image at a current time;
a target object image segmentation module 702, configured to, in response to detecting that a target object is included in the first image frame, segment the target object from the first image frame to obtain a target object image;
a rectangle frame acquiring module 703, configured to acquire a circumscribed rectangle frame of the target object in the first image frame;
a drawing attribute calculation module 704, configured to calculate, according to the circumscribed rectangle frame, a drawing size and a drawing position of the target object image in the first image frame;
the target object image saving module 705 is configured to save the target object image, the drawing size of the target object image, and the drawing position of the target object image in the cache.
Further, the image processing apparatus 700 further includes:
the extraction module is used for extracting N target object images from the M target object images as target object images to be processed in response to the fact that the number of the target object images stored in the cache at the current moment reaches M, wherein M and N are integers larger than 0, and M is larger than N;
a drawing parameter obtaining module, configured to obtain, from the cache, the N target object images and drawing sizes and drawing positions of the N target object images in the first image frame;
and the superposition module is used for superposing the N target object images on the first image frame according to the drawing sizes and the drawing positions of the N target object images in the first image frame.
Further, the stacking module further includes:
a transparency obtaining module, configured to obtain N transparencies corresponding to the N target object images, respectively;
the zooming module is used for respectively zooming the N target object images to the corresponding drawing sizes;
and the first drawing module is used for drawing the N target object images after being scaled on the position of the first image frame indicated by the drawing position according to the N transparency.
Further, the drawing attribute calculation module 704 further includes:
the width and height calculation module is used for calculating the width and height of the circumscribed rectangular frame according to the rectangular information of the circumscribed rectangular frame;
the matrix setting module is used for setting a calculation matrix of the drawing size according to the width and the height;
and the offset calculation module is used for calculating a drawing offset according to the rectangle information of the circumscribed rectangle frame, wherein the drawing offset represents the offset from the center of the circumscribed rectangle frame to the coordinate center of the first image frame.
Further, the width and height calculating module further includes:
the corner point coordinate acquisition module is used for acquiring coordinates of four corner points of the external rectangular frame;
the corner point coordinate normalization module is used for normalizing the coordinates of the four corner points;
and the normalized width and height calculating module is used for calculating the width and height of the circumscribed rectangle frame in a normalized coordinate system according to the coordinates after the normalization processing.
Further, the matrix setting module is further configured to: setting the calculation matrix of the drawing size as follows:
Figure BDA0002233290510000121
wherein w is the width of the circumscribed rectangle frame in the normalized coordinate system, and h is the height of the circumscribed rectangle frame in the normalized coordinate system.
Further, the offset calculation module further includes:
the central coordinate calculation module is used for calculating the central coordinate of the rectangular frame according to the normalized coordinate;
and the position difference value calculating module is used for calculating the position difference value between the center coordinate and the coordinate of the origin of the coordinate system after normalization.
Further, the stacking module further includes:
an actual drawing image calculation module, configured to calculate N actual drawing images corresponding to the N target object images according to N drawing size calculation matrices corresponding to the N target object images;
the actual drawing position calculation module is used for calculating N actual drawing positions of the N actual drawing images according to N position difference values corresponding to the N target object images;
and the second drawing module is used for superposing the N actual drawing images on the first image frame according to the N actual drawing positions.
The apparatus shown in fig. 7 can perform the method of the embodiment shown in fig. 1-6, and the detailed description of this embodiment can refer to the related description of the embodiment shown in fig. 1-6. The implementation process and technical effect of the technical solution refer to the descriptions in the embodiments shown in fig. 1 to 6, and are not described herein again.
Referring now to FIG. 8, shown is a schematic diagram of an electronic device 800 suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 8, an electronic device 800 may include a processing means (e.g., central processing unit, graphics processor, etc.) 801 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage means 806 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the electronic apparatus 800 are also stored. The processing apparatus 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
Generally, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage 806 including, for example, magnetic tape, hard disk, etc.; and a communication device 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 8 illustrates an electronic device 800 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 809, or installed from the storage means 806, or installed from the ROM 802. The computer program, when executed by the processing apparatus 801, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a video image, the video image comprising a plurality of image frames; identifying a target object in an image frame of the video image; in response to identifying a first target object, displaying a first virtual object having a first shape at a first location in the video image; in response to identifying a second target object, displaying the second virtual object having the second shape at a second location in the video image; when the distance between the first target object and the second target object is less than a first threshold value, combining the first virtual object and the second virtual object to form a third shape of the first virtual object and the second virtual object, wherein the third shape is formed by combining the first shape and the second shape.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided an image processing method including:
acquiring a first image frame of a video image, wherein the first image frame is an image frame played by the video image at the current moment;
in response to detecting that a target object is included in the first image frame, segmenting the target object from the first image frame to obtain a target object image;
acquiring a circumscribed rectangle frame of the target object in the first image frame;
calculating the drawing size and the drawing position of the target object image in the first image frame according to the circumscribed rectangle frame;
and saving the target object image, the drawing size of the target object image and the drawing position of the target object image in a cache.
Further, the method further comprises:
in response to that the number of target object images stored in the cache at the current moment reaches M, extracting N target object images from the M target object images as target object images to be processed, wherein M and N are integers greater than 0, and M is greater than N;
acquiring the N target object images and the drawing sizes and the drawing positions of the N target object images in the first image frame from the cache;
and superposing the N target object images on the first image frame according to the drawing sizes and the drawing positions of the N target object images in the first image frame.
Further, the superimposing, according to the drawing sizes and the drawing positions of the N target object images in the first image frame, the N target object images on the first image frame includes:
acquiring N transparencies corresponding to the N target object images respectively;
respectively scaling the N target object images to the corresponding drawing sizes;
and drawing the N target object images after scaling on the position of the first image frame indicated by the drawing position according to the N transparency.
Further, the calculating the drawing size and the drawing position of the target object image in the first image frame according to the circumscribed rectangle frame includes:
calculating the width and the height of the circumscribed rectangular frame according to the rectangular information of the circumscribed rectangular frame;
setting a calculation matrix of a drawing size according to the width and the height;
calculating a drawing offset according to the rectangle information of the circumscribed rectangle frame, wherein the drawing offset represents an offset from the center of the circumscribed rectangle frame to the coordinate center of the first image frame;
calculating the drawing size according to the calculation matrix;
and calculating the drawing position according to the offset.
Further, the calculating the width and the height of the circumscribed rectangle frame according to the rectangle information of the circumscribed rectangle frame includes:
acquiring coordinates of four corner points of an external rectangular frame;
carrying out normalization processing on the coordinates of the four corner points;
and calculating the width and the height of the circumscribed rectangle frame under a normalized coordinate system according to the coordinates after the normalization processing.
Further, the setting of the calculation matrix of the drawing size according to the width and the height includes:
setting the calculation matrix of the drawing size as follows:
Figure BDA0002233290510000171
wherein w is the width of the circumscribed rectangle frame in the normalized coordinate system, and h is the height of the circumscribed rectangle frame in the normalized coordinate system.
Further, the calculating a drawing offset according to the rectangle information of the circumscribed rectangle frame includes:
calculating the center coordinate of the rectangular frame according to the normalized coordinate;
calculating a position difference between the center coordinates and coordinates of an origin of the coordinate system after the normalization.
Further, the superimposing, according to the drawing sizes and the drawing positions of the N target object images in the first image frame, the N target object images on the first image frame includes:
calculating N actual drawing images corresponding to the N target object images according to the calculation matrixes of the N drawing sizes corresponding to the N target object images;
calculating N actual drawing positions of the N actual drawing images according to N position difference values corresponding to the N target object images;
superimposing the N actual rendered images on the first image frame according to the N actual rendered positions.
According to one or more embodiments of the present disclosure, there is provided an image processing apparatus including:
the first image frame acquisition module is used for acquiring a first image frame of a video image, wherein the first image frame is an image frame played by the video image at the current moment;
a target object image segmentation module, configured to, in response to detecting that a target object is included in the first image frame, segment the target object from the first image frame to obtain a target object image;
the rectangular frame acquisition module is used for acquiring a circumscribed rectangular frame of the target object in the first image frame;
the drawing attribute calculation module is used for calculating the drawing size and the drawing position of the target object image in the first image frame according to the circumscribed rectangle frame;
and the target object image storage module is used for storing the target object image, the drawing size of the target object image and the drawing position of the target object image into a cache.
Further, the image processing apparatus further includes:
the extraction module is used for extracting N target object images from the M target object images as target object images to be processed in response to the fact that the number of the target object images stored in the cache at the current moment reaches M, wherein M and N are integers larger than 0, and M is larger than N;
a drawing parameter obtaining module, configured to obtain, from the cache, the N target object images and drawing sizes and drawing positions of the N target object images in the first image frame;
and the superposition module is used for superposing the N target object images on the first image frame according to the drawing sizes and the drawing positions of the N target object images in the first image frame.
Further, the stacking module further includes:
a transparency obtaining module, configured to obtain N transparencies corresponding to the N target object images, respectively;
the zooming module is used for respectively zooming the N target object images to the corresponding drawing sizes;
and the first drawing module is used for drawing the N target object images after being scaled on the position of the first image frame indicated by the drawing position according to the N transparency.
Further, the rendering attribute calculation module further includes:
the width and height calculation module is used for calculating the width and height of the circumscribed rectangular frame according to the rectangular information of the circumscribed rectangular frame;
the matrix setting module is used for setting a calculation matrix of the drawing size according to the width and the height;
and the offset calculation module is used for calculating a drawing offset according to the rectangle information of the circumscribed rectangle frame, wherein the drawing offset represents the offset from the center of the circumscribed rectangle frame to the coordinate center of the first image frame.
Further, the width and height calculating module further includes:
the corner point coordinate acquisition module is used for acquiring coordinates of four corner points of the external rectangular frame;
the corner point coordinate normalization module is used for normalizing the coordinates of the four corner points;
and the normalized width and height calculating module is used for calculating the width and height of the circumscribed rectangle frame in a normalized coordinate system according to the coordinates after the normalization processing.
Further, the matrix setting module is further configured to: setting the calculation matrix of the drawing size as follows:
Figure BDA0002233290510000191
wherein w is the width of the circumscribed rectangle frame in the normalized coordinate system, and h is the height of the circumscribed rectangle frame in the normalized coordinate system.
Further, the offset calculation module further includes:
the central coordinate calculation module is used for calculating the central coordinate of the rectangular frame according to the normalized coordinate;
and the position difference value calculating module is used for calculating the position difference value between the center coordinate and the coordinate of the origin of the coordinate system after normalization.
Further, the stacking module further includes:
an actual drawing image calculation module, configured to calculate N actual drawing images corresponding to the N target object images according to N drawing size calculation matrices corresponding to the N target object images;
the actual drawing position calculation module is used for calculating N actual drawing positions of the N actual drawing images according to N position difference values corresponding to the N target object images;
and the second drawing module is used for superposing the N actual drawing images on the first image frame according to the N actual drawing positions.
According to one or more embodiments of the present disclosure, there is provided an electronic device including: at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any of the image processing methods previously described.
According to one or more embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium characterized by storing computer instructions for causing a computer to execute any of the aforementioned image processing methods.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (11)

1. An image processing method comprising:
acquiring a first image frame of a video image, wherein the first image frame is an image frame played by the video image at the current moment;
in response to detecting that a target object is included in the first image frame, segmenting the target object from the first image frame to obtain a target object image;
acquiring a circumscribed rectangle frame of the target object in the first image frame;
calculating the drawing size and the drawing position of the target object image in the first image frame according to the circumscribed rectangle frame;
and saving the target object image, the drawing size of the target object image and the drawing position of the target object image in a cache.
2. The image processing method of claim 1, wherein the method further comprises:
in response to that the number of target object images stored in the cache at the current moment reaches M, extracting N target object images from the M target object images as target object images to be processed, wherein M and N are integers greater than 0, and M is greater than N;
acquiring the N target object images and the drawing sizes and the drawing positions of the N target object images in the first image frame from the cache;
and superposing the N target object images on the first image frame according to the drawing sizes and the drawing positions of the N target object images in the first image frame.
3. The image processing method according to claim 2, wherein said superimposing the N target object images on the first image frame according to the drawing sizes, drawing positions of the N target object images in the first image frame comprises:
acquiring N transparencies corresponding to the N target object images respectively;
respectively scaling the N target object images to the corresponding drawing sizes;
and drawing the N target object images after scaling on the position of the first image frame indicated by the drawing position according to the N transparency.
4. The image processing method according to claim 1 or 2, wherein said calculating a drawing size and a drawing position of the target object image in the first image frame according to the circumscribed rectangle frame comprises:
calculating the width and the height of the circumscribed rectangular frame according to the rectangular information of the circumscribed rectangular frame;
setting a calculation matrix of a drawing size according to the width and the height;
calculating a drawing offset according to the rectangle information of the circumscribed rectangle frame, wherein the drawing offset represents an offset from the center of the circumscribed rectangle frame to the coordinate center of the first image frame;
calculating the drawing size according to the calculation matrix;
and calculating the drawing position according to the offset.
5. The image processing method according to claim 4, wherein said calculating the width and height of the circumscribed rectangular frame from the rectangle information of the circumscribed rectangular frame comprises:
acquiring coordinates of four corner points of an external rectangular frame;
carrying out normalization processing on the coordinates of the four corner points;
and calculating the width and the height of the circumscribed rectangle frame under a normalized coordinate system according to the coordinates after the normalization processing.
6. The image processing method according to claim 5, wherein said setting a calculation matrix of a rendering size according to said width and height comprises:
setting the calculation matrix of the drawing size as follows:
wherein w is the width of the circumscribed rectangle frame in the normalized coordinate system, and h is the height of the circumscribed rectangle frame in the normalized coordinate system.
7. The image processing method according to claim 6, wherein said calculating a drawing offset from the rectangle information of the circumscribed rectangle frame includes:
calculating the center coordinate of the rectangular frame according to the normalized coordinate;
calculating a position difference between the center coordinates and coordinates of an origin of the coordinate system after the normalization.
8. The image processing method according to claim 7, wherein said superimposing the N target object images on the first image frame according to the drawing sizes, drawing positions of the N target object images in the first image frame comprises:
calculating N actual drawing images corresponding to the N target object images according to the calculation matrixes of the N drawing sizes corresponding to the N target object images;
calculating N actual drawing positions of the N actual drawing images according to N position difference values corresponding to the N target object images;
superimposing the N actual rendered images on the first image frame according to the N actual rendered positions.
9. An image processing apparatus comprising:
the first image frame acquisition module is used for acquiring a first image frame of a video image, wherein the first image frame is an image frame played by the video image at the current moment;
a target object image segmentation module, configured to, in response to detecting that a target object is included in the first image frame, segment the target object from the first image frame to obtain a target object image;
the rectangular frame acquisition module is used for acquiring a circumscribed rectangular frame of the target object in the first image frame;
the drawing attribute calculation module is used for calculating the drawing size and the drawing position of the target object image in the first image frame according to the circumscribed rectangle frame;
and the target object image storage module is used for storing the target object image, the drawing size of the target object image and the drawing position of the target object image into a cache.
10. An electronic device, comprising:
a memory for storing computer readable instructions; and
a processor for executing the computer readable instructions such that the processor when executing implements the image processing method according to any of claims 1-8.
11. A non-transitory computer-readable storage medium storing computer-readable instructions that, when executed by a computer, cause the computer to perform the image processing method of any one of claims 1-8.
CN201910974930.XA 2019-10-14 2019-10-14 Image processing method, device, electronic equipment and computer readable storage medium Active CN110796664B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910974930.XA CN110796664B (en) 2019-10-14 2019-10-14 Image processing method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910974930.XA CN110796664B (en) 2019-10-14 2019-10-14 Image processing method, device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110796664A true CN110796664A (en) 2020-02-14
CN110796664B CN110796664B (en) 2023-05-23

Family

ID=69440221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910974930.XA Active CN110796664B (en) 2019-10-14 2019-10-14 Image processing method, device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110796664B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111698553A (en) * 2020-05-29 2020-09-22 维沃移动通信有限公司 Video processing method and device, electronic equipment and readable storage medium
CN111815656A (en) * 2020-07-22 2020-10-23 北京字节跳动网络技术有限公司 Video processing method, video processing device, electronic equipment and computer readable medium
CN113052226A (en) * 2021-03-22 2021-06-29 淮阴工学院 Time-sequence fire identification method and system based on single-step detector
CN113497973A (en) * 2021-09-06 2021-10-12 北京市商汤科技开发有限公司 Video processing method and device, computer readable storage medium and computer equipment
CN115423992A (en) * 2022-08-22 2022-12-02 惠州市海葵信息技术有限公司 Engineering drawing space arrangement method, controller and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6898306B1 (en) * 2001-05-14 2005-05-24 Ultratech, Inc. Machine-independent alignment system and method
US20060104534A1 (en) * 2004-11-17 2006-05-18 Rai Barinder S Apparatuses and methods for incorporating a border region within an image region
CN101155263A (en) * 2006-09-27 2008-04-02 富士通株式会社 Image processing apparatus, image processing method, image processing program, and image pickup apparatus
US20120069007A1 (en) * 2010-09-14 2012-03-22 Dynamic Digital Depth Research Pty Ltd Method for Enhancing Depth Maps
CN106611412A (en) * 2015-10-20 2017-05-03 成都理想境界科技有限公司 Map video generation method and device
CN107169135A (en) * 2017-06-12 2017-09-15 广州市动景计算机科技有限公司 Image processing method, device and electronic equipment
CN108288088A (en) * 2018-01-17 2018-07-17 浙江大学 A kind of scene text detection method based on end-to-end full convolutional neural networks
CN109711399A (en) * 2018-11-05 2019-05-03 北京三快在线科技有限公司 Shop recognition methods based on image, device, electronic equipment
CN109862313A (en) * 2018-12-12 2019-06-07 科大讯飞股份有限公司 A kind of video concentration method and device
CN110070551A (en) * 2019-04-29 2019-07-30 北京字节跳动网络技术有限公司 Rendering method, device and the electronic equipment of video image

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6898306B1 (en) * 2001-05-14 2005-05-24 Ultratech, Inc. Machine-independent alignment system and method
US20060104534A1 (en) * 2004-11-17 2006-05-18 Rai Barinder S Apparatuses and methods for incorporating a border region within an image region
CN101155263A (en) * 2006-09-27 2008-04-02 富士通株式会社 Image processing apparatus, image processing method, image processing program, and image pickup apparatus
US20120069007A1 (en) * 2010-09-14 2012-03-22 Dynamic Digital Depth Research Pty Ltd Method for Enhancing Depth Maps
CN106611412A (en) * 2015-10-20 2017-05-03 成都理想境界科技有限公司 Map video generation method and device
CN107169135A (en) * 2017-06-12 2017-09-15 广州市动景计算机科技有限公司 Image processing method, device and electronic equipment
CN108288088A (en) * 2018-01-17 2018-07-17 浙江大学 A kind of scene text detection method based on end-to-end full convolutional neural networks
CN109711399A (en) * 2018-11-05 2019-05-03 北京三快在线科技有限公司 Shop recognition methods based on image, device, electronic equipment
CN109862313A (en) * 2018-12-12 2019-06-07 科大讯飞股份有限公司 A kind of video concentration method and device
CN110070551A (en) * 2019-04-29 2019-07-30 北京字节跳动网络技术有限公司 Rendering method, device and the electronic equipment of video image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王慧玲等: "基于深度卷积神经网络的目标检测技术的研究进展", 《计算机科学》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111698553A (en) * 2020-05-29 2020-09-22 维沃移动通信有限公司 Video processing method and device, electronic equipment and readable storage medium
CN111815656A (en) * 2020-07-22 2020-10-23 北京字节跳动网络技术有限公司 Video processing method, video processing device, electronic equipment and computer readable medium
CN111815656B (en) * 2020-07-22 2023-08-11 抖音视界有限公司 Video processing method, apparatus, electronic device and computer readable medium
CN113052226A (en) * 2021-03-22 2021-06-29 淮阴工学院 Time-sequence fire identification method and system based on single-step detector
CN113497973A (en) * 2021-09-06 2021-10-12 北京市商汤科技开发有限公司 Video processing method and device, computer readable storage medium and computer equipment
CN113497973B (en) * 2021-09-06 2021-12-10 北京市商汤科技开发有限公司 Video processing method and device, computer readable storage medium and computer equipment
WO2023030177A1 (en) * 2021-09-06 2023-03-09 上海商汤智能科技有限公司 Video processing method and apparatus, computer readable storage medium, and computer device
CN115423992A (en) * 2022-08-22 2022-12-02 惠州市海葵信息技术有限公司 Engineering drawing space arrangement method, controller and storage medium
CN115423992B (en) * 2022-08-22 2023-11-14 惠州市海葵信息技术有限公司 Engineering drawing space arrangement method, controller and storage medium

Also Published As

Publication number Publication date
CN110796664B (en) 2023-05-23

Similar Documents

Publication Publication Date Title
CN111242881B (en) Method, device, storage medium and electronic equipment for displaying special effects
CN110796664B (en) Image processing method, device, electronic equipment and computer readable storage medium
CN110070551B (en) Video image rendering method and device and electronic equipment
CN110070063B (en) Target object motion recognition method and device and electronic equipment
CN110781823B (en) Screen recording detection method and device, readable medium and electronic equipment
CN110062157B (en) Method and device for rendering image, electronic equipment and computer readable storage medium
CN110740309B (en) Image display method and device, electronic equipment and storage medium
CN112561839B (en) Video clipping method and device, storage medium and electronic equipment
CN112381717A (en) Image processing method, model training method, device, medium, and apparatus
CN110689014B (en) Method and device for detecting region of interest, electronic equipment and readable storage medium
CN112785669B (en) Virtual image synthesis method, device, equipment and storage medium
WO2023138441A1 (en) Video generation method and apparatus, and device and storage medium
US11810336B2 (en) Object display method and apparatus, electronic device, and computer readable storage medium
CN116596748A (en) Image stylization processing method, apparatus, device, storage medium, and program product
CN113255812B (en) Video frame detection method and device and electronic equipment
CN114399696A (en) Target detection method and device, storage medium and electronic equipment
CN110769129B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN112651909B (en) Image synthesis method, device, electronic equipment and computer readable storage medium
CN111626919B (en) Image synthesis method and device, electronic equipment and computer readable storage medium
CN112991147B (en) Image processing method, device, electronic equipment and computer readable storage medium
CN111353929A (en) Image processing method and device and electronic equipment
CN111833459B (en) Image processing method and device, electronic equipment and storage medium
CN111738958B (en) Picture restoration method and device, electronic equipment and computer readable medium
CN117372240A (en) Display method and device of special effect image, electronic equipment and storage medium
CN117880478A (en) Virtual reality video format detection method, device, equipment and storage medium

Legal Events

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