RU2802724C1 - Image processing method and device, electronic device and machine readable storage carrier - Google Patents

Image processing method and device, electronic device and machine readable storage carrier Download PDF

Info

Publication number
RU2802724C1
RU2802724C1 RU2022119396A RU2022119396A RU2802724C1 RU 2802724 C1 RU2802724 C1 RU 2802724C1 RU 2022119396 A RU2022119396 A RU 2022119396A RU 2022119396 A RU2022119396 A RU 2022119396A RU 2802724 C1 RU2802724 C1 RU 2802724C1
Authority
RU
Russia
Prior art keywords
image
video frame
key points
frame image
anchor point
Prior art date
Application number
RU2022119396A
Other languages
Russian (ru)
Inventor
Цзинцзин ЧЖУГЭ
Гуанъяо НИ
Хуэй ЯН
Original Assignee
Бейджин Байтдэнс Нетворк Текнолоджи Ко., Лтд.
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 Бейджин Байтдэнс Нетворк Текнолоджи Ко., Лтд. filed Critical Бейджин Байтдэнс Нетворк Текнолоджи Ко., Лтд.
Application granted granted Critical
Publication of RU2802724C1 publication Critical patent/RU2802724C1/en

Links

Abstract

FIELD: image processing.
SUBSTANCE: improved quality of the processed image is achieved by identifying the first object in the first image of the video frame and the second object located in the first object; according to the position of the first object in the first image of the video frame, overlaying the third object as a foreground image on the first image of the video frame to obtain a second image of the video frame; wherein the third object overlays the first object in the second picture of the video frame; according to the position of the second object in the first image of the video frame, overlaying the second object as the foreground image on the third object of the second image of the video frame to obtain the third image of the video frame.
EFFECT: improved quality of the processed image.
16 cl, 6 dwg

Description

Настоящее раскрытие испрашивает приоритет в отношении китайской патентной заявки № 201911306421.6 под названием “Image processing method, apparatus, electronic device and computer readable storage medium”, поданной в китайское Патентное ведомство 18 декабря 2019 г., которая настоящим включена сюда посредством ссылки во всей ее полноте.This disclosure claims benefit from Chinese Patent Application No. 201911306421.6 entitled “Image processing method, apparatus, electronic device and computer readable storage medium” filed with the China Patent Office on December 18, 2019, which is hereby incorporated by reference in its entirety .

Область техники, к которой относится изобретениеField of technology to which the invention relates

Изобретение относится к области обработки изображений, в частности, к способу и устройству обработки изображений, электронному устройству и машиночитаемому носителю информации.The invention relates to the field of image processing, in particular to a method and device for image processing, an electronic device and a computer-readable storage medium.

Уровень техникиState of the art

По мере развития компьютерных сетей и роста популярности смартфонов, обычные пользователи больше не могут быть удовлетворены выражением своих чувств только посредством монотонных изображений и слов. Пользователи любят видео за их разнообразное представление содержания и формы и обеспечение интуитивных ощущений и постепенно видео становятся все более популярными. Для обычных пользователей стало тенденцией создавать оригинальные видео. Однако, с другой стороны, оригинальное видео селфи выражается в неинтересной форме. В то же время мы видим, что применение специальных видеоэффектов в кино- и телевизионной деятельности все более и более расширяется и формы выражения содержания становятся все более разнообразными. Можно сказать, что специальные видеоэффекты являются поддержкой и гарантией успешной кино- и телевизионной деятельности.With the development of computer networks and the growing popularity of smartphones, ordinary users can no longer be satisfied with expressing their feelings only through monotonous images and words. Users love videos for their varied presentation of content and form and providing intuitive experiences and gradually videos are becoming more popular. It has become a trend for ordinary users to create original videos. However, on the other hand, the original selfie video is expressed in an uninteresting way. At the same time, we see that the use of special video effects in film and television activities is increasingly expanding and the forms of expression of content are becoming more diverse. We can say that special video effects are the support and guarantee of successful film and television activities.

Однако, на предшествующем уровне техники специальные эффекты обычно создаются посредством прямого наложения эффектов на целевой объект (такой как человеческое лицо) и место наложения блокируется специальными эффектами, так чтобы первоначальные свойства целевого объекта не могли быть реализованы, приводя к тому, что фактический результат специальных эффектов, накладываемых на объект, не может отразить первоначальные признаки объекта, не вызывая отсутствия ощущения реальности.However, in the prior art, special effects are usually created by directly applying effects to a target object (such as a human face) and the application location is blocked by the special effects so that the original properties of the target object cannot be realized, causing the actual result of the special effects to be , superimposed on an object, cannot reflect the original characteristics of the object without causing a lack of sense of reality.

Раскрытие сущности изобретенияDisclosure of the invention

Настоящее раскрытие предназначено для введения в упрощенной форме некоторых концепций, которые будут дополнительно описаны в последующем подробном описании. Это раскрытие не предназначено для идентификации ключевых характеристик или существенных особенностей заявленного предмета изобретения и не предназначено для ограничения объема заявленного предмета изобретения. The present disclosure is intended to introduce in a simplified form certain concepts that will be further described in the following detailed description. This disclosure is not intended to identify key characteristics or essential features of the claimed subject matter and is not intended to limit the scope of the claimed subject matter.

При первом подходе вариант осуществления настоящего раскрытия представляет способ обработки изображений, содержащий этапы, на которых:In a first approach, an embodiment of the present disclosure provides an image processing method comprising the steps of:

идентифицируют первый объект в первом изображении видеокадра и второй объект, расположенный в первом объекте;identifying a first object in the first image of the video frame and a second object located in the first object;

в соответствии с положением первого объекта в первом изображении видеокадра, накладывают третий объект в качестве изображения переднего плана на первое изображение видеокадра, чтобы получить второе изображение видеокадра; причем третий объект накладывает первый объект на второе изображение видеокадра;according to the position of the first object in the first video frame image, superimposing the third object as a foreground image on the first video frame image to obtain a second video frame image; wherein the third object superimposes the first object on the second image of the video frame;

в соответствии с положением второго объекта в первом изображении видеокадра, накладывают второй объект в качестве изображения переднего плана на третий объект второго изображения видеокадра, чтобы получить третье изображение видеокадра.according to the position of the second object in the first video frame image, superimposing the second object as a foreground image on the third object of the second video frame image to obtain a third video frame image.

При втором подходе вариант осуществления настоящего раскрытия обеспечивает устройство обработки изображений, содержащее:In a second approach, an embodiment of the present disclosure provides an image processing device comprising:

модуль идентификации объекта, выполненный с возможностью идентификации первого объекта в первом изображении видеокадра и второго объекта, расположенного в первом объекте;an object identification module configured to identify a first object in the first image of the video frame and a second object located in the first object;

модуль формирования второго изображения видеокадра, выполненный в соответствии с положением первого объекта в первом изображении видеокадра с возможностью наложения третьего объекта в качестве изображения переднего плана на первое изображение видеокадра для получения второго изображения видеокадра; причем третий объект накладывает первый объект на второе изображение видеокадра;a second video frame image generating module configured in accordance with the position of a first object in the first video frame image with the ability to superimpose a third object as a foreground image on the first video frame image to obtain a second video frame image; wherein the third object superimposes the first object on the second image of the video frame;

модуль формирования третьего видеокадра, выполненный в соответствии с положением второго объекта в первом изображении видеокадра с возможностью наложения второго объекта в качестве изображения переднего плана на третий объект второго изображения видеокадра, чтобы получить третье изображение видеокадра.a third video frame generating module configured to correspond to the position of a second object in the first video frame image with the ability to superimpose the second object as a foreground image onto the third object of the second video frame image to obtain a third video frame image.

При третьем подходе вариант осуществления настоящего раскрытия обеспечивает электронное устройство, содержащее по меньшей мере один процессор; иIn a third approach, an embodiment of the present disclosure provides an electronic device comprising at least one processor; And

память, соединенную с возможностью связи по меньшей мере с одним процессором; причем память хранит команды, исполняемые по меньшей мере одним процессором, при этом команды исполняются по меньшей мере одним процессором, для обеспечения выполнения, по меньшей мере одним процессором, любого из способов обработки изображений при вышеупомянутом первом подходе.a memory communicatively coupled to at least one processor; wherein the memory stores instructions executable by the at least one processor, wherein the instructions are executed by the at least one processor, to cause the at least one processor to execute any of the image processing methods of the above-mentioned first approach.

При четвертом подходе вариант осуществления настоящего раскрытия обеспечивает машиночитаемый носитель информации долговременного использования, отличающийся тем, что упомянутый машиночитаемый носитель информации долговременного использования хранит компьютерные команды, чтобы заставлять компьютер исполнять любой из способов обработки изображений при вышеупомянутом первом подходе.In a fourth approach, an embodiment of the present disclosure provides a computer-readable storage medium, characterized in that said computer-readable storage medium stores computer instructions for causing a computer to execute any of the image processing methods of the above-mentioned first approach.

При пятом подходе вариант осуществления настоящего раскрытия обеспечивает компьютерную программу, которая, когда исполняется компьютером, выполняет любой из способов обработки изображений при вышеупомянутом первом подходе.In the fifth approach, an embodiment of the present disclosure provides a computer program that, when executed by a computer, performs any of the image processing methods in the above-mentioned first approach.

Раскрытый вариант осуществления раскрывает способ и устройство обработки изображений, электронное устройство и машиночитаемый носитель информации. Способ обработки изображений содержит этапы, на которых идентифицируют первый объект в первом изображении видеокадра и второй объект, расположенный в первом объекте; в соответствии с положением первого объекта в первом изображении видеокадра, накладывают третий объект в качестве изображения переднего плана на первое изображение видеокадра, чтобы получить второе изображение видеокадра; причем третий объект накладывает первый объект на второе изображение видеокадра; в соответствии с положением второго объекта в первом изображении видеокадра, накладывают второй объект в качестве изображения переднего плана на третий объект второго изображения видеокадра, чтобы получить третье изображение видеокадра. С помощью описанного выше способа можно решить техническую проблему, существующую на данном уровне техники, когда специальные эффекты, накладываемые на объект, не могут отразить первоначальные признаки объекта так, чтобы не вызывать отсутствия ощущения реальности.The disclosed embodiment discloses an image processing method and apparatus, an electronic device, and a computer-readable storage medium. The image processing method comprises identifying a first object in a first image of a video frame and a second object located in the first object; according to the position of the first object in the first video frame image, superimposing the third object as a foreground image on the first video frame image to obtain a second video frame image; wherein the third object superimposes the first object on the second image of the video frame; according to the position of the second object in the first video frame image, superimposing the second object as a foreground image on the third object of the second video frame image to obtain a third video frame image. Using the method described above, it is possible to solve a technical problem existing in the prior art where special effects applied to an object cannot reflect the original characteristics of the object so as not to cause a lack of sense of reality.

Приведенное выше описание относится только к сущности технической схемы настоящего раскрытия. Чтобы сделать технические средства, соответствующие настоящему раскрытию, более ясными и пригодными для реализации в соответствии с содержанием, присутствующим в описании, и сделать вышеупомянутые и другие задачи, признаки и преимущества настоящего раскрытия более очевидными, лучшие варианты осуществления будут последовательно представлены и подробно описаны в сочетании с чертежами, перечисленными ниже.The above description relates only to the essence of the technical scheme of the present disclosure. To make the techniques consistent with the present disclosure more clear and capable of implementation in accordance with the contents present in the specification, and to make the above and other objects, features and advantages of the present disclosure more obvious, the best embodiments will be presented and described in detail in combination with the drawings listed below.

Краткое описание чертежейBrief description of drawings

Перечисленные выше и другие признаки, преимущества и подходы различных вариантов осуществления настоящего раскрытия станут более очевидны в сочетании с сопроводительными чертежами и со ссылкой на последующее подробное описание. На всех чертежах одни и те же или подобные ссылочные позиции относятся к одним и тем же или подобным элементам. Следует понимать, что чертежи являются схематичными и оригиналы и элементы не обязательно вычерчены в масштабе.The above and other features, advantages and approaches of various embodiments of the present disclosure will become more apparent when taken in conjunction with the accompanying drawings and with reference to the following detailed description. Throughout the drawings, the same or similar reference numerals refer to the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

Фиг. 1 - блок-схема последовательности выполнения операций способа обработки изображений, предоставленного настоящим раскрытием;Fig. 1 is a flowchart of an image processing method provided by the present disclosure;

Фиг. 2 - схема вычисления точек привязки для человеческого лица в варианте осуществления способа обработки изображений, предоставленного настоящим раскрытием;Fig. 2 is a diagram of calculating anchor points for a human face in an embodiment of the image processing method provided by the present disclosure;

Фиг. 3 - блок-схема последовательности выполнения операций конкретного примера, показанного на этапе S103 варианта осуществления способа обработки изображений, предоставленного настоящим раскрытием;Fig. 3 is a flowchart of a specific example shown in step S103 of an embodiment of the image processing method provided by the present disclosure;

Фиг. 4 - блок-схема последовательности выполнения операций конкретного примера, показанного на этапе S302 в варианте осуществления способа обработки изображений, предоставленного настоящим раскрытием;Fig. 4 is a flowchart of a specific example shown in step S302 in an embodiment of the image processing method provided by the present disclosure;

Фиг. 5 - структурная схема варианта осуществления устройства обработки изображений, представленного вариантом осуществления настоящего раскрытия;Fig. 5 is a block diagram of an embodiment of an image processing apparatus represented by an embodiment of the present disclosure;

Фиг. 6 - схематичная структурная схема электронного устройства, представляемого в соответствии с вариантом осуществления настоящего раскрытия.Fig. 6 is a schematic block diagram of an electronic device provided in accordance with an embodiment of the present disclosure.

Осуществление изобретенияCarrying out the invention

Варианты осуществления настоящего раскрытия ниже будут описаны более подробно со ссылкой на сопроводительные чертежи. Хотя на чертежах показаны некоторые варианты осуществления настоящего раскрытия, следует понимать, что настоящее раскрытие может быть реализовано в различных формах и не должно интерпретироваться как ограничиваемое изложенными здесь вариантами осуществления. Наоборот, эти варианты осуществления предоставляются для более всестороннего и полного понимания настоящего раскрытия. Следует понимать, что чертежи и варианты осуществления настоящего раскрытия предназначены только для иллюстративных целей и не должны использоваться для ограничения объема защиты настоящего раскрытия.Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the drawings show some embodiments of the present disclosure, it should be understood that the present disclosure may be embodied in various forms and should not be interpreted as being limited to the embodiments set forth herein. Rather, these embodiments are provided for a more comprehensive and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and should not be used to limit the scope of the present disclosure.

Следует понимать, что этапы, описанные в вариантах осуществления способа настоящего раскрытия, могут выполняться в различном порядке и/или параллельно. Кроме того, варианты осуществления способа могут содержать дополнительные этапы и/или некоторые из показанных этапов могут быть пропущены. Объем защиты настоящего раскрытия, таким образом, не ограничивается.It should be understood that the steps described in embodiments of the method of the present disclosure may be performed in different orders and/or in parallel. In addition, embodiments of the method may contain additional steps and/or some of the steps shown may be omitted. The scope of protection of this disclosure is therefore not limited.

Термин "содержащий", как он используется здесь, и его варианты являются открытыми, то есть, "содержащий, но не ограничивающийся только этим". Термин "основываясь на" означает "основываясь, по меньшей мере частично, на". Термин "вариант осуществления" означает "по меньшей мере один вариант осуществления"; термин "другой вариант осуществления" означает "по меньшей мере, любой другой вариант осуществления"; термин "некоторые варианты осуществления" означает "по меньшей мере, некоторые варианты осуществления". Соответствующие определения других терминов будут даны в последующем описании.The term "comprising" as used herein and variations thereof are open-ended, that is, "comprising but not limited to." The term "based on" means "based, at least in part, on". The term "embodiment" means "at least one embodiment"; the term "other embodiment" means "at least any other embodiment"; the term "certain embodiments" means "at least some embodiments". Appropriate definitions of other terms will be given in the following description.

Следует заметить, что понятия "первый", "второй" и т. д., упомянутые в настоящем раскрытии, используются только для различения различных устройств, модулей или блоков и не используются для ограничения порядка или взаимозависимости функций, выполняемых этими устройствами, модулями или блоками.It should be noted that the terms "first", "second", etc. mentioned in this disclosure are used only to distinguish different devices, modules or blocks and are not used to limit the order or interdependence of the functions performed by these devices, modules or blocks .

Следует заметить, что модификации терминов "один" и "несколько", упомянутые в настоящем раскрытии, являются просто иллюстративными, а не ограничительными, и специалисты в данной области техники должны понимать, что их следует понимать как "один или более", если иное явно не указывается в контексте.It should be noted that modifications to the terms “one” and “more than one” mentioned in this disclosure are merely illustrative and not restrictive, and those skilled in the art should understand that they are to be understood as “one or more” unless otherwise clearly stated. not specified in context.

Названия сообщений или информации, которыми обмениваются несколько устройств в вариантах осуществления настоящего раскрытия, служат только для иллюстративных целей и не предназначены ограничивать объемы этих сообщений или информации.The names of messages or information exchanged between multiple devices in embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of those messages or information.

На фиг. 1 представлена блок-схема последовательности выполнения варианта осуществления способа обработки изображений, предоставленного вариантами осуществления настоящего раскрытия. Способ обработки изображений, предоставленный в этом варианте осуществления, может быть реализован устройством обработки изображений, которое может быть реализовано как программное обеспечение или как сочетание программного обеспечения и аппаратных средств. Устройство обработки изображений может быть интегрировано в некоторое устройство в системе обработки изображений, такое как сервер обработки изображений или оконечное устройство обработки изображений. Как показано на фиг. 1, этот способ содержит следующие этапы.In fig. 1 is a flowchart of an embodiment of an image processing method provided by embodiments of the present disclosure. The image processing method provided in this embodiment may be implemented by an image processing apparatus, which may be implemented as software or a combination of software and hardware. The image processing device may be integrated into a device in an image processing system, such as an image processing server or an image processing terminal device. As shown in FIG. 1, this method contains the following steps.

На этапе S101 идентифицируют первый объект в первом изображении видеокадра и второй объект, расположенный в первом объекте.In step S101, a first object in the first image of the video frame and a second object located in the first object are identified.

На этом этапе первое изображение видеокадра получают от датчика изображения или из памяти. Датчик изображения относится к различным устройствам, которые могут собирать изображения, и типичными датчиками изображения являются видеокамеры, фотокамеры и т. д. В настоящем варианте осуществления датчик изображения может быть камерой на оконечном устройстве, такой как фронтальная камера или камера заднего вида на смартфоне, и изображения, собранные камерой, могут напрямую отображаться на экране дисплея мобильного телефона, причем здесь память является локальной памятью или сетевой памятью и изображение видеокадра получают через место хранения в локальной памяти или адрес запоминающего устройства в сетевой памяти и изображение видеокадра в памяти является предварительным файлом изображения видеокадра, который может отображаться на дисплее оконечного устройства через плеер, имеющийся на оконечном устройстве.At this stage, the first image of the video frame is obtained from the image sensor or from memory. An image sensor refers to various devices that can collect images, and typical image sensors are video cameras, still cameras, etc. In the present embodiment, the image sensor may be a camera on a terminal device, such as a front camera or a rear camera on a smartphone, and the images collected by the camera can be directly displayed on the display screen of the mobile phone, wherein the memory is a local memory or a network memory, and the video frame image is obtained through a storage location in the local memory or a storage address in the network memory, and the video frame image in the memory is a preliminary video frame image file , which can be displayed on the display of the terminal device via the player available on the terminal device.

Первое изображение видеокадра содержит первый объект, который может быть любым объектом в первом изображении видеокадра. Для примера, первым объектом является человеческое лицо; вторым объектом является часть первого объекта, расположенная на первом объекте, например, когда первый объект является человеческим лицом, вторым объектом является признак лица, такой как глаза, рот и т. д.The first image of the video frame contains a first object, which can be any object in the first image of the video frame. For example, the first object is a human face; the second object is a part of the first object located on the first object, for example, when the first object is a human face, the second object is a facial feature such as eyes, mouth, etc.

В этом варианте осуществления ключевые точки объекта используются для идентификации объекта; например, объект может быть идентифицирован множеством заданных ключевых точек и если идентифицировано множество ключевых точек, то объект идентифицирован. Как вариант, идентификация первого объекта в первом изображении видеокадра и второго объекта, расположенного в первом объекте, содержит этапы, на которых: идентифицируют множество первых ключевых точек первого объекта и множество вторых ключевых точек второго объекта в первом изображении видеокадра; идентифицируют первый объект, основываясь на множестве первых ключевых точек первого объекта; идентифицируют второй объект, основываясь на множестве вторых ключевых точек второго объекта, где множество вторых ключевых точек является граничными ключевыми точками второго объекта. Граничные ключевые точки определяют контур второго объекта. Например, первым объектом является человеческое лицо и вторым объектом являются глаза или рот на человеческом лице. Множество первых ключевых точек может содержать центральную ключевую точку двух глаз на человеческом лице и ключевую точку кончика носа и когда центральная ключевая точка двух глаз и ключевая точка кончика носа идентифицированы, человеческое лицо идентифицировано; вторые ключевые точки содержат граничные ключевые точки глаз и граничные ключевые точки рта, аналогично тому, как при идентификации граничных ключевых точек глаз и граничных ключевых точек рта идентифицируются глаза и рот. Например, первые ключевые точки и вторые ключевые точки могут быть идентифицированы, используя алгоритм глубокого обучения, и сеть глубокого обучения может обучаться путем прямого использования набора изображений кадров, маркированных первой ключевой точкой и второй ключевой точкой, как описано выше, чтобы получить сетевую модель, которая может регрессировать первые ключевые точки и вторые ключевые точки, и затем первое изображение видеокадра вводится в сетевую модель и, если первое изображение видеокадра содержит первый объект и второй объект, сетевая модель будет давать на выходе положения первых ключевых точек и вторых ключевых точек, тем самым непосредственно идентифицируя первый объект и второй объект и идентифицируя положения первых ключевых точек и вторых ключевых точек. Следует понимать, что первые ключевые точки и вторые ключевые точки могут также быть идентифицированы любым другим алгоритмом идентификации ключевых точек, который здесь повторно не описывается.In this embodiment, object key points are used to identify the object; for example, an object may be identified by a plurality of given key points, and if a plurality of key points are identified, then the object is identified. Alternatively, identifying a first object in the first video frame image and a second object located in the first object comprises: identifying a plurality of first key points of the first object and a plurality of second key points of the second object in the first video frame image; identifying a first object based on the plurality of first key points of the first object; identifying a second object based on a plurality of second key points of the second object, where the plurality of second key points are boundary key points of the second object. Boundary key points define the outline of the second object. For example, the first object is a human face and the second object is the eyes or mouth on a human face. The plurality of first key points may comprise a central key point of two eyes on a human face and a nose tip key point, and when the central key point of two eyes and a nose tip key point are identified, the human face is identified; the second key points include eye boundary key points and mouth boundary key points, similar to how identifying eye boundary key points and mouth boundary key points identifies eyes and mouth. For example, the first keypoints and the second keypoints may be identified using a deep learning algorithm, and the deep learning network may be trained by directly using a set of frame images labeled by the first keypoint and the second keypoint, as described above, to obtain a network model that can regress the first key points and the second key points, and then the first image of the video frame is input into the network model and, if the first image of the video frame contains the first object and the second object, the network model will output the positions of the first key points and the second key points, thereby directly identifying the first object and the second object and identifying the positions of the first key points and the second key points. It should be understood that the first key points and the second key points may also be identified by any other key point identification algorithm that is not described again here.

На этапе S102, в соответствии с положением первого объекта в первом изображении видеокадра, накладывают третий объект в качестве изображения переднего плана на первое изображение видеокадра, чтобы получить второе изображение видеокадра; причем третий объект накладывает первый объект на второе изображение видеокадра.In step S102, according to the position of the first object in the first video frame image, a third object is superimposed as a foreground image on the first video frame image to obtain a second video frame image; wherein the third object superimposes the first object onto the second image of the video frame.

Как вариант, третий объект является трехмерным виртуальным объектом и двумерная область проекции трехмерного виртуального объекта на первое изображение видеокадра больше, чем область первого объекта, то есть, третий объект может полностью перекрыть первый объект. Например, трехмерный виртуальный объект может быть сферическим виртуальным объектом, таким как трехмерный апельсин, трехмерный шар, трехмерный арбуз и так далее. Третий объект содержит точку привязки третьего объекта, которая используется для определения местоположения третьего объекта.Alternatively, the third object is a three-dimensional virtual object and the two-dimensional area of the projection of the three-dimensional virtual object onto the first image of the video frame is larger than the area of the first object, that is, the third object may completely overlap the first object. For example, the three-dimensional virtual object may be a spherical virtual object such as a three-dimensional orange, a three-dimensional ball, a three-dimensional watermelon, and so on. The third object contains the third object's anchor point, which is used to determine the location of the third object.

Следует понимать, что третий объект может быть любым объектом, не ограниченным вышеупомянутыми трехмерными виртуальными объектами, такими как двумерные виртуальные объекты и реальные объекты. Реальные объекты являются объектами, сформированными в полученных изображениях реальных объектов, такими как изображения человеческого лица и изображения внешнего вида животных, включенные на этот раз в первое изображение видеокадра, причем изображение внешнего вида животных может быть наложено на изображение человеческого лица в качестве третьего объекта.It should be understood that the third object may be any object not limited to the above-mentioned three-dimensional virtual objects, such as two-dimensional virtual objects and real objects. The real objects are the objects formed in the acquired real object images, such as the human face images and the animal appearance images included in the first image of the video frame this time, and the animal appearance image may be superimposed on the human face image as a third object.

На этом этапе, когда третий объект накладывается на первый объект, для определения местоположения наложения третьего объекта может использоваться способ поточечного выравнивания по ключевым точкам. Как пример, третий объект содержит точку привязки третьего объекта, находящуюся на нем, и ключевая точка привязки первого объекта, соответствующая точке привязки третьего объекта, задается на первом объекте, и ключевая точка привязки первого объекта может быть одной из вышеупомянутых первых ключевых точек. Когда третий объект накладывается на первое изображение видеокадра в качестве изображения переднего плана, точка привязки третьего объекта может выравниваться с ключевой точкой привязки первого объекта, так чтобы третий объект мог быть наложен на первый объект.At this point, when the third object is overlaid on the first object, a point-by-point keypoint alignment method may be used to determine the location of the overlay of the third object. As an example, the third object includes an anchor point of the third object located on it, and a key anchor point of the first object corresponding to the anchor point of the third object is defined on the first object, and the key anchor point of the first object may be one of the above-mentioned first key points. When the third object is overlaid on the first image of the video frame as a foreground image, the anchor point of the third object may be aligned with the key anchor point of the first object so that the third object can be superimposed on the first object.

Иногда выравнивание, использующее одиночную ключевую точку, является неточным, поэтому, как вариант, в соответствии с положением первого объекта в первом изображении видеокадра, наложение третьего объекта в качестве изображения переднего плана на первое изображение видеокадра, чтобы получить второе изображение видеокадра, может содержать этапы, на которых: вычисляют точку привязки первого объекта в первом изображении видеокадра, основываясь на множестве первых ключевых точек первого объекта в первом изображении видеокадра; путем выравнивания точки привязки третьего объекта с точкой привязки первого объекта в первом изображении видеокадра, накладывают третий объект в качестве изображения переднего плана на первое изображение видеокадра, чтобы получить второе изображение видеокадра. В этом альтернативном варианте осуществления точка привязки первого объекта вычисляется из множества первых ключевых точек, что может быть более точным, чем определение местоположения по одиночной первой ключевой точке, так как точка привязки первого объекта содержит позиционную информацию о множестве первых ключевых точек. Например, как показано на фиг. 2, первый объект является человеческим лицом и множество первых ключевых точек являются центральными ключевыми точками 201 и 202 левого и правого глаз и ключевой точкой 203 кончика носа, и точка привязки человеческого лица может быть вычислена, исходя из центральных ключевых точек двух глаз и ключевой точки кончика носа, каждая из которых учитывается как 1/3 по весу, поэтому можно вычислить центральную точку 204 треугольника, образованного центральными ключевыми точками двух глаз и кончика носа, так что влияние искажения положения одиночной ключевой точки на положение точки привязки становится намного меньшим и точка привязки первого объекта является стабильной и точной.Sometimes the alignment using a single key point is inaccurate, so alternatively, according to the position of the first object in the first video frame image, overlaying a third object as a foreground image on the first video frame image to obtain a second video frame image may comprise the steps of wherein: calculating an anchor point of a first object in a first image of the video frame based on a plurality of first key points of the first object in the first image of the video frame; by aligning the anchor point of the third object with the anchor point of the first object in the first video frame image, overlaying the third object as a foreground image on the first video frame image to obtain a second video frame image. In this alternative embodiment, the first object's anchor point is calculated from the plurality of first key points, which may be more accurate than locating from a single first key point because the first object's anchor point contains positional information about the plurality of first key points. For example, as shown in FIG. 2, the first object is a human face, and the plurality of first key points are the center key points 201 and 202 of the left and right eyes and the nose tip key point 203, and the anchor point of the human face can be calculated based on the center key points of the two eyes and the tip key point nose, each of which is taken into account as 1/3 by weight, so the center point 204 of the triangle formed by the central key points of the two eyes and the tip of the nose can be calculated, so that the effect of the distortion of the position of a single key point on the position of the anchor point becomes much smaller and the anchor point of the first The object is stable and accurate.

После получения точки привязки первого объекта, устанавливают точку привязки третьего объекта в месте расположения точки привязки первого объекта и воспроизводят первое изображение видеокадра с третьим объектом в качестве переднего плана, чтобы получить второе изображение видеокадра.After obtaining the anchor point of the first object, set the anchor point of the third object at the location of the anchor point of the first object and reproduce the first image of the video frame with the third object as the foreground to obtain a second image of the video frame.

На этапе S103, в соответствии с положением второго объекта в первом изображении видеокадра, накладывают второй объект в качестве изображения переднего плана на третий объект второго изображения видеокадра, чтобы получить третье изображение видеокадра.In step S103, according to the position of the second object in the first video frame image, the second object is superimposed as a foreground image on the third object of the second video frame image to obtain a third video frame image.

На этапе S101 был идентифицирован второй объект, причем положение второго объекта в первом объекте видеокадра может быть определено положением центральной точки второго объекта или множества вторых ключевых точек. Например, при идентификации второго объекта точка привязки второго объекта может быть непосредственно идентифицирована как ключевая точка или может быть вычислена, основываясь на множестве вторых ключевых точек, вычисляя точку привязки второго объекта, значение веса может быть установлено для каждой второй ключевой точки, участвующей в вычислении, и положение точки привязки второго объекта является взвешенным средним положением множества вторых ключевых точек. После получения положения второго объекта в первом изображении видеокадра, второй объект накладывается в качестве изображения переднего плана на соответствующее положение третьего объекта во втором изображении видеокадра.In step S101, a second object has been identified, wherein the position of the second object in the first object of the video frame may be determined by the position of a center point of the second object or a plurality of second key points. For example, when identifying a second object, the anchor point of the second object may be directly identified as a key point, or may be calculated based on a plurality of second key points. When calculating the anchor point of the second object, a weight value may be set for every second key point involved in the calculation. and the position of the anchor point of the second object is a weighted average of the position of the plurality of second key points. After obtaining the position of the second object in the first image of the video frame, the second object is superimposed as a foreground image on the corresponding position of the third object in the second image of the video frame.

Как вариант, когда третий объект является трехмерным объектом, то поскольку трехмерный объект имеет определенную глубину (информацию в направлении оси Z), но второй объект является двумерным объектом без глубины, то когда второй объект накладывается на третий объект, будет существовать некоторое отклонение, и, таким образом, когда второй объект накладывается на третий объект, существует необходимость в некотором смещении, так чтобы результат наложения был более естественным. В этом случае, как показано на фиг. 3, этап S103 может содержать этапы, на которых:Alternatively, when the third object is a 3D object, then since the 3D object has a certain depth (information in the Z-axis direction), but the second object is a 2D object with no depth, then when the second object is superimposed on the third object, there will be some deviation, and, thus, when the second object is superimposed on the third object, there is a need for some offset so that the result of the overlap is more natural. In this case, as shown in FIG. 3, step S103 may comprise the steps of:

на этапе S301 вычисляют первое расстояние между двумя ключевыми точками, заданными на первом объекте;in step S301, a first distance between two key points defined on the first object is calculated;

на этапе S302 вычисляют смещение второго объекта, основываясь на первом расстоянии;in step S302, the displacement of the second object is calculated based on the first distance;

на этапе S303, в соответствии с положением второго объекта в первом изображении видеокадра и смещением второго объекта, накладывают второй объект в качестве изображения переднего плана на третий объект во втором изображении видеокадра для получения третьего изображения видеокадра.in step S303, according to the position of the second object in the first video frame image and the offset of the second object, the second object as a foreground image is superimposed on the third object in the second video frame image to obtain a third video frame image.

Две ключевые точки, заданные на первом объекте, могут быть любыми двумя ключевыми точками на первом объекте. Например, две заданные ключевые точки являются двумя ключевыми точками на первом объекте, которые с двух сторон симметричны. Например, если в вышеупомянутом варианте осуществления первым объектом является человеческое лицо, заданные две ключевые точки могут быть центральными ключевыми точками левого глаза и правого глаза. Например, вычисление смещения второго объекта, основываясь на первом расстоянии, может состоять в умножении первого расстояния на коэффициент смещения, который зависит от значения первого расстояния. Например, чем больше значение первого расстояния, тем больше коэффициент смещения, то есть, тем больше смещение второго объекта, и достигнутый эффект состоит в том, что чем ближе первый объект к объективу, тем больше будет смещен второй объект, чтобы адаптироваться к трехмерной поверхности третьего объекта.The two key points defined on the first object can be any two key points on the first object. For example, the two given key points are two key points on the first object that are symmetrical on both sides. For example, if in the above embodiment, the first object is a human face, the predetermined two key points may be the center key points of the left eye and the right eye. For example, calculating the displacement of a second object based on a first distance may involve multiplying the first distance by a displacement factor that depends on the value of the first distance. For example, the larger the value of the first distance, the larger the displacement coefficient, that is, the greater the displacement of the second object, and the effect achieved is that the closer the first object is to the lens, the more the second object will be displaced to adapt to the three-dimensional surface of the third object.

Описанное выше вычисление смещения принадлежит к своего рода приближенному вычислению и, как вариант, смещение может быть вычислено более точно. В этом случае, как показано на фиг. 4, этап S302 может содержать этапы, на которых:The offset calculation described above belongs to a kind of approximate calculation and, alternatively, the offset can be calculated more accurately. In this case, as shown in FIG. 4, step S302 may comprise the steps of:

на этапе S401 получают угол отклонения и угол наклона первого объекта, где угол отклонения является углом в горизонтальной плоскости между ориентацией первого объекта в первом изображении видеокадра и направлением съемки объектива, а угол наклона является углом в вертикальной плоскости между ориентацией первого объекта в первом изображении видеокадра и направлением съемки объектива;in step S401, the deflection angle and the tilt angle of the first object are obtained, where the deflection angle is the angle in the horizontal plane between the orientation of the first object in the first video frame image and the shooting direction of the lens, and the tilt angle is the angle in the vertical plane between the orientation of the first object in the first video frame image and lens shooting direction;

на этапе S402 вычисляют смещение второго объекта, основываясь на первом расстоянии, угле отклонения и угле наклона.in step S402, the displacement of the second object is calculated based on the first distance, the deviation angle and the tilt angle.

Конкретно, процесс вычисления на вышеупомянутом этапе S402 может быть выражен следующей формулой:Specifically, the calculation process in the above-mentioned step S402 can be expressed by the following formula:

Здесь, sign - операция получения символов, dx - смещение второго объекта в направлении оси X, dy - смещение второго объекта в направлении оси Y, disteye - первое расстояние, yaw - угол отклонения первого объекта, pitch - угол наклона первого объекта, θ1 - начальный относительный угол наклона, когда второй объект обращен вперед, и θ2 - начальный относительный угол отклонения, когда второй объект обращен вперед. Здесь θ1 и θ2 - заданные угловые значения, поскольку внешняя поверхность трехмерного третьего объекта имеет определенную кривизну, при движении требуется некоторое затухание. Возьмем в качестве примера первый объект, являющийся человеческим лицом, и второй объект, являющийся глазами и ртом, тогда, так как рот расположен в нижней половине верхней и нижней областей третьего объекта, начальный относительный угол наклона рта большой, и так как рот расположен в средней части левой и правой областей третьего объекта, начальный относительный угол отклонения рта равен 0. θ1 и θ2 других вторых объектов могут быть заданы с различными значениями в соответствии с различными третьими объектами, которые здесь описываться не будут.Here, sign is the operation of obtaining symbols, dx is the displacement of the second object in the direction of the X axis, dy is the displacement of the second object in the direction of the Y axis, dist eye is the first distance, yaw is the deviation angle of the first object, pitch is the tilt angle of the first object, θ 1 is the initial relative tilt angle when the second object is facing forward, and θ 2 is the initial relative tilt angle when the second object is facing forward. Here θ 1 and θ 2 are given angular values, since the outer surface of the three-dimensional third object has a certain curvature, some attenuation is required when moving. Taking as an example the first object being a human face and the second object being the eyes and mouth, then since the mouth is located in the lower half of the upper and lower regions of the third object, the initial relative angle of the mouth is large, and since the mouth is located in the middle portions of the left and right regions of the third object, the initial relative deviation angle of the mouth is 0. θ 1 and θ 2 of the other second objects can be set to different values in accordance with different third objects, which will not be described here.

Как вариант, на этапе S303, в соответствии с положением второго объекта в первом изображении видеокадра и смещением второго объекта, наложение второго объекта в качестве изображения переднего плана на третий объект во втором изображении видеокадра для получения третьего изображения видеокадра дополнительно содержит этапы, на которых: выполняют смещение положения начальной точки привязки второго объекта в первом изображении видеокадра в соответствии со смещением второго объекта, чтобы получить целевую точку привязки; представляют во втором изображении видеокадра второй объект в качестве изображения переднего плана в положении целевой точки привязки для получения третьего изображения видеокадра. На вышеупомянутом этапе положение второго объекта в первом изображении видеокадра рассматривается как начальная точка привязки и начальная точка привязки содержит значение координаты оси X и значение координаты оси Y, причем значение координаты оси X и значение координаты оси Y начальной точки привязки соответственно добавляются к значениям координаты оси X и координаты оси Y смещения, чтобы получить целевую точку привязки; затем, во втором изображении видеокадра второй объект представляется как передний план в положении второй целевой точки привязки, чтобы получить третье изображение видеокадра, и второй объект накладывается на третий объект на третьем изображении видеокадра, которое действительно может отражать характеристики первого объекта, делая, таким образом, специальный эффект более реальным.Alternatively, in step S303, according to the position of the second object in the first video frame image and the offset of the second object, superimposing the second object as a foreground image on the third object in the second video frame image to obtain a third video frame image further comprises the steps of: shifting the position of the starting anchor point of the second object in the first image of the video frame in accordance with the offset of the second object to obtain a target anchor point; presenting, in a second image of the video frame, a second object as a foreground image at a position of the target anchor point to obtain a third image of the video frame. In the above step, the position of the second object in the first image of the video frame is considered as the starting anchor point, and the starting anchor point contains an X-axis coordinate value and a Y-axis coordinate value, and the X-axis coordinate value and the Y-axis coordinate value of the starting anchor point are respectively added to the X-axis coordinate values. and offset Y-axis coordinates to get the target anchor point; then, in the second video frame image, the second object is represented as foreground at the position of the second target anchor point to obtain the third video frame image, and the second object is superimposed on the third object in the third video frame image, which can actually reflect the characteristics of the first object, thus making The special effect is more real.

Как вариант, поскольку размеры третьего объекта и второго объекта не могут быть одинаковыми, прежде чем накладывать второй объект в качестве изображения переднего плана на третий объект второго изображения видеокадра, способ дополнительно содержит масштабирование второго объекта в соответствии с третьим объектом. В этом случае масштабный коэффициент второго объекта может быть определен в соответствии с отношением расстояния между двумя заданными ключевыми точками на третьем объекте и расстояния между двумя заданными ключевыми точками на первом объекте, так, чтобы когда третий объект больше, чем первый объект, второй объект увеличивался, а когда третий объект меньше, чем первый объект, второй объект уменьшался. Второй объект, наложенный на третий объект второго изображения видеокадра после этого этапа, является вторым объектом после масштабирования.Alternatively, since the dimensions of the third object and the second object may not be the same, before superimposing the second object as a foreground image onto the third object of the second video frame image, the method further comprises scaling the second object in accordance with the third object. In this case, the scale factor of the second object can be determined according to the ratio of the distance between two given key points on the third object and the distance between two given key points on the first object, so that when the third object is larger than the first object, the second object is enlarged. and when the third object was smaller than the first object, the second object became smaller. The second object superimposed on the third object of the second video frame image after this step is the second object after scaling.

Дополнительно, после того, как целевой объект наложен на трехмерный виртуальный объект, поскольку может иметь место различие между цветом целевого объекта и цветом трехмерного виртуального объекта, для устранения такого различия может быть использована дальнейшая цветовая обработка, так чтобы эффект наложения второго объекта и третьего объекта был более естественным. Дополнительно, после этапа S103 способ также содержит этапы, на которых:Additionally, after the target object is superimposed on the three-dimensional virtual object, since there may be a difference between the color of the target object and the color of the three-dimensional virtual object, further color processing may be used to eliminate such difference, so that the effect of superimposing the second object and the third object is more natural. Additionally, after step S103, the method also comprises the steps of:

преобразуют цветовые пространства второго объекта и третьего объекта в третьем изображении видеокадра из цветового пространства RGB (Red, Green, Blue (красный, зеленый, синий)) в цветовое пространство HSV (Hue, Saturation, Value (оттенок, насыщенность, значение);converting the color spaces of the second object and the third object in the third image of the video frame from an RGB (Red, Green, Blue) color space to an HSV (Hue, Saturation, Value) color space;

заменяют значение второго объекта в канале H в цветовом пространстве HSV на значение третьего объекта в канале H;replacing the value of the second object in the H channel in the HSV color space with the value of the third object in the H channel;

преобразуют цветовые пространства второго объекта и третьего объекта из пространства HSV в цветовое пространство RGB для получения четвертого изображения видеокадра.converting the color spaces of the second object and the third object from the HSV space to the RGB color space to obtain a fourth image of the video frame.

Выполняя приведенные выше этапы, пространство RGB преобразуется в пространство HSV и цвет второго объекта преобразуется в цвет третьего объекта в целевом положении, в то же время сохраняя первоначальные насыщенность и яркость второго объекта, так чтобы второй объект мог лучше сливаться с третьим объектом, что делает второй объект более похожим на часть третьего объекта и более реалистичным.By following the above steps, the RGB space is converted to HSV space and the color of the second object is converted to the color of the third object at the target position, while maintaining the original saturation and brightness of the second object, so that the second object can better blend into the third object, which makes the second the object looks more like part of a third object and is more realistic.

Варианты осуществления настоящего раскрытия представляют способ и устройство обработки изображений, электронное устройство и машиночитаемый носитель информации. Способ обработки изображений содержит этапы, на которых идентифицируют первый объект в первом изображении видеокадра и второй объект, расположенный в первом объекте; в соответствии с положением первого объекта в первом изображении видеокадра, накладывают третий объект в качестве изображения переднего плана на первое изображение видеокадра, чтобы получить второе изображение видеокадра; причем третий объект накладывает первый объект на второе изображение видеокадра; в соответствии с положением второго объекта в первом изображении видеокадра, накладывают второй объект в качестве изображения переднего плана на третий объект второго изображения видеокадра, чтобы получить третье изображение видеокадра. Используя представленный выше способ можно решить существующую техническую проблему, когда специальные эффекты, накладываемые на объект, не могут отразить первоначальные признаки объекта, не вызывая ощущения отсутствия реальности.Embodiments of the present disclosure provide an image processing method and apparatus, an electronic device, and a computer-readable storage medium. The image processing method comprises identifying a first object in a first image of a video frame and a second object located in the first object; according to the position of the first object in the first video frame image, superimposing the third object as a foreground image on the first video frame image to obtain a second video frame image; wherein the third object superimposes the first object on the second image of the video frame; according to the position of the second object in the first video frame image, superimposing the second object as a foreground image on the third object of the second video frame image to obtain a third video frame image. Using the method presented above, you can solve the existing technical problem when special effects applied to an object cannot reflect the original characteristics of the object without causing a feeling of lack of reality.

В приведенном выше описании, хотя этапы в вышеупомянутых вариантах осуществления способа описаны в представленном порядке, специалистам в данной области техники должно быть понятно, что этапы, представленные в раскрытых вариантах осуществления, не обязательно выполняются в вышеупомянутом порядке, а могут также выполняться в другом порядке, таком как обратный порядок, параллельный порядок, перекрестный порядок и т. д. Кроме того, на основе вышеупомянутых этапов специалисты в данной области техники могут также добавлять другие этапы и эти очевидные модификации или эквивалентные альтернативы также должны быть включены в пределы объема защиты настоящего раскрытия и здесь их описания не будут повторяться.In the above description, although the steps in the above method embodiments are described in the order presented, those skilled in the art will understand that the steps presented in the disclosed embodiments are not necessarily performed in the above order, but may also be performed in a different order. such as reverse order, parallel order, cross order, etc. Moreover, based on the above steps, those skilled in the art may also add other steps and these obvious modifications or equivalent alternatives should also be included within the scope of protection of the present disclosure and Their descriptions will not be repeated here.

На фиг. 5 схематично показана структурная схема варианта осуществления устройства обработки изображений, представленного в вариантах осуществления настоящего раскрытия. Как показано на фиг. 5, устройство 500 содержит модуль 501 идентификации объекта, модуль 502 формирования второго изображения видеокадра и модуль 503 формирования третьего видеокадра. Среди них присутствуют:In fig. 5 is a schematic block diagram of an embodiment of an image processing apparatus provided in the embodiments of the present disclosure. As shown in FIG. 5, the device 500 includes an object identification module 501, a second video frame image generating module 502, and a third video frame generating module 503. Among them are:

модуль 501 идентификации объекта, выполненный с возможностью идентификации первого объекта в первом изображении видеокадра и второго объекта, расположенного в первом объекте;an object identification module 501, configured to identify a first object in the first image of a video frame and a second object located in the first object;

модуль 502 формирования второго изображения видеокадра, выполненный в соответствии с положением первого объекта в первом изображении видеокадра с возможностью наложения третьего объекта в качестве изображения переднего плана на первое изображение видеокадра для получения второго изображения видеокадра; где третий объект накладывает первый объект на второе изображении видеокадра;a second video frame image generating unit 502 configured in accordance with the position of a first object in the first video frame image to superimpose a third object as a foreground image on the first video frame image to obtain a second video frame image; wherein the third object superimposes the first object on the second image of the video frame;

модуль 503 формирования третьего изображения видеокадра, выполненный в соответствии с положением второго объекта в первом изображении видеокадра с возможностью наложения второго объекта в качестве изображения переднего плана на третий объект второго изображения видеокадра, чтобы получить третье изображение видеокадра.a third video frame image generating unit 503 configured in accordance with the position of a second object in the first video frame image to superimpose the second object as a foreground image on the third object of the second video frame image to obtain a third video frame image.

Кроме того, модуль 501 идентификации объекта дополнительно выполнен с возможностью:In addition, the object identification module 501 is further configured to:

идентификации множества первых ключевых точек первого объекта и множества вторых ключевых точек второго объекта в первом изображении видеокадра;identifying a plurality of first key points of the first object and a plurality of second key points of the second object in the first image of the video frame;

идентификации первого объекта, основываясь на множестве первых ключевых точек первого объекта;identifying a first object based on the plurality of first key points of the first object;

идентификации второго объекта, основываясь на множестве вторых ключевых точек второго объекта, где множество вторых ключевых точек являются граничными ключевыми точками второго объекта.identifying a second object based on a plurality of second key points of the second object, wherein the plurality of second key points are boundary key points of the second object.

Дополнительно, модуль 502 формирования второго изображения видеокадра, выполнен с возможностью:Additionally, the second video frame image generating module 502 is configured to:

вычисления точки привязки первого объекта в первом изображении видеокадра, основываясь на множестве первых ключевых точек первого объекта в первом изображении видеокадра;calculating an anchor point of a first object in the first image of the video frame based on the plurality of first key points of the first object in the first image of the video frame;

посредством выравнивания точки привязки третьего объекта с точкой привязки первого объекта в первом изображении видеокадра, наложения третьего объекта в качестве изображения переднего плана в первом изображении видеокадра для получения второго изображения видеокадра.by aligning the anchor point of the third object with the anchor point of the first object in the first video frame image, overlaying the third object as a foreground image in the first video frame image to obtain a second video frame image.

Кроме того, модуль 502 формирования второго изображения видеокадра дополнительно выполнен с возможностью:In addition, the second video frame image generating module 502 is further configured to:

вычисления первого расстояния между двумя ключевыми точками, заданными на первом объекте;calculating a first distance between two key points defined on the first object;

вычисления смещения второго объекта, основываясь на первом расстоянии;calculating the displacement of the second object based on the first distance;

в соответствии с положением второго объекта в первом изображении видеокадра и смещением второго объекта, наложения второго объекта в качестве изображения переднего плана на третий объект во втором изображении видеокадра для получения третьего изображения видеокадра.according to a position of the second object in the first video frame image and an offset of the second object, superimposing the second object as a foreground image on the third object in the second video frame image to obtain a third video frame image.

Далее, вычисление смещения второго объекта в соответствии с первым расстоянием содержит этапы, на которых:Next, calculating the displacement of the second object according to the first distance comprises the steps of:

получают угол отклонения и угол наклона первого объекта, где угол отклонения является углом в горизонтальной плоскости между ориентацией первого объекта в первом изображении видеокадра и направлением съемки объектива, а угол наклона является углом в вертикальной плоскости между ориентацией первого объекта в первом изображении видеокадра и направлением съемки объектива;the deflection angle and the tilt angle of the first object are obtained, where the deflection angle is the angle in the horizontal plane between the orientation of the first object in the first video frame image and the shooting direction of the lens, and the tilt angle is the angle in the vertical plane between the orientation of the first object in the first video frame image and the shooting direction of the lens ;

вычисляют смещение второго объекта, основываясь на первом расстоянии, угле отклонения и угле наклона.calculating the displacement of the second object based on the first distance, the deviation angle and the tilt angle.

Дополнительно, в соответствии с положением второго объекта в первом изображении видеокадра и смещением второго объекта, наложение второго объекта в качестве изображения переднего плана на третий объект во втором изображении видеокадра для получения третьего изображения видеокадра содержит этапы, на которых:Further, in accordance with the position of the second object in the first video frame image and the offset of the second object, superimposing the second object as a foreground image on the third object in the second video frame image to obtain a third video frame image comprises the steps of:

выполняют смещение положения для начальной точки привязки второго объекта в первом изображении видеокадра в соответствии со смещением второго объекта, чтобы получить целевую точку привязки;performing a position offset for the start anchor point of the second object in the first image of the video frame in accordance with the offset of the second object to obtain a target anchor point;

представляют во втором изображении видеокадра второй объект в качестве изображения переднего плана в положении целевой точки привязки для получения третьего изображения видеокадра.presenting, in a second image of the video frame, a second object as a foreground image at a position of the target anchor point to obtain a third image of the video frame.

Кроме того, устройство 500 обработки изображений дополнительно содержит:In addition, the image processing device 500 further includes:

модуль формирования четвертого видеоизображения, выполненный с возможностью преобразования цветовых пространств второго объекта и третьего объекта в третьем изображении видеокадра из цветового пространства RGB в цветовое пространство HSV; замены значения второго объекта в канале H в цветовом пространстве HSV на значение третьего объекта в канале H; и преобразования цветовых пространств второго объекта и третьего объекта из пространства HSV в цветовое пространство RGB для получения четвертого изображения видеокадра.a fourth video image generating module configured to convert the color spaces of the second object and the third object in the third image of the video frame from the RGB color space to the HSV color space; replacing the value of the second object in the H channel in the HSV color space with the value of the third object in the H channel; and converting the color spaces of the second object and the third object from the HSV space to the RGB color space to obtain a fourth image of the video frame.

Устройство, как показано на фиг. 5, может выполнять способы вариантов осуществления, показанные на фиг. 1-4. Для деталей, не описанных подробно в этом варианте осуществления, обратитесь к соответствующему описанию вариантов осуществления, показанных на фиг. 1-4. По процессу реализации и техническому эффекту технической схемы можно обратиться к описанию вариантов осуществления, показанных на фиг. 1-4, и их описание здесь не повторяется.The device as shown in FIG. 5 may perform the methods of the embodiments shown in FIG. 1-4. For details not described in detail in this embodiment, refer to the corresponding description of the embodiments shown in FIG. 1-4. Regarding the implementation process and the technical effect of the technical scheme, reference may be made to the description of the embodiments shown in FIG. 1-4, and their description is not repeated here.

На фиг. 6 схематично показана структурная схема электронного устройства 600 (например, оконечного устройства или сервера на фиг. 1), пригодного для реализации вариантов осуществления настоящего раскрытия. Оконечные устройства в вариантах осуществления настоящей заявки могут содержать, но не ограничиваясь только этим, мобильные терминалы, такие как мобильные телефоны, портативные компьютеры, цифровые бытовые радиоприемники, PDA (персональные цифровые секретари), PAD (планшетные компьютеры), PMP (portable multimedia player, портативные мультимедийные проигрыватели), навигационные терминалы, устанавливаемые на транспортном средстве, (например, навигационные терминалы, устанавливаемые на автомобилях) и стационарные терминалы, такие как цифровые телевизоры, настольные компьютеры и т. п. Электронное устройство, показанное на фиг. 6, является только примером и не должно вносить ограничений в функции и объем защиты заявки для вариантов осуществления настоящего раскрытия.In fig. 6 is a schematic block diagram of an electronic device 600 (such as the terminal device or server of FIG. 1) suitable for implementing embodiments of the present disclosure. Terminal devices in embodiments of the present application may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital consumer radios, PDAs (personal digital assistants), PADs (tablet computers), PMP (portable multimedia player, portable media players), vehicle-mounted navigation terminals (for example, navigation terminals installed on automobiles), and fixed terminals such as digital televisions, desktop computers, etc. The electronic device shown in FIG. 6 is an example only and is not intended to limit the functionality or scope of application protection for embodiments of the present disclosure.

Как показано на фиг. 6, электронное устройство 600 может содержать устройство 601 обработки (такое как центральный процессор, графический процессор и т. д.), которое может выполнять различные соответствующие действия и процессы в соответствии с программой, хранящейся в постоянной памяти 602 (read-only memory, ROM), или программой, загруженной в оперативную память 603 (random access memory, RAM) из запоминающего устройства 608. В RAM 603 также хранятся различные программы и данные, требующиеся для работы электронного устройства 600. Устройство 601 обработки, ROM 602 и RAM 603 соединяются друг с другом через шину 604. Интерфейс 605 ввода/вывода (input/output, I/O) 605 также соединяется с шиной 604.As shown in FIG. 6, the electronic device 600 may include a processing device 601 (such as a central processing unit, graphics processing unit, etc.) that can perform various related actions and processes in accordance with a program stored in read-only memory 602 (ROM). ), or a program loaded into random access memory 603 (random access memory, RAM) from storage device 608. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602 and RAM 603 are connected to each other with a friend via bus 604. An input/output (I/O) interface 605 is also connected to bus 604.

В целом, к интерфейсу 605 I/O могут быть подключены следующие устройства: устройство 606 ввода данных, содержащее, например, сенсорный экран, сенсорную панель, клавиатуру, мышь, камеру, микрофон, акселерометр, гироскоп и т. п.; устройство 607 вывода, содержащее, например, жидкокристаллический дисплей (liquid crystal display, LCD), динамик, вибропреобразователь и т.п.; запоминающее устройство 608, содержащее, например, магнитную ленту, жесткий диск и т. д.; и устройство 609 связи. Устройство 609 связи может позволить электронному устройству 600 осуществлять беспроводную связь или проводную связь с другими устройствами, чтобы обмениваться данными. Хотя на фиг. 6 показано электронное устройство 600 с различными компонентами, следует понимать, что не требуется реализовывать или иметь все показанные устройства. Вместо этого может обеспечиваться или реализовываться больше или меньше устройств.In general, the following devices may be connected to the I/O interface 605: an input device 606, including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibration transducer, and the like; a storage device 608 containing, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. Communication device 609 may allow electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although in FIG. 6 shows an electronic device 600 with various components, it should be understood that it is not necessary to implement or have all of the devices shown. Instead, more or fewer devices may be provided or implemented.

В частности, согласно вариантам осуществления настоящего раскрытия, процесс, описанный выше со ссылкой на блок-схему последовательности выполнения операций, может быть реализован как компьютерная программа. Например, варианты осуществления настоящего раскрытия содержат компьютерный программный продукт, который может содержать компьютерную программу, переносимую на считываемом компьютером носителе долговременного использования, компьютерную программу, содержащую управляющие программы для выполнения способа, показанного на блок-схеме последовательности выполнения операций. В таком варианте осуществления компьютерная программа может загружаться и устанавливаться из сети через устройство 609 связи или устанавливаться из запоминающего устройства 608 или устанавливаться из ROM 602. Когда компьютерная программа исполняется устройством 601 обработки, могут выполняться вышеупомянутые функции, определенные в способах вариантов осуществления настоящего раскрытия.In particular, according to embodiments of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer program. For example, embodiments of the present disclosure include a computer program product that may include a computer program carried on a computer-readable medium, a computer program containing control programs for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the methods of the embodiments of the present disclosure may be performed.

Следует заметить, что вышеупомянутый машиночитаемый носитель информации, соответствующий настоящему раскрытию, может быть считываемым компьютером носителем сигнала или считываемым компьютером носителем запоминающего устройства или любым их сочетанием. Машиночитаемый носитель информации может быть, например, не ограничиваясь только этим, электрической, магнитной, оптической, электромагнитной, инфракрасной или полупроводниковой системой, оборудованием или устройством или любым сочетанием вышеупомянутого. Более конкретные примеры считываемых компьютером носителей могут содержать, но не ограничиваясь только этим, однопроводное или многопроводное электрическое соединение, дискету портативного компьютера, жесткий диск, оперативную память (RAM), постоянную память (ROM), стираемую программируемую постоянную память (EPROM или флэш-память), оптоволокно, портативное запоминающее устройство на компакт-дисках (CD-ROM), оптическое запоминающее устройство, магнитное запоминающее устройство или любое подходящее сочетание вышеупомянутого. В настоящем раскрытии машиночитаемый носитель информации может быть любым материальным носителем, содержащим или хранящим программу, которая может использоваться или быть связана с системой исполнения команд, оборудованием или устройством. В настоящем раскрытии, однако, машиночитаемый носитель информации сигнала может содержать сигналы данных, распространяющиеся в основной полосе или как часть несущей волны, на которой переносятся считываемые управляющие программы. Этот распространяющийся сигнал данных может принимать различные формы, в том числе, но не ограничиваясь только этим, электромагнитный сигнал, оптический сигнал или любое подходящее сочетание вышеупомянутого. Машиночитаемый носитель информации сигнала может также быть любым считываемым компьютером носителем, кроме считываемого компьютером носителя данных, который может пересылать, распространять или транспортировать программу для использования в системе исполнения команд, оборудованием или устройством или в связи с ними. Управляющие программы, содержащиеся на считываемом компьютером носителе, могут передаваться с помощью любого подходящего носителя, в том числе, но не ограничиваясь только этим, электрического провода, оптического кабеля, радиочастотного кабеля и т. д. или любого подходящего сочетания вышеупомянутого.It should be noted that the above-mentioned computer-readable storage medium according to the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, equipment or device, or any combination of the foregoing. More specific examples of computer-readable media may include, but are not limited to, a single-wire or multi-wire electrical connection, a laptop floppy disk, a hard drive, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory). ), optical fiber, portable compact disc storage device (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. As used herein, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used or associated with an instruction execution system, hardware, or device. In the present disclosure, however, the computer-readable signal storage medium may comprise data signals propagated in a baseband or as part of a carrier wave on which read control programs are carried. This propagating data signal may take various forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. A computer-readable signal storage medium may also be any computer-readable medium, other than a computer-readable storage medium, that can transmit, distribute, or transport a program for use by or in connection with an instruction execution system, equipment, or device. The control programs contained on the computer-readable medium may be transmitted via any suitable medium, including, but not limited to, electrical wire, optical cable, radio frequency cable, etc., or any suitable combination thereof.

В некоторых вариантах осуществления клиент и сервер могут осуществлять связь, используя любой известный в настоящее время или разработанный в будущем сетевой протокол, такой как HTTP (HyperText Transfer Protocol, протокол передачи гипертекста), и могут связываться друг с другом с помощью любой формы или носителя цифровой передачи данных (например, сеть связи). Примеры сетей связи содержат локальные сети (local area network, "LAN"), глобальные вычислительные сети (wide area network, "WAN"), интеллектуальная сеть (например, Интернет) и сквозные сети (например, заказные сквозные сети), а также любые известные в настоящее время или разработанные в будущем сети.In some embodiments, the client and server may communicate using any currently known or hereafter developed network protocol, such as HTTP (HyperText Transfer Protocol), and may communicate with each other using any form or media digital data transmission (for example, communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), intelligent networks (such as the Internet), and end-to-end networks (such as custom end-to-end networks), as well as any networks currently known or developed in the future.

Машиночитаемый носитель информации может быть включен в электронное устройство или он может существовать отдельно, не входя в состав сборки электронного устройства.The computer-readable storage medium may be included in an electronic device, or it may exist separately and not be part of an electronic device assembly.

Машиночитаемый носитель информации содержит одну или более программ, которые, когда исполняются электронным устройством, заставляют электронное устройство идентифицировать первый объект в первом изображении видеокадра и второй объект, расположенный в первом объекте; в соответствии с положением первого объекта в первом изображении видеокадра, накладывать третий объект в качестве изображения переднего плана на первое изображение видеокадра для получения второго изображения видеокадра; причем третий объект накладывается на первый объект во втором изображении видеокадра; и, в соответствии с положением второго объекта в первом изображении видеокадра, второй объект в качестве изображения переднего плана накладывается на третий объект второго изображения видеокадра, чтобы получить третье изображение видеокадра.The computer-readable storage medium contains one or more programs that, when executed by an electronic device, cause the electronic device to identify a first object in a first video frame image and a second object located in the first object; according to the position of the first object in the first video frame image, superimpose the third object as a foreground image on the first video frame image to obtain a second video frame image; wherein the third object is superimposed on the first object in the second image of the video frame; and, according to the position of the second object in the first video frame image, the second object as a foreground image is superimposed on the third object of the second video frame image to obtain a third video frame image.

Компьютерные управляющие программы для выполнения операций настоящего раскрытия могут быть написаны на одном или более языках программирования или их сочетаниях, включая, но не ограничиваясь только этим, языки объектно-ориентированного программирования, такие как Java, Smalltalk, C++ и стандартные языки процедурного программирования, такие как язык "C" или подобные языки программирования. Программа может исполняться полностью на компьютере пользователя, частично на компьютере пользователя, как независимый пакет программного обеспечения, частично на компьютере пользователя, частично на удаленном компьютере или полностью на удаленном компьютере или сервере. В случае удаленного компьютера, удаленный компьютер может быть подключен к компьютеру пользователя через любой вид сети, включая локальную сеть (LAN) или глобальную вычислительную сеть (WAN), или может быть подключен к внешнему компьютеру (например, с помощью Интернет-провайдера для соединения через Интернет).Computer control programs for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and standard procedural programming languages such as "C" language or similar programming languages. The program may be executed entirely on the user's computer, partially on the user's computer as an independent software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or wide area network (WAN), or may be connected to an external computer (for example, using an Internet service provider to connect via Internet).

Блок-схема последовательности выполнения операций и блок-схема на чертежах показывают архитектуру, функции и операции возможных реализаций систем, способов и компьютерных программных продуктов, соответствующих различным вариантам осуществления настоящего раскрытия. В этом отношении каждый блок на блок-схеме последовательности выполнения операций или блок-схеме может представить модуль, сегмент программы или часть кода, которая содержит одну или более исполняемых команд для реализации указанных логических функций. Следует также заметить, что в некоторых альтернативных реализациях, функции, указанные в блоках, могут также происходить в порядке, отличном от показанного на чертеже. Например, два последовательных блока могут на самом деле выполняться, в основном, параллельно, а иногда они могут выполняться в обратном порядке, в зависимости от содержащихся в них функций. Следует также заметить, что каждый блок в блок-схеме и/или в блок-схеме последовательности выполнения операций и сочетание блоков в блок-схеме и/или блок-схеме последовательности выполнения операций может быть реализован, выделенной системой, основанной на аппаратных средствах, которая выполняет указанные функции или операции, или может быть реализован сочетанием выделенных аппаратных средств и компьютерных команд.The flowchart and block diagram in the drawings show the architecture, functions, and operations of possible implementations of systems, methods, and computer program products corresponding to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or piece of code that contains one or more executable instructions to implement specified logical functions. It should also be noted that in some alternative implementations, the functions specified in the blocks may also occur in a different order from that shown in the drawing. For example, two consecutive blocks may actually be executed mostly in parallel, and sometimes they may be executed in reverse order, depending on the functions they contain. It should also be noted that each block in the block diagram and/or flowchart and combination of blocks in the block diagram and/or flowchart may be implemented by a dedicated hardware-based system that performs specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

Блоки, используемые в вариантах осуществления, описанные в настоящем раскрытии, могут быть реализованы программным обеспечением или аппаратными средствами. В некоторых случаях название блока не устанавливает ограничение на сам блок.The blocks used in the embodiments described in the present disclosure may be implemented in software or hardware. In some cases, the block name does not set a limit on the block itself.

Функции, описанные выше в настоящем документе, могут, по меньшей мере частично, выполняться одним или более аппаратными логическими компонентами. Например, без ограничения, примерными аппаратными логическими компонентами, которые могут использоваться, могут являться: программируемая логическая интегральная схема (Field Programmable Gate Array, FPGA), специализированная прикладная интегральная схема (Application Specific Integrated Circuit, ASIC), специализированный прикладной стандартный продукт (Application Specific Standard Product, ASSP), система на микросхеме (System-on-Chip, SOC), сложное программируемое логическое устройство (Complex Programmable Logic Device, CPLD) и т. д.The functions described above herein may be, at least in part, performed by one or more hardware logic components. For example, without limitation, exemplary hardware logic components that may be used include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Product, ASSP), System-on-Chip (SOC), Complex Programmable Logic Device (CPLD), etc.

В контексте настоящего раскрытия машиночитаемый носитель может быть материальным носителем, который может содержать или хранить программу для использования системой выполнения команды, оборудованием или устройством или быть связанной с ними. Машиночитаемый носитель может быть машиночитаемым носителем сигнала или машиночитаемым носителем запоминающего устройства. Машиночитаемый носитель может содержать, но не ограничиваясь только этим, электронные, магнитные, оптические, электромагнитные, инфракрасные или полупроводниковые системы, оборудование или устройства или любое соответствующее их сочетание. Более конкретные примеры машиночитаемых носителей содержат электрическое соединение на основе одного или более проводов, диск портативного компьютера, жесткий диск, оперативную память (RAM), постоянную память (ROM), стираемую программируемую постоянную память (EPROM или флэш-память), оптоволокно, постоянное запоминающее устройство компакт-дисках (CD-ROM), оптическое запоминающее устройство, магнитное запоминающее устройство или любое соответствующее их сочетание.In the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by or associated with an instruction execution system, equipment, or device. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A machine-readable medium may contain, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, equipment or devices, or any suitable combination thereof. More specific examples of computer-readable media include an electrical connection based on one or more wires, a laptop computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), fiber optic, read-only memory a compact disc drive (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

Раскрытый вариант осуществления также обеспечивает компьютерную программу, и когда компьютерная программа исполняется компьютером, компьютер исполняет способ обработки изображений, представленный вариантами осуществления настоящего раскрытия.The disclosed embodiment also provides a computer program, and when the computer program is executed by a computer, the computer executes the image processing method represented by embodiments of the present disclosure.

В соответствии с одним или более вариантами осуществления настоящего раскрытия, обеспечивают способ обработки изображений, содержащий этапы, на которых:In accordance with one or more embodiments of the present disclosure, an image processing method is provided, comprising the steps of:

идентифицируют первый объект в первом изображении видеокадра и второй объект, расположенный в первом объекте;identifying a first object in the first image of the video frame and a second object located in the first object;

в соответствии с положением первого объекта в первом изображении видеокадра, накладывают третий объект в качестве изображения переднего плана на первое изображение видеокадра, чтобы получить второе изображение видеокадра; где третий объект накладывает первый объект на второе изображение видеокадра;according to the position of the first object in the first video frame image, superimposing the third object as a foreground image on the first video frame image to obtain a second video frame image; where the third object superimposes the first object on the second image of the video frame;

в соответствии с положением второго объекта в первом изображении видеокадра, накладывают второй объект в качестве изображения переднего плана на третий объект второго изображения видеокадра, чтобы получить третье изображение видеокадра.according to the position of the second object in the first video frame image, superimposing the second object as a foreground image on the third object of the second video frame image to obtain a third video frame image.

Дополнительно, идентификация первого объекта в первом изображении видеокадра и второго объекта, расположенного в первом объекте, содержит этапы, на которых:Additionally, identifying a first object in a first image of a video frame and a second object located in the first object comprises the steps of:

идентифицируют множество первых ключевых точек первого объекта и множество вторых ключевых точек второго объекта в первом изображении видеокадра;identifying a plurality of first key points of the first object and a plurality of second key points of the second object in the first image of the video frame;

идентифицируют первый объект, основываясь на множестве первых ключевых точек первого объекта;identifying a first object based on the plurality of first key points of the first object;

идентифицируют второй объект, основываясь на множестве вторых ключевых точек второго объекта, где множество вторых ключевых точек являются граничными ключевыми точками второго объекта.identifying a second object based on a plurality of second key points of the second object, where the plurality of second key points are boundary key points of the second object.

Дополнительно, в соответствии с положением первого объекта в первом изображении видеокадра, наложение третьего объекта в качестве изображения переднего плана на первое изображение видеокадра, чтобы получить второе изображение видеокадра, содержит этапы, на которых:Further, according to the position of the first object in the first video frame image, superimposing the third object as a foreground image on the first video frame image to obtain a second video frame image comprises the steps of:

вычисляют точку привязки первого объекта в первом изображении видеокадра, основываясь на множестве первых ключевых точек первого объекта в первом изображении видеокадра;calculating an anchor point of the first object in the first image of the video frame based on the plurality of first key points of the first object in the first image of the video frame;

выравнивая точку привязки третьего объекта с точкой привязки первого объекта в первом изображении видеокадра, накладывают третий объект в качестве изображения переднего плана на первое изображение видеокадра, чтобы получить второе изображение видеокадра.aligning the anchor point of the third object with the anchor point of the first object in the first video frame image, superimposing the third object as a foreground image on the first video frame image to obtain a second video frame image.

Дополнительно, в соответствии с положением второго объекта в первом изображении видеокадра, наложение второго объекта в качестве изображения переднего плана на третий объект второго изображения видеокадра, чтобы получить третье изображение видеокадра, содержит этапы, на которых:Further, according to the position of the second object in the first video frame image, superimposing the second object as a foreground image onto the third object of the second video frame image to obtain a third video frame image comprises the steps of:

вычисляют первое расстояние между двумя ключевыми точками, заданными на первом объекте;calculating a first distance between two key points defined on the first object;

вычисляют смещение второго объекта, основываясь на первом расстоянии;calculating the displacement of the second object based on the first distance;

в соответствии с положением второго объекта в первом изображении видеокадра и смещением второго объекта, накладывают второй объект в качестве изображения переднего плана на третий объект во втором изображении видеокадра для получения третьего изображения видеокадра.according to the position of the second object in the first video frame image and the offset of the second object, superimposing the second object as a foreground image on the third object in the second video frame image to obtain a third video frame image.

Дополнительно, вычисление смещения второго объекта, основываясь на первом расстоянии, содержит этапы, на которых:Additionally, calculating the displacement of the second object based on the first distance comprises the steps of:

получают угол отклонения и угол наклона первого объекта, где угол отклонения является углом в горизонтальной плоскости между ориентацией первого объекта в первом изображении видеокадра и направлением съемки объектива, а угол наклона является углом в вертикальной плоскости между ориентацией первого объекта в первом изображении видеокадра и направлением съемки объектива;the deflection angle and the tilt angle of the first object are obtained, where the deflection angle is the angle in the horizontal plane between the orientation of the first object in the first video frame image and the shooting direction of the lens, and the tilt angle is the angle in the vertical plane between the orientation of the first object in the first video frame image and the shooting direction of the lens ;

вычисляют смещение второго объекта, основываясь на первом расстоянии, угле отклонения и угле наклона.calculating the displacement of the second object based on the first distance, the deviation angle and the tilt angle.

Дополнительно, в соответствии с положением второго объекта в первом изображении видеокадра и смещением второго объекта, наложение второго объекта в качестве изображения переднего плана на третий объект во втором изображении видеокадра для получения третьего изображения видеокадра содержит этапы, на которых:Further, in accordance with the position of the second object in the first video frame image and the offset of the second object, superimposing the second object as a foreground image on the third object in the second video frame image to obtain a third video frame image comprises the steps of:

выполняют смещение положения начальной точки привязки второго объекта в первом изображении видеокадра в соответствии со смещением второго объекта, чтобы получить целевую точку привязки;shifting the position of the start anchor point of the second object in the first image of the video frame in accordance with the offset of the second object to obtain a target anchor point;

во втором изображении видеокадра представляют второй объект в качестве изображения переднего плана в положении целевой точки привязки для получения третьего изображения видеокадра.in the second video frame image, present a second object as a foreground image at the position of the target anchor point to obtain a third video frame image.

Дополнительно, способ также после получения третьего изображения видеокадра содержит этапы, на которых:Additionally, the method also after receiving the third image of the video frame comprises the steps of:

преобразуют цветовые пространства второго объекта и третьего объекта в третьем изображении видеокадра из цветового пространства RGB в цветовое пространство HSV ;converting the color spaces of the second object and the third object in the third image of the video frame from an RGB color space to an HSV color space;

заменяют значение второго объекта в канале H в цветовом пространстве HSV на значение третьего объекта в канале H;replacing the value of the second object in the H channel in the HSV color space with the value of the third object in the H channel;

преобразуют цветовые пространства второго объекта и третьего объекта из пространства HSV в цветовое пространство RGB для получения четвертого изображения видеокадра.converting the color spaces of the second object and the third object from the HSV space to the RGB color space to obtain a fourth image of the video frame.

В соответствии с одним или более вариантами осуществления настоящего раскрытия, обеспечивается устройство обработки изображений, содержащее:In accordance with one or more embodiments of the present disclosure, there is provided an image processing apparatus comprising:

модуль идентификации объекта, выполненный с возможностью идентификации первого объекта в первом изображении видеокадра и второго объекта, расположенного в первом объекте;an object identification module configured to identify a first object in the first image of the video frame and a second object located in the first object;

модуль формирования второго изображения видеокадра, выполненный в соответствии с положением первого объекта в первом изображении видеокадра с возможностью наложения третьего объекта в качестве изображения переднего плана на первое изображение видеокадра для получения второго изображения видеокадра; в котором третий объект накладывает первый объект на второе изображение видеокадра;a second video frame image generating module configured in accordance with the position of a first object in the first video frame image with the ability to superimpose a third object as a foreground image on the first video frame image to obtain a second video frame image; wherein the third object superimposes the first object on the second image of the video frame;

модуль формирования третьего видеокадра, выполненный в соответствии с положением второго объекта в первом изображении видеокадра с возможностью наложения второго объекта в качестве изображения переднего плана на третий объект второго изображения видеокадра, чтобы получить третье изображение видеокадра.a third video frame generating module configured to correspond to the position of a second object in the first video frame image with the ability to superimpose the second object as a foreground image onto the third object of the second video frame image to obtain a third video frame image.

Дополнительно, модуль идентификации объекта также выполнен с возможностью:Additionally, the object identification module is also configured to:

идентификации множества первых ключевых точек первого объекта и множества вторых ключевых точек второго объекта в первом изображении видеокадра;identifying a plurality of first key points of the first object and a plurality of second key points of the second object in the first image of the video frame;

идентификации первого объекта, основываясь на множестве первых ключевых точек первого объекта;identifying a first object based on the plurality of first key points of the first object;

идентификации второго объекта, основываясь на множестве вторых ключевых точек второго объекта, где множество вторых ключевых точек являются граничными ключевыми точками второго объекта.identifying a second object based on a plurality of second key points of the second object, wherein the plurality of second key points are boundary key points of the second object.

Дополнительно, модуль формирования второго изображения видеокадра также выполнен с возможностью:Additionally, the module for generating the second image of the video frame is also configured to:

вычисления точки привязки первого объекта в первом изображении видеокадра, основываясь на множестве первых ключевых точек первого объекта в первом изображении видеокадра;calculating an anchor point of a first object in the first image of the video frame based on the plurality of first key points of the first object in the first image of the video frame;

наложения третьего объекта в качестве изображения переднего плана в первом изображении видеокадра для получения второго изображения видеокадра, выравнивая точку привязки третьего объекта с точкой привязки первого объекта в первом изображении видеокадра.overlaying the third object as a foreground image in the first video frame image to obtain a second video frame image, aligning an anchor point of the third object with an anchor point of the first object in the first video frame image.

Дополнительно, модуль формирования второго изображения видеокадра также выполнен с возможностью:Additionally, the module for generating the second image of the video frame is also configured to:

вычисления первого расстояния между двумя заданными ключевыми точками на первом объекте;calculating a first distance between two specified key points on the first object;

вычисления смещения второго объекта, основываясь на первом расстоянии;calculating the displacement of the second object based on the first distance;

в соответствии с положением второго объекта в первом изображении видеокадра и смещением второго объекта, наложения второго объекта в качестве изображения переднего плана на третий объект во втором изображении видеокадра для получения третьего изображения видеокадра.according to a position of the second object in the first video frame image and an offset of the second object, superimposing the second object as a foreground image on the third object in the second video frame image to obtain a third video frame image.

Дополнительно, вычисление смещения второго объекта, основываясь на первом расстоянии, содержит этапы, на которых:Additionally, calculating the displacement of the second object based on the first distance comprises the steps of:

получают угол отклонения и угол наклона первого объекта, где угол отклонения является углом в горизонтальной плоскости между ориентацией первого объекта в первом изображении видеокадра и направлением съемки объектива и угол наклона является углом в вертикальной плоскости между ориентацией первого объекта в первом изображении видеокадра и направлением съемки объектива;obtaining a deflection angle and an inclination angle of the first object, where the deflection angle is an angle in the horizontal plane between the orientation of the first object in the first video frame image and the shooting direction of the lens, and the inclination angle is an angle in the vertical plane between the orientation of the first object in the first video frame image and the shooting direction of the lens;

вычисляют смещение второго объекта, основываясь на первом расстоянии, угле отклонения и угле наклона.calculating the displacement of the second object based on the first distance, the deviation angle and the tilt angle.

Дополнительно, в соответствии с положением второго объекта в первом изображении видеокадра и смещением второго объекта, наложение второго объекта в качестве изображения переднего плана на третий объект во втором изображении видеокадра, чтобы получить третье изображение видеокадра, содержит этапы, на которых:Further, in accordance with the position of the second object in the first video frame image and the offset of the second object, superimposing the second object as a foreground image onto the third object in the second video frame image to obtain a third video frame image comprises the steps of:

выполняют смещение положения начальной точки привязки второго объекта в первом изображении видеокадра в соответствии со смещением второго объекта для получения целевой точки привязки;shifting the position of the starting anchor point of the second object in the first image of the video frame in accordance with the offset of the second object to obtain the target anchor point;

во втором изображении видеокадра представляют второй объект в качестве изображения переднего плана в положении целевой точки привязки для получения третьего изображения видеокадра.in the second video frame image, present a second object as a foreground image at the position of the target anchor point to obtain a third video frame image.

Дополнительно, устройство обработки изображений также содержит:Additionally, the image processing device also includes:

модуль формирования четвертого видеоизображения, выполненный с возможностью преобразования цветовых пространств второго объекта и третьего объекта в третьем изображении видеокадра в цветовое пространство HSV из цветового пространства RGB; замены значения второго объекта в канале H в цветовом пространстве HSV на значение третьего объекта в канале H; и преобразования цветовых пространств второго объекта и третьего объекта из пространства HSV в цветовое пространство RGB для получения четвертого изображения видеокадра.a fourth video image generating module configured to convert the color spaces of the second object and the third object in the third image of the video frame into an HSV color space from an RGB color space; replacing the value of the second object in the H channel in the HSV color space with the value of the third object in the H channel; and converting the color spaces of the second object and the third object from the HSV space to the RGB color space to obtain a fourth image of the video frame.

В соответствии с одним или более вариантами осуществления настоящего раскрытия, обеспечивается компьютерная программа, и когда компьютерная программа работает на компьютере, компьютер исполняет способ обработки изображений, представленный вариантами осуществления настоящего раскрытия.In accordance with one or more embodiments of the present disclosure, a computer program is provided, and when the computer program runs on a computer, the computer executes the image processing method represented by the embodiments of the present disclosure.

Приведенное выше описание является только вариантом осуществления настоящего раскрытия и объяснением применяемого технического принципа. Специалисты в данной области техники должны понимать, что объем раскрытия, приведенный в настоящем раскрытии, не ограничивается технической схемой, сформированной конкретным сочетанием вышеупомянутых технических признаков, а также охватывает другие технические схемы, сформированные любым сочетанием вышеупомянутых технических признаков или их эквивалентных признаков, не отступая от вышеупомянутой раскрытой концепции. Например, техническое решение, сформированное путем обмена вышеупомянутых признаков на технические признаки с подобными функциями, раскрытыми в настоящем раскрытии (но не ограничиваясь только этим).The above description is only an embodiment of the present disclosure and an explanation of the technical principle applied. Those skilled in the art will understand that the scope of the disclosure given in this disclosure is not limited to the technical circuit formed by a particular combination of the above-mentioned technical features, but also covers other technical circuits formed by any combination of the above-mentioned technical features or equivalent features, without departing from the above disclosed concept. For example, a technical solution formed by exchanging the above-mentioned features for technical features with similar functions disclosed in the present disclosure (but not limited to this).

Кроме того, хотя операции показаны в определенном порядке, это не должно пониматься как требование, чтобы эти операции выполнялись конкретно в показанном порядке или в последовательном порядке. При определенных обстоятельствах предпочтительной может быть многозадачная и параллельная обработка. Точно также, хотя в вышеупомянутом обсуждении содержатся несколько конкретных подробностей реализации, они не должны интерпретироваться как ограничивающие объем защиты настоящего раскрытия. Некоторые признаки, описанные в контексте отдельных вариантов осуществления, могут также быть реализованы в сочетании в едином варианте осуществления. Напротив, различные признаки, описанные в контексте одиночного варианта осуществления, могут быть также реализованы в многочисленных вариантах осуществления поодиночке или в любом подходящем сочетании.In addition, although operations are shown in a specific order, this should not be construed as a requirement that these operations be performed specifically in the order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be preferable. Likewise, although the foregoing discussion contains several specific implementation details, they should not be interpreted as limiting the scope of protection of the present disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable combination.

Хотя предмет изобретения был описан на языке способов, характерном для структурных признаков и/или логических действий, следует понимать, что предмет изобретения, определенный в приложенной формуле изобретения необязательно ограничивается конкретными признаками или действиями, описанными выше. Напротив, конкретные признаки и действия, описанные выше, являются только примерными формами реализации формулы изобретения.Although the subject matter of the invention has been described in method language specific to structural features and/or logical actions, it should be understood that the subject matter of the invention as defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are only exemplary forms of implementation of the claims.

Claims (52)

1. Способ обработки изображений, содержащий этапы, на которых:1. A method of image processing, comprising the steps of: идентифицируют первый объект в первом изображении видеокадра и второй объект, расположенный в первом объекте;identifying a first object in the first image of the video frame and a second object located in the first object; в соответствии с положением первого объекта в первом изображении видеокадра накладывают третий объект в качестве изображения переднего плана на первое изображение видеокадра для получения второго изображения видеокадра; при этом третий объект накладывает первый объект на второе изображение видеокадра;according to the position of the first object in the first video frame image, superimposing a third object as a foreground image on the first video frame image to obtain a second video frame image; wherein the third object superimposes the first object on the second image of the video frame; в соответствии с положением второго объекта в первом изображении видеокадра накладывают второй объект в качестве изображения переднего плана на третий объект второго изображения видеокадра для получения третьего изображения видеокадра.in accordance with the position of the second object in the first image of the video frame, superimposing the second object as a foreground image on the third object of the second image of the video frame to obtain a third image of the video frame. 2. Способ обработки изображений по п. 1, в котором этап идентификации первого объекта в первом изображении видеокадра и второго объекта, расположенного в первом объекте, содержит подэтапы, на которых:2. The image processing method according to claim 1, in which the step of identifying the first object in the first image of the video frame and the second object located in the first object contains substeps in which: идентифицируют множество первых ключевых точек первого объекта и множество вторых ключевых точек второго объекта в первом изображении видеокадра;identifying a plurality of first key points of the first object and a plurality of second key points of the second object in the first image of the video frame; идентифицируют первый объект на основе множества первых ключевых точек первого объекта;identifying a first object based on the plurality of first key points of the first object; идентифицируют второй объект на основе множества вторых ключевых точек второго объекта, причем множество вторых ключевых точек являются граничными ключевыми точками второго объекта.identifying a second object based on a plurality of second key points of the second object, the plurality of second key points being boundary key points of the second object. 3. Способ обработки изображений по п. 2, в котором, в соответствии с положением первого объекта в первом изображении видеокадра, этап наложения третьего объекта в качестве изображения переднего плана на первое изображение видеокадра для получения второго изображения видеокадра содержит подэтапы, на которых:3. The image processing method of claim 2, wherein, according to the position of the first object in the first image of the video frame, the step of overlaying the third object as a foreground image on the first image of the video frame to obtain the second image of the video frame comprises the substeps of: вычисляют точку привязки первого объекта в первом изображении видеокадра на основе множества первых ключевых точек первого объекта в первом изображении видеокадра;calculating an anchor point of the first object in the first image of the video frame based on the plurality of first key points of the first object in the first image of the video frame; выравнивают точку привязки третьего объекта с точкой привязки первого объекта в первом изображении видеокадра, накладывают третий объект в качестве изображения переднего плана на первое изображение видеокадра для получения второго изображения видеокадра.aligning the anchor point of the third object with the anchor point of the first object in the first image of the video frame, superimposing the third object as a foreground image on the first image of the video frame to obtain a second image of the video frame. 4. Способ обработки изображений по любому из пп. 1-3, в котором, в соответствии с положением второго объекта в первом изображении видеокадра, этап наложения второго объекта в качестве изображения переднего плана на третий объект второго изображения видеокадра, для получения третьего изображения видеокадра, содержит подэтапы, на которых:4. Method of image processing according to any one of claims. 1-3, wherein, according to the position of the second object in the first video frame image, the step of superimposing the second object as a foreground image onto the third object of the second video frame image to obtain a third video frame image comprises the sub-steps of: вычисляют первое расстояние между двумя ключевыми точками, заданными на первом объекте;calculating a first distance between two key points defined on the first object; вычисляют смещение второго объекта на основе первого расстояния;calculating the displacement of the second object based on the first distance; накладывают, в соответствии с положением второго объекта в первом изображении видеокадра и смещением второго объекта, второй объект в качестве изображения переднего плана на третий объект во втором изображении видеокадра для получения третьего изображения видеокадра.superimposing, in accordance with the position of the second object in the first video frame image and the offset of the second object, the second object as a foreground image onto the third object in the second video frame image to obtain a third video frame image. 5. Способ обработки изображений по п. 4, в котором этап вычисления смещения второго объекта, на основе первого расстояния, содержит подэтапы, на которых:5. The image processing method according to claim 4, wherein the step of calculating the displacement of the second object based on the first distance comprises the substeps of: получают угол отклонения и угол наклона первого объекта, при этом угол отклонения является углом в горизонтальной плоскости между ориентацией первого объекта в первом изображении видеокадра и направлением съемки объектива, а угол наклона является углом в вертикальной плоскости между ориентацией первого объекта в первом изображении видеокадра и направлением съемки объектива;a deflection angle and a tilt angle of the first object are obtained, wherein the deflection angle is an angle in a horizontal plane between the orientation of the first object in the first video frame image and the shooting direction of the lens, and the tilt angle is an angle in the vertical plane between the orientation of the first object in the first video frame image and the shooting direction lens; вычисляют смещение второго объекта, на основе первого расстояния, угла отклонения и угла наклона.calculating the displacement of the second object based on the first distance, the deflection angle and the tilt angle. 6. Способ обработки изображений по п. 4 или 5, в котором, в соответствии с положением второго объекта в первом изображении видеокадра и смещением второго объекта, этап наложения второго объекта в качестве изображения переднего плана на третий объект во втором изображении видеокадра, для получения третьего изображения видеокадра, содержит подэтапы, на которых:6. The image processing method of claim 4 or 5, wherein, according to the position of the second object in the first image of the video frame and the offset of the second object, the step of superimposing the second object as a foreground image on the third object in the second image of the video frame to obtain the third image of a video frame, contains substages in which: выполняют смещение положения начальной точки привязки второго объекта в первом изображении видеокадра в соответствии со смещением второго объекта для получения целевой точки привязки;shifting the position of the starting anchor point of the second object in the first image of the video frame in accordance with the offset of the second object to obtain the target anchor point; представляют, во втором изображении видеокадра, второй объект в качестве изображения переднего плана в положении целевой точки привязки для получения третьего изображения видеокадра.representing, in a second video frame image, a second object as a foreground image at the position of the target anchor point to obtain a third video frame image. 7. Способ обработки изображений по любому из пп. 1-6, дополнительно содержащий, после этапа получения третьего изображения видеокадра, этапы, на которых:7. Method of image processing according to any one of claims. 1-6, further comprising, after the step of obtaining a third image of a video frame, the steps of: преобразуют цветовые пространства второго объекта и третьего объекта в третьем изображении видеокадра из цветового пространства RGB в цветовое пространство HSV;converting the color spaces of the second object and the third object in the third image of the video frame from an RGB color space to an HSV color space; заменяют значение второго объекта в канале H в цветовом пространстве HSV на значение третьего объекта в канале H;replacing the value of the second object in the H channel in the HSV color space with the value of the third object in the H channel; преобразуют цветовые пространства второго объекта и третьего объекта из пространства HSV в цветовое пространство RGB для получения четвертого изображения видеокадра.converting the color spaces of the second object and the third object from the HSV space to the RGB color space to obtain a fourth image of the video frame. 8. Устройство обработки изображений, содержащее:8. An image processing device comprising: модуль идентификации объекта, выполненный с возможностью идентификации первого объекта в первом изображении видеокадра и второго объекта, расположенного в первом объекте;an object identification module configured to identify a first object in the first image of the video frame and a second object located in the first object; модуль формирования второго изображения видеокадра, выполненный с возможностью наложения, в соответствии с положением первого объекта в первом изображении видеокадра, третьего объекта в качестве изображения переднего плана на первое изображение видеокадра для получения второго изображения видеокадра; при этом третий объект накладывает первый объект на второе изображение видеокадра;a second video frame image generating module configured to superimpose, in accordance with the position of a first object in the first video frame image, a third object as a foreground image onto the first video frame image to obtain a second video frame image; wherein the third object superimposes the first object on the second image of the video frame; модуль формирования третьего видеокадра, выполненный с возможностью наложения, в соответствии с положением второго объекта в первом изображении видеокадра, второго объекта в качестве изображения переднего плана на третий объект второго изображения видеокадра, для получения третьего изображения видеокадра.a third video frame generating module configured to superimpose, in accordance with the position of the second object in the first video frame image, the second object as a foreground image onto the third object of the second video frame image to obtain a third video frame image. 9. Устройство обработки изображений по п. 8, в котором модуль идентификации объекта дополнительно выполнен с возможностью:9. The image processing device according to claim 8, in which the object identification module is additionally configured to: идентификации множества первых ключевых точек первого объекта и множества вторых ключевых точек второго объекта в первом изображении видеокадра;identifying a plurality of first key points of the first object and a plurality of second key points of the second object in the first image of the video frame; идентификации первого объекта на основе множества первых ключевых точек первого объекта;identifying a first object based on a plurality of first key points of the first object; идентификации второго объекта на основе множества вторых ключевых точек второго объекта, при этом множество вторых ключевых точек являются граничными ключевыми точками второго объекта.identifying a second object based on a plurality of second key points of the second object, wherein the plurality of second key points are boundary key points of the second object. 10. Устройство обработки изображений по п. 9, в котором модуль формирования второго видеокадра дополнительно выполнен с возможностью:10. The image processing device according to claim 9, in which the module for generating the second video frame is additionally configured to: вычисления точки привязки первого объекта в первом изображении видеокадра на основе множества первых ключевых точек первого объекта в первом изображении видеокадра;calculating an anchor point of a first object in the first image of the video frame based on the plurality of first key points of the first object in the first image of the video frame; наложения, посредством выравнивания точки привязки третьего объекта с точкой привязки первого объекта в первом изображении видеокадра, третьего объекта в качестве изображения переднего плана в первом изображении видеокадра для получения второго изображения видеокадра.overlaying, by aligning the anchor point of the third object with the anchor point of the first object in the first video frame image, the third object as a foreground image in the first video frame image to obtain a second video frame image. 11. Устройство обработки изображений по любому из пп. 8-10, в котором модуль формирования второго изображения видеокадра дополнительно выполнен с возможностью:11. An image processing device according to any one of claims. 8-10, in which the module for generating the second image of the video frame is additionally configured to: вычисления первого расстояния между двумя ключевыми точками, заданными на первом объекте;calculating a first distance between two key points defined on the first object; вычисления смещения второго объекта на основе первого расстояния;calculating the displacement of the second object based on the first distance; наложения, в соответствии с положением второго объекта в первом изображении видеокадра и смещением второго объекта, второго объекта в качестве изображения переднего плана на третий объект во втором изображении видеокадра для получения третьего изображения видеокадра.superimposing, in accordance with a position of a second object in the first video frame image and offsetting the second object, the second object as a foreground image onto the third object in the second video frame image to obtain a third video frame image. 12. Устройство обработки изображений по п. 11, в котором вычисление смещения объекта, на основе первого расстояния, содержит этапы, на которых:12. The image processing apparatus of claim 11, wherein calculating the displacement of the object based on the first distance comprises the steps of: получают угол отклонения и угол наклона первого объекта, причем угол отклонения является углом в горизонтальной плоскости между ориентацией первого объекта в первом изображении видеокадра и направлением съемки объектива, а угол наклона является углом в вертикальной плоскости между ориентацией первого объекта в первом изображении видеокадра и направлением съемки объектива;a deflection angle and an inclination angle of the first object are obtained, wherein the deflection angle is an angle in a horizontal plane between the orientation of the first object in the first video frame image and the shooting direction of the lens, and the inclination angle is an angle in the vertical plane between the orientation of the first object in the first video frame image and the shooting direction of the lens ; вычисляют смещение второго объекта на основе первого расстояния, угла отклонения и угла наклона.calculating the displacement of the second object based on the first distance, the deflection angle and the tilt angle. 13. Устройство обработки изображений по п. 11 или 12, в котором, в соответствии с положением второго объекта в первом изображении видеокадра и смещением второго объекта, наложение второго объекта в качестве изображения переднего плана на третий объект во втором изображении видеокадра для получения третьего изображения видеокадра содержит этапы, на которых:13. The image processing apparatus of claim 11 or 12, wherein, in accordance with the position of the second object in the first video frame image and the offset of the second object, superimposing the second object as a foreground image on the third object in the second video frame image to obtain a third video frame image contains stages in which: выполняют смещение положения начальной точки привязки второго объекта в первом изображении видеокадра в соответствии со смещением второго объекта для получения целевой точки привязки;shifting the position of the starting anchor point of the second object in the first image of the video frame in accordance with the offset of the second object to obtain the target anchor point; представляют, во втором изображении видеокадра, второй объект в качестве изображения переднего плана в положении целевой точки привязки для получения третьего изображения видеокадра.representing, in a second video frame image, a second object as a foreground image at the position of the target anchor point to obtain a third video frame image. 14. Устройство обработки изображений по любому из пп. 8-13, дополнительно содержащее:14. An image processing device according to any one of claims. 8-13, additionally containing: модуль формирования четвертого видеоизображения, выполненный с возможностью преобразования цветовых пространств второго объекта и третьего объекта в третьем изображении видеокадра из цветового пространства RGB в цветовое пространство HSV; замены значения второго объекта в канале H в цветовом пространстве HSV на значение третьего объекта в канале H; и преобразования цветовых пространств второго объекта и третьего объекта из пространства HSV в цветовое пространство RGB для получения четвертого изображения видеокадра.a fourth video image generating module configured to convert the color spaces of the second object and the third object in the third image of the video frame from the RGB color space to the HSV color space; replacing the value of the second object in the H channel in the HSV color space with the value of the third object in the H channel; and converting the color spaces of the second object and the third object from the HSV space to the RGB color space to obtain a fourth image of the video frame. 15. Электронное устройство обработки изображения, содержащее:15. An electronic image processing device containing: память для хранения машиночитаемых команд; и memory for storing machine-readable instructions; And процессор для исполнения машиночитаемых команд, так что процессор, при исполнении машиночитаемых команды, выполнен с возможностью реализации способа обработки изображений по любому из пп. 1-7.a processor for executing computer-readable instructions, such that the processor, when executing the machine-readable instructions, is configured to implement the image processing method according to any one of claims. 1-7. 16. Энергонезависимый машиночитаемый носитель информации, хранящий считываемые компьютером команды, вызывающие, при исполнении компьютером, выполнение, компьютером, способа обработки изображений по любому из пп. 1-7.16. A non-volatile computer-readable storage medium storing computer-readable commands that cause, when executed by a computer, execution by a computer of an image processing method according to any one of claims. 1-7.
RU2022119396A 2019-12-18 2020-12-16 Image processing method and device, electronic device and machine readable storage carrier RU2802724C1 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911306421.6 2019-12-18

Publications (1)

Publication Number Publication Date
RU2802724C1 true RU2802724C1 (en) 2023-08-31

Family

ID=

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019014646A1 (en) * 2017-07-13 2019-01-17 Shiseido Americas Corporation Virtual facial makeup removal, fast facial detection and landmark tracking
US10372972B2 (en) * 2013-10-09 2019-08-06 Aisin Seiki Kabushiki Kaisha Face detection apparatus, face detection method, and program
RU2703327C1 (en) * 2018-12-10 2019-10-16 Самсунг Электроникс Ко., Лтд. Method of processing a two-dimensional image and a user computing device thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10372972B2 (en) * 2013-10-09 2019-08-06 Aisin Seiki Kabushiki Kaisha Face detection apparatus, face detection method, and program
WO2019014646A1 (en) * 2017-07-13 2019-01-17 Shiseido Americas Corporation Virtual facial makeup removal, fast facial detection and landmark tracking
RU2703327C1 (en) * 2018-12-10 2019-10-16 Самсунг Электроникс Ко., Лтд. Method of processing a two-dimensional image and a user computing device thereof

Similar Documents

Publication Publication Date Title
CN111242881B (en) Method, device, storage medium and electronic equipment for displaying special effects
WO2021139382A1 (en) Face image processing method and apparatus, readable medium, and electronic device
CN111866483B (en) Color restoration method and device, computer readable medium and electronic device
WO2023179346A1 (en) Special effect image processing method and apparatus, electronic device, and storage medium
WO2023138559A1 (en) Virtual reality interaction method and apparatus, and device and storage medium
EP4300943A1 (en) Subtitle rendering method and apparatus for virtual reality space, device, and medium
CN113706440A (en) Image processing method, image processing device, computer equipment and storage medium
CN112766215A (en) Face fusion method and device, electronic equipment and storage medium
CN114358112A (en) Video fusion method, computer program product, client and storage medium
CN112967193A (en) Image calibration method and device, computer readable medium and electronic equipment
CN109816791B (en) Method and apparatus for generating information
US11810336B2 (en) Object display method and apparatus, electronic device, and computer readable storage medium
RU2802724C1 (en) Image processing method and device, electronic device and machine readable storage carrier
JP2023550970A (en) Methods, equipment, storage media, and program products for changing the background in the screen
KR102534449B1 (en) Image processing method, device, electronic device and computer readable storage medium
CN114049403A (en) Multi-angle three-dimensional face reconstruction method and device and storage medium
CN113936089A (en) Interface rendering method and device, storage medium and electronic equipment
WO2023035973A1 (en) Video processing method and apparatus, device, and medium
EP4086102A2 (en) Navigation method and apparatus, electronic device, readable storage medium and computer program product
WO2021031846A1 (en) Water ripple effect implementing method and apparatus, electronic device, and computer readable storage medium
CN117152385A (en) Image processing method, device, electronic equipment and storage medium
CN117745981A (en) Image generation method, device, electronic equipment and storage medium
CN117934769A (en) Image display method, device, electronic equipment and storage medium
CN117459745A (en) Information interaction method, device, electronic equipment and storage medium
CN117369677A (en) Cursor position determining method, device, equipment and medium