WO2023125291A1 - 一种图像显示方法、装置、系统及设备 - Google Patents

一种图像显示方法、装置、系统及设备 Download PDF

Info

Publication number
WO2023125291A1
WO2023125291A1 PCT/CN2022/141432 CN2022141432W WO2023125291A1 WO 2023125291 A1 WO2023125291 A1 WO 2023125291A1 CN 2022141432 W CN2022141432 W CN 2022141432W WO 2023125291 A1 WO2023125291 A1 WO 2023125291A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
hidden area
original image
coded data
encoded data
Prior art date
Application number
PCT/CN2022/141432
Other languages
English (en)
French (fr)
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 杭州海康威视数字技术股份有限公司
Publication of WO2023125291A1 publication Critical patent/WO2023125291A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process

Definitions

  • the present application relates to the field of video playback, in particular to an image display method, device, system and equipment.
  • the encrypted video images in the related art generally adopt a private encryption scheme, and the encrypted video images can only be displayed after decryption, the encrypted video images in the related art can only be displayed on the specified player. , and cannot be displayed using a standard player.
  • the present application discloses an image display method, device, system, and equipment, so that the image that has been masked to the hidden area can be displayed on a standard player, for example, standard players such as VLC Media Player and the Media player that comes with windows. .
  • an image display method applied to a server device including: when an original image is obtained, determining a hidden area and a non-hidden area in the original image; a first image corresponding to the non-hidden area, and generate a second image corresponding to the hidden area; encode the first image to obtain first encoded data corresponding to the first image, and perform encoding on the second image Encoding to obtain the second coded data corresponding to the second image, and encrypting the second coded data to obtain third coded data; the target code stream including the first coded data and the third coded data sent to the client device.
  • said generating the first image corresponding to the non-hidden area and generating the second image corresponding to the hidden area includes: filling the hidden area of the original image with a masked image to obtain the first image An image; performing matting processing on the hidden area of the original image to obtain a hidden sub-image corresponding to the hidden area, and generating the second image based on the hidden sub-image; wherein, the second image The resolution is the same as that of the original image, and the position of the hidden sub-image in the second image is the same as the position of the hidden sub-image in the original image.
  • the method before encrypting the second encoded data, the method further includes: acquiring masking information corresponding to the second image, and encapsulating the masking information in the third encoded data;
  • the masking information at least includes: video coding type, encryption information and hidden area information.
  • an image display method the method is applied to a client device, including: acquiring first encoded data and third encoded data from the target code stream; Decoding the data to obtain the first image corresponding to the non-hidden area in the original image; if the client device is allowed to display the hidden area in the original image, decrypt the third encoded data to obtain the second encoded data , decoding the second coded data to obtain a second image corresponding to the hidden area in the original image; generating an original image based on the first image and the second image, and displaying the original image.
  • the method further includes: if the client device is not allowed to display the hidden area in the original image, displaying the first image; wherein, if the client device does not support the hidden area display function, or , the client device does not get the correct verification information, then the client device is not allowed to display the hidden area in the original image; if the client device supports the hidden area display function, and the client device gets the correct authentication information, the client device is allowed to reveal hidden areas in the original image.
  • the decrypting the third coded data to obtain second coded data, and decoding the second coded data to obtain a second image corresponding to the hidden area in the original image include: Analyzing the masking information corresponding to the second image from the third encoded data, the masking information at least includes: video encoding type, encryption information; and obtaining information for decrypting the third encoded data based on the encrypted information a decryption key, decrypting the third coded data according to the decryption key to obtain second coded data; determining a target decoding method based on the video coding type, and deciphering the second coded data based on the target decoding method Decoding is performed to obtain the second image.
  • the occlusion information further includes hidden area information;
  • the generating the original image based on the first image and the second image includes: parsing out hidden area information from the second image according to the hidden area information area, and determine a target position corresponding to the hidden area from the first image, and superimpose the hidden area on the target position of the first image to obtain the original image.
  • an image display device which is applied to a server device, including: an area determination unit, configured to determine the hidden area and non-hidden area in the original image when the original image is acquired area; an image generating unit, configured to generate a first image corresponding to the non-hidden area, and generate a second image corresponding to the hidden area; an encoding unit, configured to encode the first image to obtain the First encoded data corresponding to the first image, encoding the second image to obtain second encoded data corresponding to the second image, and encrypting the second encoded data to obtain third encoded data; sending unit , configured to send the target code stream including the first coded data and the third coded data to the client device.
  • an image display device applied to a client device including: an acquisition unit, configured to acquire the first encoded data and the third encoded data from the target code stream; a decoding unit, Decoding the first encoded data to obtain a first image corresponding to the non-hidden area in the original image; if the client device is allowed to display the hidden area in the original image, then the third encoded data Decrypt to obtain second coded data, decode the second coded data to obtain a second image corresponding to the hidden area in the original image; an image display unit, configured to use the first image and the second image generates a raw image, and displays the raw image.
  • an image display system at least includes at least one server device and at least one client device; the server device is configured to determine when the original image is acquired a hidden area and a non-hidden area in the original image; generating a first image corresponding to the non-hidden area, and generating a second image corresponding to the hidden area; encoding the first image to obtain the First encoded data corresponding to the first image, encoding the second image to obtain second encoded data corresponding to the second image, and encrypting the second encoded data to obtain third encoded data; will include The target code stream of the first coded data and the third coded data is sent to the client device; the client device is configured to obtain the first coded data and the third coded data from the received target code stream data; decode the first encoded data to obtain the first image corresponding to the non-hidden area in the original image; if the client device is allowed to display the hidden area in the original image, then the third encoded data
  • an electronic device includes: a processor and a memory; the memory is used to store machine-executable instructions; the processor is used to read and execute the The machine-executable instructions stored in the memory are used to implement the above-mentioned image display method.
  • the server device can separately process the hidden area and the non-hidden area of the original image to generate the first image corresponding to the non-hidden area and the second image corresponding to the hidden area, and
  • the first coded data is obtained by encoding the first image
  • the third coded data is obtained by encoding and encrypting the second image, so as to prevent the second image carrying the private information in the hidden area from leaking the private information during the transmission process, and then on the client side
  • the client device can directly decode the first encoded data to obtain the first image, so that even if the client device does not support hiding Area display can also ensure the normal display of the first image, and if the client device is allowed to display the hidden area in the original image, the client device can also obtain the second image according to the third encoded data, based on the first image and the second Image generates the original image and displays
  • FIG. 1 is a flow chart of an image display method provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of an original video image frame provided by an embodiment of the present application.
  • Fig. 3 is a schematic diagram of a first image provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of the hidden sub-image in Fig. 2 provided by the embodiment of the present application;
  • Fig. 5 is a schematic diagram of a second image provided by an embodiment of the present application.
  • FIG. 6 is a flowchart of another method for realizing video playback provided by the embodiment of the present application.
  • Fig. 7 is a schematic diagram of an image display device provided by an embodiment of the present application.
  • Fig. 8 is a schematic diagram of another image display device provided by the embodiment of the present application.
  • FIG. 9 is a schematic diagram of an image display system provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • first, second, third, etc. may be used in this application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of the present application, first information may also be called second information, and similarly, second information may also be called first information. Depending on the context, the word “if” as used herein may be interpreted as “at” or “when” or “in response to a determination.”
  • the coded data of the entire video image is encrypted, and then the relevant information of the area (recorded as a hidden area) with private information (such as the coordinate position of the hidden area in the video image, the size of the area, etc.) and the privacy unmasking permission information used to indicate whether the hidden area is displayed, and the encrypted encoded data corresponding to the video image and the privacy unmasking permission information are transmitted to the playback terminal, and then when the video image is displayed, the playback terminal can
  • the privacy masking permission information is detected to indicate that the hidden area is displayed, the original video image is displayed; when the privacy masking license information is detected to indicate that the hidden area is not displayed, the hidden area in the original video image is masked and then displayed. after the video image.
  • FIG. 1 is a flowchart of an image display method provided by an embodiment of the present application.
  • the process shown in Figure 1 can be applied to server devices, such as cameras, or NVR (Network Video Recorder, Network Video Recorder), cloud storage servers and other devices that can store code streams and process code streams .
  • server devices such as cameras, or NVR (Network Video Recorder, Network Video Recorder), cloud storage servers and other devices that can store code streams and process code streams .
  • the process may include the following steps:
  • Step 101 when the original image is acquired, determine hidden areas and non-hidden areas in the original image.
  • the acquired video image captured by the video capture device may be used as the original image, or any received picture may be used as the original image.
  • the original image after the original image is acquired, the original image can be input into a preset privacy masking algorithm library, and the area carrying privacy information in the original image can be determined through the privacy masking algorithm library, and the area is determined to be used when displaying the original image.
  • the area that needs to be hidden (recorded as a hidden area)
  • the area outside the hidden area in the original image is determined as the area that does not need to be hidden when displaying the original image (that is, the area that does not carry private information, recorded as a non-hidden area)
  • the privacy masking algorithm library can recognize the face through the face recognition algorithm
  • the area where it is located is a hidden area, and other areas other than the hidden area are identified as non-hidden areas.
  • Step 102 generating a first image corresponding to the non-hidden area, and generating a second image corresponding to the hidden area.
  • the first image in step 102 can be obtained by filling the hidden area of the original image with the masked image, and by A matting process is performed on the hidden area to obtain a hidden sub-image corresponding to the hidden area, and a second image is generated based on the hidden sub-image.
  • the resolution of the second image obtained in this embodiment is the same as that of the original image
  • the position of the hidden sub-image in the second image is the same as the position of the hidden sub-image in the original image.
  • the hidden area in the original image can be filled with the mask image to obtain the first image.
  • the masking image filled in this embodiment can be a solid color image such as a pure white image, a pure black image, or a mosaic image, a blurred image, etc.
  • the masked image is filled into the hidden area.
  • the masked image can be obtained first, and then the masked layer is overlaid on the layer of the hidden area in the original image, or the hidden area in the original image can be The masked image is obtained after encoding directly, and the masked image is filled into the hidden area.
  • this embodiment can use the above-mentioned preset privacy masking algorithm library, according to the position coordinates and area size of each hidden area in the original image obtained in step 101, for each hidden area, the original image
  • the hidden area is subjected to matting processing, and the hidden sub-image corresponding to the hidden area is extracted from the original image.
  • the extracted hidden sub-image is shown in Fig. 4, and Fig. 4 is two hidden sub-images extracted from the original image shown in Fig. 2: hidden sub-image a and hidden sub-image b.
  • the hidden sub-image can be superimposed with a solid-color image having the same resolution as the original image according to the position of the hidden sub-image in the original image, as shown in Figure 5 (the solid-color image in Figure 5 image is a pure black image), so that the position of the hidden sub-image in the solid-color image after superimposition is the same as the position of the hidden sub-image in the original image.
  • Step 103 Encoding the first image to obtain first encoded data corresponding to the first image, encoding the second image to obtain second encoded data corresponding to the second image, and encrypting the second encoded data to obtain third encoded data data.
  • the encoding of the first image in step 103 may adopt a standard video encoding method, such as the H.264 video encoding method, the first encoded data obtained by the standard video encoding method, the first encoded data
  • the code stream obtained after encapsulation is also in a standard format, so the code stream corresponding to the first video data can be played on a standard player.
  • the code stream corresponding to the second encoded data of the second image (the hidden sub-image including the hidden area) cannot be Normal playback will not affect the normal playback of the code stream that covers the hidden area (that is, the code stream corresponding to the first encoded data).
  • the code stream corresponding to the first encoded data played is an image that covers the hidden area, which can prevent leakage of private information in the hidden area.
  • a standard encoded data encapsulation manner may be used to encapsulate the first encoded data into a standard video frame.
  • the non-masked area is stored in a standard format
  • the masked picture can be played on any player that supports the standard format, and the compatibility is strong.
  • the encoding of the second image in step 103 may also use the same video encoding method used when encoding the first image, so as to obtain the second encoded data corresponding to the second image. It should be noted that this embodiment does not limit the video encoding manner for encoding the second image, and adopting the same video encoding manner as the first image is only a manner for encoding the second image in this embodiment.
  • the masking information includes at least video encoding type, encryption information, and hidden area information.
  • the video encoding type indicates the video encoding method used when encoding the second image
  • the encryption information indicates the reference information of the encryption key used when encrypting the second encoded data
  • the hidden area information indicates the second image resolution, the number of hidden regions in the second image, the position and area size of each hidden region in the second image at the resolution.
  • the hidden region information may further carry the number of hidden regions.
  • the hidden area information indicates the resolution of the second image because the position and size of the hidden area in the second image are related to the size of the second image. Only when the second image is determined In the case of the resolution of the image, the position of the hidden area in the second image is determined, and the resolution of the screen in different players is generally different, depending on the resolution of the second image and the screen resolution of the player The corresponding position of the hidden area in the image displayed on the screen of the player can be determined only after converting the resolution.
  • the encryption key for encrypting the second encoded data can be obtained, and then the encrypted key is used to encrypt the second encoded data to obtain the third encoded data. Further, after the third coded data is obtained, the third coded data and the above-mentioned masking information may be packaged together by using the same coded data encapsulation method used when encapsulating the first coded data. Since the masking information is self-defined in this embodiment, it is different from the information encapsulated in the standard video frame in the related art.
  • the third coded data and masking information For encapsulation in order to distinguish the video frame obtained after encapsulating the first encoded data from the video frame obtained after encapsulating the third encoded data, record the video frame obtained after encapsulating the third encoded data as a private frame.
  • the processing of private frames (such as encryption processing) will not affect the playback of video frames, and the format conversion is more flexible, which can support multimedia with private information
  • the data is encapsulated into different standard formats such as PS, RTP, MP4, etc.
  • Step 104 sending the target code stream including the first coded data and the third coded data to the client device.
  • the same time stamp can be added to the video frame obtained by the first encoded data and the private frame obtained by the third encoded data, and the private frame is placed after the video frame in the target code stream, and then The target code stream is sent to the client device.
  • the server device can separately process the hidden area and the non-hidden area of the original image to generate the first image corresponding to the non-hidden area and the first image corresponding to the hidden area. two images, and obtain the first encoded data by encoding the first image, and encode and encrypt the second image to obtain the third encoded data, so as to prevent the second image carrying the private information in the hidden area from leaking the private information during transmission,
  • the first coded data can be used to play the picture of the code stream covering the hidden area.
  • FIG. 6 is a flow chart of another image display method provided by an embodiment of the present application.
  • the process shown in FIG. 6 may be applied to a client device, such as a terminal device.
  • the process may include the following steps:
  • Step 601 acquire first encoded data and third encoded data from a target code stream.
  • the client device when a user logs in to the client device and downloads the target code stream from the server device, the first coded data and third encoded data.
  • Step 602 decoding the first coded data to obtain a first image corresponding to the non-hidden area in the original image.
  • the video decoding method corresponding to the video encoding type can be directly used according to the video encoding type parsed from the video frame encapsulating the first encoded data , decode the first coded data to obtain the first image corresponding to the non-hidden area in the original image (as shown in FIG. 3 ).
  • Step 603 If the client device is allowed to display the hidden area in the original image, decrypt the third encoded data to obtain the second encoded data, and decode the second encoded data to obtain the hidden area corresponding to the original image second image.
  • the client device may be allowed to display the hidden area in the original image.
  • the client device when the user needs to view the hidden area in the original image, the client device may be triggered to obtain verification information, and the verification information is used to determine whether the user has the right to view the hidden area.
  • the client device can obtain the verification information of the user by sending a verification request to the verification server, or sending a verification code request to the short message server according to the user's mobile phone number.
  • the client can be triggered to verify the obtained verification information. If the verification is successful, it is determined that the user has the ability to view the hidden area. Permission, which allows the client device to display the hidden area in the original image, and display the original image obtained from the first image and the second image (as shown in Figure 2). If the verification fails, it is determined that the user does not have the authority to view the hidden area , which does not allow the client device to display hidden areas in the original image, display the first image.
  • the client device will display the first image after decoding the first coded data to obtain the first image, and will not process the third coded data.
  • the third coded data in this embodiment is ciphertext, therefore, to obtain the second image, it is first necessary to decrypt the third coded data.
  • the occlusion information corresponding to the second image can be parsed from the third coded data, specifically, the private frame encapsulated with the third coded data can be decapsulated to parse out the second image from the private frame.
  • the client device can obtain a decryption key for decrypting the third encoded data from the server device based on the encryption information, and use the decryption key Decrypt the third coded data to obtain the second coded data, and then determine the target decoding method based on the video coding type in the masking information, and the target decoding method is the video decoding method corresponding to the video coding method used when encoding the second image mode, through which the target decoding mode can decode the second coded data to obtain the above-mentioned second image.
  • Step 604 Generate an original image based on the first image and the second image, and display the original image.
  • the masking information in this embodiment further includes hidden area information, where the hidden area information may be used to indicate the positions of the hidden areas in the second image.
  • the client device can analyze the hidden area from the second image, and because the second image and the first image have the same resolution in this embodiment, the first image can also be determined through the hidden area information The target position corresponding to the hidden area in the image is superimposed on the target position in the first image to obtain the original image.
  • the parsed hidden area is superimposed on the target position in the first image, and the hidden sub-image corresponding to the hidden area can be extracted from the second image through matting processing, and then the hidden sub-image is superimposed on the second image.
  • the target position in an image, or the second image can be superimposed directly on top of the first image, and the layer corresponding to other areas in the second image except the hidden area can be made transparent, so as to display the first image through the transparent layer.
  • Non-hidden regions in the image are examples of the image.
  • the client device in the embodiment of the present application receives the first coded data and the third coded data, since the first coded data is not encrypted, the client device can directly The encoded data is decoded to obtain the first image, so that even if the client device does not support the display of the hidden area, the normal display of the first image can be guaranteed, and if the client device is allowed to display the hidden area in the original image, the client device can also A second image is obtained according to the third encoded data, and an original image is generated and displayed based on the first image and the second image.
  • FIG. 7 is a schematic diagram of an image display device provided by an embodiment of the present application.
  • the apparatus shown in FIG. 7 may be applied to a server device.
  • the area determination unit 701 is configured to determine hidden areas and non-hidden areas in the original image when the original image is acquired.
  • An image generating unit 702 configured to generate a first image corresponding to the non-hidden area, and generate a second image corresponding to the hidden area.
  • An encoding unit 703 configured to encode the first image to obtain first encoded data corresponding to the first image, encode the second image to obtain second encoded data corresponding to the second image, and The second encoded data is encrypted to obtain third encoded data.
  • the image generation unit 702 generates the first image corresponding to the non-hidden area, and generates the second image corresponding to the hidden area, including: filling the hidden area of the original image with a masked image, Obtaining the first image; performing matting processing on the hidden area of the original image to obtain a hidden sub-image corresponding to the hidden area, and generating the second image based on the hidden sub-image; wherein, the The resolution of the second image is the same as that of the original image, and the position of the hidden sub-image in the second image is the same as the position of the hidden sub-image in the original image.
  • the encoding unit 703 before the encoding unit 703 encrypts the second encoded data, the encoding unit 703 is further configured to: acquire masking information corresponding to the second image, and encapsulate all the masking information in the third encoded data.
  • the masking information at least includes: video encoding type, encryption information and hidden area information.
  • FIG. 8 is a schematic diagram of another image display device provided by an embodiment of the present application.
  • the apparatus shown in FIG. 8 may be applied to a client device.
  • the obtaining unit 801 is configured to obtain the first encoded data and the third encoded data from the target code stream.
  • the decoding unit 802 is configured to decode the first encoded data to obtain a first image corresponding to the non-hidden area in the original image; if the client device is allowed to display the hidden area in the original image, then the The third encoded data is decrypted to obtain second encoded data, and the second encoded data is decoded to obtain a second image corresponding to the hidden area in the original image.
  • An image display unit 803 configured to generate an original image based on the first image and the second image, and display the original image.
  • the image display unit 803 is further configured to: display the first image if the client device is not allowed to display the hidden area in the original image; wherein, if the client device does not support the hidden area display function, or if the client device has not obtained the correct verification information, the client device is not allowed to display the hidden area in the original image; if the client device supports the hidden area display function, and the client device The device gets the correct authentication information, allowing the client device to reveal hidden areas in the original image.
  • the decoding unit 802 decrypts the third encoded data to obtain second encoded data, and decodes the second encoded data to obtain a second image corresponding to the hidden area in the original image, including : Parsing out masking information corresponding to the second image from the third coded data, where the masking information at least includes: video coding type, encryption information; and acquiring a method for processing the third coded data based on the encryption information A decryption key for decryption, decrypting the third encoded data according to the decryption key to obtain second encoded data; determining a target decoding method based on the video encoding type, and determining the second encoded data based on the target decoding method The second encoded data is decoded to obtain the second image.
  • the occlusion information further includes hidden area information;
  • the image display unit 803 generating an original image based on the first image and the second image includes: from the second image according to the hidden area information A hidden area is parsed out from the first image, and a target position corresponding to the hidden area is determined from the first image, and the hidden area is superimposed on the target position of the first image to obtain the original image.
  • FIG. 9 is a schematic diagram of an image display system provided by the embodiment of the present application.
  • the system includes at least one server device 901 and at least one client device 902.
  • the server device 901 is configured to, when the original image is acquired, determine the hidden area and the non-hidden area in the original image; generate a first image corresponding to the non-hidden area, and generate a first image corresponding to the hidden area The second image of the second image; encoding the first image to obtain first encoded data corresponding to the first image, encoding the second image to obtain second encoded data corresponding to the second image, and encoding the second image Encrypting the second coded data to obtain third coded data; sending a target code stream including the first coded data and the third coded data to the client device.
  • the client device 902 is configured to obtain the first coded data and the third coded data from the received target code stream; decode the first coded data to obtain the first coded data corresponding to the non-hidden area in the original image An image; if the client device is allowed to display the hidden area in the original image, decrypt the third coded data to obtain second coded data, and decode the second coded data to obtain the same coded data as in the original image A second image corresponding to the hidden area of ; generating an original image based on the first image and the second image, and displaying the original image.
  • the embodiment of the present application also provides a hardware structure diagram of an electronic device, as specifically shown in FIG. 10 , and the electronic device may be the above-mentioned device implementing the image display method.
  • the hardware structure includes: a processor and a memory.
  • memory may be any electronic, magnetic, optical, or other physical storage device that may contain or store information, such as executable instructions, data, and the like.
  • the memory may be: a volatile memory, a non-volatile memory, or a similar storage medium.
  • the memory can be RAM (Radom Access Memory, random access memory), flash memory, storage drive (such as hard disk drive), solid-state hard disk, any type of storage disk (such as optical disc, DVD, etc.), or similar storage media, or a combination of them.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请实施例公开了一种图像显示方法、装置、系统及设备。本申请中服务端设备可以生成与原始图像中非隐藏区域对应的第一图像,与原始图像中隐藏区域对应的第二图像,并第二图像编码后得到的对第二编码数据进行加密得到第三编码数据,以防止第二图像传输过程中泄露隐私信息,进而在客户端设备接收到第二图像编码后得到的第一编码数据和上述第三编码数据时,可以直接对所述第一编码数据进行解码得到第一图像,这样即使客户端设备不支持隐藏区域显示,也可以保证第一图像正常显示,而若允许客户端设备显示原始图像中的隐藏区域,则该客户端设备还可以根据第三编码数据得到第二图像,基于第一图像和第二图像生成原始图像并显示。

Description

一种图像显示方法、装置、系统及设备 技术领域
本申请涉及视频播放领域,特别涉及一种图像显示方法、装置、系统及设备。
背景技术
为了保护个人隐私,对一些视频图像中带有隐私信息的区域需要进行遮蔽,或者模糊化处理以隐藏该区域,以在显示该视频图像时可以避免隐私信息泄露。
由于相关技术中对视频图像进行加密处理时,一般采用的是私有的加密方案,而加密后的视频图像只能在解密后显示,因此相关技术中加密后的视频图像只能在指定的播放器上显示,无法使用标准播放器显示。
发明内容
本申请公开了一种图像显示方法、装置、系统及设备,以使对隐藏区域进行了遮蔽处理的图像可以在标准播放器显示,例如,VLC Media Player、windows自带的Media player等标准播放器。
根据本申请实施例的第一方面,提供一种图像显示方法,应用于服务端设备,包括:当获取到原始图像时,确定所述原始图像中的隐藏区域和非隐藏区域;生成与所述非隐藏区域对应的第一图像,并生成与所述隐藏区域对应的第二图像;对所述第一图像进行编码得到所述第一图像对应的第一编码数据,对所述第二图像进行编码得到所述第二图像对应的第二编码数据,并对所述第二编码数据进行加密,得到第三编码数据;将包括所述第一编码数据和所述第三编码数据的目标码流发送给客户端设备。
可选的,所述生成与所述非隐藏区域对应的第一图像,并生成与所述隐藏区域对应的第二图像,包括:为所述原始图像的隐藏区域填充遮蔽图像,得到所述第一图像;对所述原始图像的隐藏区域进行抠图处理,得到与所述隐藏区域对应的隐藏子图像,并基于所述隐藏子图像生成所述第二图像;其中,所述第二图像的分辨率与所述原始图像的分辨率相同,且所述隐藏子图像在所述第二图像中的位置与所述隐藏子图像在所述原始图像中的位置相同。
可选的,所述对所述第二编码数据进行加密之前,所述方法还包括:获取与所述第二图像对应的遮蔽信息,并在所述第三编码数据中封装所述遮蔽信息;所述遮蔽信息至 少包括:视频编码类型、加密信息和隐藏区域信息。
根据本申请实施例的第二方面,提供了一种图像显示方法,该方法应用于客户端设备,包括:从目标码流中获取第一编码数据和第三编码数据;对所述第一编码数据进行解码,得到与原始图像中的非隐藏区域对应的第一图像;若允许所述客户端设备显示原始图像中的隐藏区域,则对所述第三编码数据进行解密,得到第二编码数据,对所述第二编码数据进行解码,得到与原始图像中的隐藏区域对应的第二图像;基于所述第一图像和所述第二图像生成原始图像,并显示所述原始图像。
可选的,所述方法还包括:若不允许所述客户端设备显示原始图像中的隐藏区域,则显示所述第一图像;其中,若所述客户端设备不支持隐藏区域显示功能,或者,所述客户端设备未得到正确的验证信息,则不允许所述客户端设备显示原始图像中的隐藏区域;若所述客户端设备支持隐藏区域显示功能,且所述客户端设备得到正确的验证信息,则允许所述客户端设备显示原始图像中的隐藏区域。
可选的,所述对所述第三编码数据进行解密,得到第二编码数据,对所述第二编码数据进行解码,得到与原始图像中的隐藏区域对应的第二图像,包括:从所述第三编码数据中解析出所述第二图像对应的遮蔽信息,所述遮蔽信息至少包括:视频编码类型、加密信息;基于所述加密信息获取用于对所述第三编码数据进行解密的解密密钥,依据所述解密密钥对所述第三编码数据进行解密,得到第二编码数据;基于所述视频编码类型确定目标解码方式,基于所述目标解码方式对所述第二编码数据进行解码得到所述第二图像。
可选的,所述遮蔽信息还包括隐藏区域信息;所述基于所述第一图像和所述第二图像生成原始图像,包括:依据所述隐藏区域信息从所述第二图像中解析出隐藏区域,并从所述第一图像中确定出与所述隐藏区域对应的目标位置,将所述隐藏区域叠加到所述第一图像的所述目标位置,得到所述原始图像。
根据本申请实施例的第三方面,提供一种图像显示装置,应用于服务端设备,包括:区域确定单元,用于当获取到原始图像时,确定所述原始图像中的隐藏区域和非隐藏区域;图像生成单元,用于生成与所述非隐藏区域对应的第一图像,并生成与所述隐藏区域对应的第二图像;编码单元,用于对所述第一图像进行编码得到所述第一图像对应的第一编码数据,对所述第二图像进行编码得到所述第二图像对应的第二编码数据,并对所述第二编码数据进行加密,得到第三编码数据;发送单元,用于将包括所述第一编码数据和所述第三编码数据的目标码流发送给客户端设备。
根据本申请实施例的第四方面,提供了一种图像显示装置,应用于客户端设备,包 括:获取单元,用于从目标码流中获取第一编码数据和第三编码数据;解码单元,用于对所述第一编码数据进行解码,得到与原始图像中的非隐藏区域对应的第一图像;若允许所述客户端设备显示原始图像中的隐藏区域,则对所述第三编码数据进行解密,得到第二编码数据,对所述第二编码数据进行解码,得到与原始图像中的隐藏区域对应的第二图像;图像显示单元,用于基于所述第一图像和所述第二图像生成原始图像,并显示所述原始图像。
根据本申请实施例的第五方面,提供一种图像显示系统,所述系统至少包括至少一个服务端设备和至少一个客户端设备;所述服务端设备,用于在获取到原始图像时,确定所述原始图像中的隐藏区域和非隐藏区域;生成与所述非隐藏区域对应的第一图像,并生成与所述隐藏区域对应的第二图像;对所述第一图像进行编码得到所述第一图像对应的第一编码数据,对所述第二图像进行编码得到所述第二图像对应的第二编码数据,并对所述第二编码数据进行加密,得到第三编码数据;将包括所述第一编码数据和所述第三编码数据的目标码流发送给所述客户端设备;所述客户端设备,用于从接收到的目标码流中获取第一编码数据和第三编码数据;对所述第一编码数据进行解码,得到与原始图像中的非隐藏区域对应的第一图像;若允许所述客户端设备显示原始图像中的隐藏区域,则对所述第三编码数据进行解密,得到第二编码数据,对所述第二编码数据进行解码,得到与原始图像中的隐藏区域对应的第二图像;基于所述第一图像和所述第二图像生成原始图像,并显示所述原始图像。
根据本申请实施例的第六方面,提供一种电子设备,该电子设备包括:处理器和存储器;所述存储器,用于存储机器可执行指令;所述处理器,用于读取并执行所述存储器存储的机器可执行指令,以实现如上所述的图像显示方法。
本申请的实施例提供的技术方案可以包括以下有益效果:
由以上技术方案可知,本申请提供的方案中服务端设备可以对原始图像隐藏区域和非隐藏区域分别进行处理,生成与非隐藏区域对应的第一图像,与隐藏区域对应的第二图像,并通过对第一图像编码得到第一编码数据,对第二图像进行编码和加密得到第三编码数据,以防止携带隐藏区域中隐私信息的第二图像在传输过程中泄露隐私信息,进而在客户端设备接收到第一编码数据和第三编码数据时,由于第一编码数据并未加密,客户端设备可以直接对所述第一编码数据进行解码得到第一图像,这样即使客户端设备不支持隐藏区域显示,也可以保证第一图像正常显示,而若允许客户端设备显示原始图像中的隐藏区域,则该客户端设备还可以根据第三编码数据得到第二图像,基于第一图像和第二图像生成原始图像并显示。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本说明书的实施例,并与说明书一起用于解释本说明书的原理。
图1是本申请实施例提供的一种图像显示的方法流程图;
图2是本申请实施例提供的一种原始视频图像帧的示意图;
图3是本申请实施例提供的一种第一图像的示意图;
图4是本申请实施例提供的图2中隐藏子图像的示意图;
图5是本申请实施例提供的一种第二图像的示意图;
图6是本申请实施例提供的另一种实现视频播放的方法流程图;
图7是本申请实施例提供的一种图像显示的装置示意图;
图8是本申请实施例提供的另一种图像显示的装置示意图;
图9是本申请实施例提供的一种图像显示的系统示意图;
图10是本申请实施例提供的一种电子设备的硬件结构示意图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。
在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本申请可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以 被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
为了使本领域技术人员更好地理解本申请实施例提供的技术方案,并使本申请实施例的上述目的、特征和优点能够更加明显易懂,下面结合附图对本申请实施例中技术方案作进一步详细的说明。
相关技术中通过对整个视频图像的编码数据进行加密处理,然后将带有隐私信息的区域(记为隐藏区域)的相关信息(比如该隐藏区域在视频图像中的坐标位置,区域大小等信息)和用于指示该隐藏区域是否显示的隐私去遮蔽许可信息,将该视频图像对应的加密后的编码数据和隐私去遮蔽许可信息一起传输给播放端,进而在显示该视频图像时,播放端可以在检测到隐私去遮蔽许可信息指示显示隐藏区域时,显示原始视频图像,在检测到隐私去遮蔽许可信息指示不显示隐藏区域时,对原始视频图像中的隐藏区域进行遮蔽处理后,再显示处理后的视频图像。
参见图1,图1为本申请实施例提供的一种图像显示的方法流程图。作为一个实施例,图1所示的流程可以应用于服务端设备,如摄像机,或是NVR(Network Video Recorder,网络视频录像机)、云存储服务器等可以存储码流并对码流进行处理的设备。
如图1所示,该流程可以包括以下步骤:
步骤101,当获取到原始图像时,确定原始图像中的隐藏区域和非隐藏区域。
作为一个实施例,本实施例可以将获取到的视频采集设备采集到的视频图像作为原始图像,或者,可以将接收到的任一图片作为原始图像。
在具体实现时,在获取到原始图像之后,可以将原始图像输入预先设置的隐私遮蔽算法库,通过隐私遮蔽算法库可以确定原始图像中携带隐私信息的区域,将该区域确定为显示原始图像时需要隐藏的区域(记为隐藏区域),将原始图像中隐藏区域之外的区域确定为显示原始图像时不需要隐藏的区域(即不携带隐私信息的区域,记为非隐藏区域),并得到原始图像中的隐藏区域的个数、各隐藏区域在原始图像中的位置坐标和区域面积大小。以图2所示原始图像为例,将图2输入至隐私遮蔽算法库之后,基于图2中显示的人脸为隐私信息,则隐私遮蔽算法库可以通过人脸识别算法,可以识别出人脸所在的区域为隐藏区域,识别出隐藏区域之外的其他区域为非隐藏区域。
步骤102,生成与非隐藏区域对应的第一图像,并生成与隐藏区域对应的第二图像。
在实施例中,在步骤101中确定原始图像中的隐藏区域和非隐藏区域之后,可以通过在该原始图像的隐藏区域中填充遮蔽图像,得到步骤102中的第一图像,通过对原始 图像的隐藏区域进行抠图处理,得到与隐藏区域对应的隐藏子图像,并基于该隐藏子图像生成第二图像。其中,本实施例中得到的第二图像的分辨率与原始图像的分辨率相同,且上述隐藏子图像在第二图像中的位置与隐藏子图像在原始图像中的位置相同。
作为一个实施例,可以依据各隐藏区域在原始图像中的位置坐标和区域面积大小,对原始图像中的隐藏区域填充遮蔽图像以得到第一图像。其中,本实施例中所填充的遮蔽图像,可以为纯白图像,纯黑图像等纯色图像、或者马赛克图像、模糊图像等,在将该遮蔽图像填充至原始图像中的隐藏区域之后,如图3所示(图3中遮蔽图像为纯黑图像),原始图像的隐藏区域中的原始画面将不能正常显示。
可选的,本实施例中将遮蔽图像填充至隐藏区域,可以先获取遮蔽图像,然后将遮蔽图层覆盖在原始图像中的隐藏区域的图层之上,也可以对原始图像中的隐藏区域直接进行编码后得到遮蔽图像,并实现将遮蔽图像填充至隐藏区域。
作为一个实施例,本实施例可以通过上述预先设置的隐私遮蔽算法库,根据步骤101中得到的各隐藏区域在原始图像中的位置坐标和区域面积大小,针对每一隐藏区域,对原始图像中的该隐藏区域进行抠图处理,将该隐藏区域对应的隐藏子图像从原始图像中提取出来。其中,提取出的隐藏子图像如图4所示,图4为从图2所示原始图像中提取出两个隐藏子图像:隐藏子图像a和隐藏子图像b。
可选的,在得到隐藏子图像之后,可以根据隐藏子图像在原始图像中的位置,将隐藏子图像和与原始图像分辨率相同的纯色图像进行叠加,如图5所示(图5中纯色图像为纯黑图像),使得叠加后隐藏子图像在该纯色图像中的位置与该隐藏子图像在原始图像中的位置相同。
步骤103,对第一图像进行编码得到第一图像对应的第一编码数据,对第二图像进行编码得到第二图像对应的第二编码数据,并对第二编码数据进行加密,得到第三编码数据。
作为一个实施例,对步骤103中的第一图像进行编码可以采用标准的视频编码方式,比如H.264视频编码方式,通过标准的视频编码方式得到的第一编码数据,对该第一编码数据进行封装后得到的码流同样为标准格式,因此该第一视频数据对应的码流可以在标准播放器上进行播放。基于本实施例所得到的第一编码数据,即使因为网络因素或者播放器(即客户端设备)功能限制导致第二图像(包含隐藏区域的隐藏子图像)的第二编码数据对应的码流不能正常播放,也不会影响遮蔽了隐藏区域的码流(即第一编码数据对应的码流)的正常播放。需要说明的是,本实施例中播放的第一编码数据对应的码流为遮蔽了隐藏区域的图像,可以防止隐藏区域中的隐私信息泄露。
进一步的,在得到第一编码数据之后,可以采用标准的编码数据封装方式,将第一编码数据封装为标准的视频帧。
本申请实施例中,由于非遮蔽区域是按照标准格式进行存储,因此可在任意支持标准格式的播放器中播放出遮蔽画面,兼容性较强。
在本实施例中,对步骤103中的第二图像进行编码也可以采用对第一图像进行编码时采用的同一视频编码方式,以得到第二图像对应的第二编码数据。需要说明的是,本实施例并不限制对第二图像进行编码的视频编码方式,采用与第一图像相同的视频编码方式,仅是本实施例对第二图像进行编码的一种方式。
作为一个实施例,本实施例中对第二图像进行编码之前还需要先确定第二图像对应的遮蔽信息,该遮蔽信息至少包括视频编码类型、加密信息和隐藏区域信息。其中视频编码类型指示了对第二图像进行编码时使用的视频编码方式,加密信息则指示了对第二编码数据进行加密时使用的加密密钥的参考信息,隐藏区域信息则指示了第二图像的分辨率、第二图像中隐藏区域的个数、各隐藏区域在该分辨率下的第二图像中的位置和面积大小。当原始图像中的隐藏区域为多个时,可以在隐藏区域信息中进一步携带隐藏区域的个数。
需要说明的是,隐藏区域信息中之所以要指示第二图像的分辨率,是因为隐藏区域在第二图像中的位置和面积大小与第二图像的大小是相关的,只有在确定了第二图像的分辨率的情况下,隐藏区域在该第二图像中的位置才是确定的,并且不同播放器中屏幕的分辨率一般是不同的,依据第二图像的分辨率与播放器中屏幕的分辨率进行转换,才可以确定在播放器的屏幕中显示的图像中隐藏区域对应的位置。
通过该遮蔽信息中的加密密钥的参考信息,可以获取对第二编码数据进行加密的加密密钥,进而使用该加密密钥对第二编码数据进行加密得到第三编码数据。进一步的,在得到第三编码数据之后,可以采用与封装第一编码数据时采用的同一编码数据封装方式,将第三编码数据和上述遮蔽信息封装在一起。由于该遮蔽信息为本实施例中自定义的,与相关技术中标准的视频帧中封装的信息不同,因此,虽然本实施例中采用了标准的编码数据封装方式对第三编码数据和遮蔽信息进行封装,为了便于区分第一编码数据封装后得到的视频帧,与第三编码数据封装后得到的视频帧,将第三编码数据封装后得到的视频帧记为私有帧。
由于隐私信息是以私有帧的形式存储在码流中,对私有帧的处理(如加密处理)不会影响到视频帧的播放,并且对格式转换更加灵活,可以支持将带有隐私信息的多媒体数据封装成PS、RTP、MP4等不同的标准格式。
步骤104,将包括第一编码数据和第三编码数据的目标码流发送给客户端设备。
作为一个实施例,可以在上述第一编码数据得到的视频帧和第三编码数据得到的私有帧中添加同一时间戳,并在目标码流中将该私有帧放置在该视频帧之后,然后将目标码流发送给客户端设备。
至此,完成图1所示流程。
通过图1所示的流程可以看出,本申请实施例中服务端设备可以对原始图像隐藏区域和非隐藏区域分别进行处理,生成与非隐藏区域对应的第一图像,与隐藏区域对应的第二图像,并通过对第一图像编码得到第一编码数据,对第二图像进行编码和加密得到第三编码数据,以防止携带隐藏区域中隐私信息的第二图像在传输过程中泄露隐私信息,同时通过将未加密的第一编码数据发送给客户端设备,即使客户端设备无法对第三编码数据解密,也能通过第一编码数据播放遮蔽了隐藏区域的码流的画面。
下面对本申请实施例提供另一应用于客户端设备的图像显示的方法实施例进行描述。参见图6,图6为本申请实施例提供的另一种图像显示的方法流程图。作为一个实施例,图6所示的流程可以应用于客户端设备,如终端设备。
如图6所示,该流程可以包括以下步骤:
步骤601,从目标码流中获取第一编码数据和第三编码数据。
作为一个实施例,当用户登录客户端设备,并从服务端设备下载到目标码流时,可以依据目标码流中各帧携带的时间戳,从目标码流中,分别获取第一编码数据和第三编码数据。
步骤602,对第一编码数据进行解码,得到与原始图像中的非隐藏区域对应的第一图像。
作为一个实施例,基于服务端设备发送过来的第一编码数据并未加密,可以直接依据从封装第一编码数据的视频帧中解析出的视频编码类型,采用该视频编码类型对应的视频解码方式,对第一编码数据进行解码,以得到与原始图像中非隐藏区域对应的第一图像(如图3)。
步骤603,若允许该客户端设备显示原始图像中的隐藏区域,则对第三编码数据进行解密,得到第二编码数据,对第二编码数据进行解码,得到与原始图像中的隐藏区域对应的第二图像。
作为一个实施例,如果本客户端设备支持隐藏区域显示功能,并且得到了正确的验证信息,则可以允许该客户端设备显示原始图像中的隐藏区域。
在本实施例中,当用户需要查看原始图像中的隐藏区域时,可以触发客户端设备获取验证信息,该验证信息用于确定该用户是否具有查看隐藏区域的权限。其中,客户端设备可以通过向认证服务器发送验证请求,或者依据用户的手机号码向短信服务器发送验证码请求,获取用户的验证信息。
在本实施例中,用户在获得并将验证信息输入至客户端中指定的位置之后,可以触发客户端对获得的验证信息进行校验,若校验成功,则确定该用户具有查看隐藏区域的权限,允许该客户端设备显示原始图像中的隐藏区域,显示依据第一图像和第二图像得到的原始图像(如图2),若校验失败,则确定该用户不具有查看隐藏区域的权限,不允许该客户端设备显示原始图像中的隐藏区域,显示第一图像。
作为另一个实施例,如果本客户端设备不支持隐藏区域显示功能,即该客户端设备为标准的客户端设备,不能对第三编码数据进行处理,或者,本客户端设备未得到正确的验证信息(即上述实施例中对验证信息校验失败),则本客户端设备对第一编码数据进行解码得到第一图像之后,将显示第一图像,并且不对第三编码数据进行处理。
下面对本实施例中允许该客户端设备显示原始图像中的隐藏区域时,得到第二图像(如图5)的过程进行描述:
作为一个实施例,本实施例中第三编码数据为密文,因此,要得到第二图像,首先需要对第三编码数据进行解密。
在本实施例中,可以先从第三编码数据中解析出第二图像对应的遮蔽信息,具体可以通过对封装有第三编码数据的私有帧进行解封装,以从该私有帧中解析出第二图像对应的遮蔽信息。
基于本实施例中该遮蔽信息至少包括视频编码类型以及加密信息,本客户端设备可以基于该加密信息从服务端设备获取用于对第三编码数据进行解密的解密密钥,使用该解密密钥对第三编码数据进行解密,以得到第二编码数据,进而基于遮蔽信息中的视频编码类型确定目标解码方式,该目标解码方式为对第二图像进行编码时采用的视频编码方式对应的视频解码方式,通过该目标解码方式可以对第二编码数据进行解码得到上述的第二图像。
步骤604,基于第一图像和第二图像生成原始图像,并显示该原始图像。
作为一个实施例,本实施例中的遮蔽信息还包括隐藏区域信息,这里的隐藏区域信息可以用于指示第二图像中各隐藏区域的位置。通过该隐藏区域信息,本客户端设备可以从第二图像中解析出隐藏区域,同时由于本实施例中第二图像和第一图像的分辨率一 致,因此通过隐藏区域信息也可以确定第一图像中与该隐藏区域对应的目标位置,将该解析出的隐藏区域叠加到第一图像中的目标位置,就可以得到原始图像。
可选的,将解析出的隐藏区域叠加到第一图像中的目标位置,可以通过抠图处理将隐藏区域对应的隐藏子图像从第二图像中提取出来,然后将该隐藏子图像叠加到第一图像中的目标位置,或者可以将第二图像直接叠加到第一图像的上方,将第二图像中除去隐藏区域的其他区域对应的图层透明化,以通过该透明的图层显示第一图像中的非隐藏区域。
至此,完成图6所示流程。
通过图6所示的流程可以看出,本申请实施例客户端设备接收到第一编码数据和第三编码数据时,由于第一编码数据并未加密,客户端设备可以直接对所述第一编码数据进行解码得到第一图像,这样即使客户端设备不支持隐藏区域显示,也可以保证第一图像正常显示,而若允许客户端设备显示原始图像中的隐藏区域,则该客户端设备还可以根据第三编码数据得到第二图像,基于第一图像和第二图像生成原始图像并显示。
以上完成了对本申请实施例提供的方法实施例的描述。下面对本申请实施例提供的装置实施例进行描述。
参见图7,图7为本申请实施例提供的一种图像显示的装置示意图。作为一个实施例,图7所示的装置可以应用于服务端设备。
区域确定单元701,用于当获取到原始图像时,确定所述原始图像中的隐藏区域和非隐藏区域。
图像生成单元702,用于生成与所述非隐藏区域对应的第一图像,并生成与所述隐藏区域对应的第二图像。
编码单元703,用于对所述第一图像进行编码得到所述第一图像对应的第一编码数据,对所述第二图像进行编码得到所述第二图像对应的第二编码数据,并对所述第二编码数据进行加密,得到第三编码数据。
发送单元704,用于将包括所述第一编码数据和所述第三编码数据的目标码流发送给客户端设备。
将包括所述第一编码数据和所述第三编码数据的目标码流发送给客户端设备。
可选的,所述图像生成单元702生成与所述非隐藏区域对应的第一图像,并生成与所述隐藏区域对应的第二图像,包括:为所述原始图像的隐藏区域填充遮蔽图像,得到所述第一图像;对所述原始图像的隐藏区域进行抠图处理,得到与所述隐藏区域对应的 隐藏子图像,并基于所述隐藏子图像生成所述第二图像;其中,所述第二图像的分辨率与所述原始图像的分辨率相同,且所述隐藏子图像在所述第二图像中的位置与所述隐藏子图像在所述原始图像中的位置相同。
可选的,所述编码单元703对所述第二编码数据进行加密之前,编码单元703还用于:获取与所述第二图像对应的遮蔽信息,并在所述第三编码数据中封装所述遮蔽信息;所述遮蔽信息至少包括:视频编码类型、加密信息和隐藏区域信息。
至此,完成图7所示的装置的描述。
请参见图8,图8为本申请实施例提供的另一种图像显示的装置示意图。作为一个实施例,图8所示的装置可以应用于客户端设备。
获取单元801,用于从目标码流中获取第一编码数据和第三编码数据。
解码单元802,用于对所述第一编码数据进行解码,得到与原始图像中的非隐藏区域对应的第一图像;若允许所述客户端设备显示原始图像中的隐藏区域,则对所述第三编码数据进行解密,得到第二编码数据,对所述第二编码数据进行解码,得到与原始图像中的隐藏区域对应的第二图像。
图像显示单元803,用于基于所述第一图像和所述第二图像生成原始图像,并显示所述原始图像。
可选的,所述图像显示单元803还用于:若不允许所述客户端设备显示原始图像中的隐藏区域,则显示所述第一图像;其中,若所述客户端设备不支持隐藏区域显示功能,或者,所述客户端设备未得到正确的验证信息,则不允许所述客户端设备显示原始图像中的隐藏区域;若所述客户端设备支持隐藏区域显示功能,且所述客户端设备得到正确的验证信息,则允许所述客户端设备显示原始图像中的隐藏区域。
可选的,所述解码单元802对所述第三编码数据进行解密,得到第二编码数据,对所述第二编码数据进行解码,得到与原始图像中的隐藏区域对应的第二图像,包括:从所述第三编码数据中解析出所述第二图像对应的遮蔽信息,所述遮蔽信息至少包括:视频编码类型、加密信息;基于所述加密信息获取用于对所述第三编码数据进行解密的解密密钥,依据所述解密密钥对所述第三编码数据进行解密,得到第二编码数据;基于所述视频编码类型确定目标解码方式,基于所述目标解码方式对所述第二编码数据进行解码得到所述第二图像。
可选的,所述遮蔽信息还包括隐藏区域信息;所述图像显示单元803基于所述第一图像和所述第二图像生成原始图像,包括:依据所述隐藏区域信息从所述第二图像中解 析出隐藏区域,并从所述第一图像中确定出与所述隐藏区域对应的目标位置,将所述隐藏区域叠加到所述第一图像的所述目标位置,得到所述原始图像。
至此,完成图8所示的装置的描述。
下面对本申请实施例提供的系统实施例进行描述,参见图9,图9为本申请实施例提供的一种图像显示系统的示意图,该系统至少包括至少一个服务端设备901和至少一个客户端设备902。
其中服务端设备901,用于在获取到原始图像时,确定所述原始图像中的隐藏区域和非隐藏区域;生成与所述非隐藏区域对应的第一图像,并生成与所述隐藏区域对应的第二图像;对所述第一图像进行编码得到所述第一图像对应的第一编码数据,对所述第二图像进行编码得到所述第二图像对应的第二编码数据,并对所述第二编码数据进行加密,得到第三编码数据;将包括所述第一编码数据和所述第三编码数据的目标码流发送给所述客户端设备。
所述客户端设备902,用于从接收到的目标码流中获取第一编码数据和第三编码数据;对所述第一编码数据进行解码,得到与原始图像中的非隐藏区域对应的第一图像;若允许所述客户端设备显示原始图像中的隐藏区域,则对所述第三编码数据进行解密,得到第二编码数据,对所述第二编码数据进行解码,得到与原始图像中的隐藏区域对应的第二图像;基于所述第一图像和所述第二图像生成原始图像,并显示所述原始图像。
以上装置实施例和系统实施例中的实施细节可以参照方法实施例的描述,这里不再赘述。
对应地,本申请实施例还提供了一种电子设备的硬件结构图,具体如图10所示,该电子设备可以为上述实施图像显示方法的设备。如图10所示,该硬件结构包括:处理器和存储器。
其中,所述存储器,用于存储机器可执行指令;所述处理器,用于读取并执行所述存储器存储的机器可执行指令,以实现如上所示的所对应的图像显示的方法实施例。
作为一个实施例,存储器可以是任何电子、磁性、光学或其它物理存储装置,可以包含或存储信息,如可执行指令、数据,等等。例如,存储器可以是:易失存储器、非易失性存储器或者类似的存储介质。具体地,存储器可以是RAM(Radom Access Memory,随机存取存储器)、闪存、存储驱动器(如硬盘驱动器)、固态硬盘、任何类型的存储盘(如光盘、DVD等),或者类似的存储介质,或者它们的组合。
至此,完成图10所示电子设备的描述。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (11)

  1. 一种图像显示方法,其特征在于,应用于服务端设备,包括:
    当获取到原始图像时,确定所述原始图像中的隐藏区域和非隐藏区域;
    生成与所述非隐藏区域对应的第一图像,并生成与所述隐藏区域对应的第二图像;
    对所述第一图像进行编码得到所述第一图像对应的第一编码数据,对所述第二图像进行编码得到所述第二图像对应的第二编码数据,并对所述第二编码数据进行加密,得到第三编码数据;
    将包括所述第一编码数据和所述第三编码数据的目标码流发送给客户端设备。
  2. 根据权利要求1所述的方法,其特征在于,所述生成与所述非隐藏区域对应的第一图像,并生成与所述隐藏区域对应的第二图像,包括:
    为所述原始图像的隐藏区域填充遮蔽图像,得到所述第一图像;
    对所述原始图像的隐藏区域进行抠图处理,得到与所述隐藏区域对应的隐藏子图像,并基于所述隐藏子图像生成所述第二图像;其中,所述第二图像的分辨率与所述原始图像的分辨率相同,且所述隐藏子图像在所述第二图像中的位置与所述隐藏子图像在所述原始图像中的位置相同。
  3. 根据权利要求1所述的方法,其特征在于,所述对所述第二编码数据进行加密之前,所述方法还包括:
    获取与所述第二图像对应的遮蔽信息,并在所述第三编码数据中封装所述遮蔽信息;所述遮蔽信息至少包括:视频编码类型、加密信息和隐藏区域信息。
  4. 一种图像显示方法,其特征在于,应用于客户端设备,包括:
    从目标码流中获取第一编码数据和第三编码数据;
    对所述第一编码数据进行解码,得到与原始图像中的非隐藏区域对应的第一图像;
    若允许所述客户端设备显示原始图像中的隐藏区域,则对所述第三编码数据进行解密,得到第二编码数据,对所述第二编码数据进行解码,得到与原始图像中的隐藏区域对应的第二图像;
    基于所述第一图像和所述第二图像生成原始图像,并显示所述原始图像。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:若不允许所述客户端设备显示原始图像中的隐藏区域,则显示所述第一图像;
    其中,若所述客户端设备不支持隐藏区域显示功能,或者,所述客户端设备未得到正确的验证信息,则不允许所述客户端设备显示原始图像中的隐藏区域;若所述客户端设备支持隐藏区域显示功能,且所述客户端设备得到正确的验证信息,则允许所述客户端设备显示原始图像中的隐藏区域。
  6. 根据权利要求4所述的方法,其特征在于,所述对所述第三编码数据进行解密, 得到第二编码数据,对所述第二编码数据进行解码,得到与原始图像中的隐藏区域对应的第二图像,包括:
    从所述第三编码数据中解析出所述第二图像对应的遮蔽信息,所述遮蔽信息至少包括:视频编码类型、加密信息;
    基于所述加密信息获取用于对所述第三编码数据进行解密的解密密钥,依据所述解密密钥对所述第三编码数据进行解密,得到第二编码数据;
    基于所述视频编码类型确定目标解码方式,基于所述目标解码方式对所述第二编码数据进行解码得到所述第二图像。
  7. 根据权利要求6所述的方法,其特征在于,所述遮蔽信息还包括隐藏区域信息;
    所述基于所述第一图像和所述第二图像生成原始图像,包括:
    依据所述隐藏区域信息从所述第二图像中解析出隐藏区域,并从所述第一图像中确定出与所述隐藏区域对应的目标位置,将所述隐藏区域叠加到所述第一图像的所述目标位置,得到所述原始图像。
  8. 一种图像显示装置,其特征在于,应用于服务端设备,包括:
    区域确定单元,用于当获取到原始图像时,确定所述原始图像中的隐藏区域和非隐藏区域;
    图像生成单元,用于生成与所述非隐藏区域对应的第一图像,并生成与所述隐藏区域对应的第二图像;
    编码单元,用于对所述第一图像进行编码得到所述第一图像对应的第一编码数据,对所述第二图像进行编码得到所述第二图像对应的第二编码数据,并对所述第二编码数据进行加密,得到第三编码数据;
    发送单元,用于将包括所述第一编码数据和所述第三编码数据的目标码流发送给客户端设备。
  9. 一种图像显示装置,其特征在于,应用于客户端设备,包括:
    获取单元,用于从目标码流中获取第一编码数据和第三编码数据;
    解码单元,用于对所述第一编码数据进行解码,得到与原始图像中的非隐藏区域对应的第一图像;若允许所述客户端设备显示原始图像中的隐藏区域,则对所述第三编码数据进行解密,得到第二编码数据,对所述第二编码数据进行解码,得到与原始图像中的隐藏区域对应的第二图像;
    图像显示单元,用于基于所述第一图像和所述第二图像生成原始图像,并显示所述原始图像。
  10. 一种图像显示系统,其特征在于,所述系统至少包括至少一个服务端设备和至少一个客户端设备;
    所述服务端设备,用于在获取到原始图像时,确定所述原始图像中的隐藏区域和非隐藏区域;生成与所述非隐藏区域对应的第一图像,并生成与所述隐藏区域对应的第二图像;对所述第一图像进行编码得到所述第一图像对应的第一编码数据,对所述第二图像进行编码得到所述第二图像对应的第二编码数据,并对所述第二编码数据进行加密,得到第三编码数据;将包括所述第一编码数据和所述第三编码数据的目标码流发送给所述客户端设备;
    所述客户端设备,用于从接收到的目标码流中获取第一编码数据和第三编码数据;对所述第一编码数据进行解码,得到与原始图像中的非隐藏区域对应的第一图像;若允许所述客户端设备显示原始图像中的隐藏区域,则对所述第三编码数据进行解密,得到第二编码数据,对所述第二编码数据进行解码,得到与原始图像中的隐藏区域对应的第二图像;基于所述第一图像和所述第二图像生成原始图像,并显示所述原始图像。
  11. 一种电子设备,其特征在于,该电子设备包括:处理器和存储器;
    所述存储器,用于存储机器可执行指令;
    所述处理器,用于读取并执行所述存储器存储的机器可执行指令,以实现如权利要求1-3任一项所述的方法或者4-7任一项所述的方法。
PCT/CN2022/141432 2021-12-29 2022-12-23 一种图像显示方法、装置、系统及设备 WO2023125291A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111640079.0 2021-12-29
CN202111640079.0A CN114205587A (zh) 2021-12-29 2021-12-29 一种图像显示方法、装置、系统及设备

Publications (1)

Publication Number Publication Date
WO2023125291A1 true WO2023125291A1 (zh) 2023-07-06

Family

ID=80657245

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/141432 WO2023125291A1 (zh) 2021-12-29 2022-12-23 一种图像显示方法、装置、系统及设备

Country Status (2)

Country Link
CN (1) CN114205587A (zh)
WO (1) WO2023125291A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205587A (zh) * 2021-12-29 2022-03-18 杭州海康威视数字技术股份有限公司 一种图像显示方法、装置、系统及设备
CN116847036B (zh) * 2023-09-01 2023-11-24 北京中星微人工智能芯片技术有限公司 图像显示方法、装置、电子设备和计算机可读介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341664A (zh) * 2016-09-29 2017-01-18 浙江宇视科技有限公司 一种数据处理方法及装置
CN113453012A (zh) * 2021-06-25 2021-09-28 杭州海康威视数字技术股份有限公司 一种编解码方法、装置及电子设备
US20210367759A1 (en) * 2020-05-21 2021-11-25 Novatek Microelectronics Corp. Methods and image processing devices for encoding and decoding private data
CN114205587A (zh) * 2021-12-29 2022-03-18 杭州海康威视数字技术股份有限公司 一种图像显示方法、装置、系统及设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341664A (zh) * 2016-09-29 2017-01-18 浙江宇视科技有限公司 一种数据处理方法及装置
US20210367759A1 (en) * 2020-05-21 2021-11-25 Novatek Microelectronics Corp. Methods and image processing devices for encoding and decoding private data
CN113453012A (zh) * 2021-06-25 2021-09-28 杭州海康威视数字技术股份有限公司 一种编解码方法、装置及电子设备
CN114205587A (zh) * 2021-12-29 2022-03-18 杭州海康威视数字技术股份有限公司 一种图像显示方法、装置、系统及设备

Also Published As

Publication number Publication date
CN114205587A (zh) 2022-03-18

Similar Documents

Publication Publication Date Title
WO2023125291A1 (zh) 一种图像显示方法、装置、系统及设备
WO2018107729A1 (zh) 基于隐私遮蔽显示图像的方法及装置
JP4298499B2 (ja) ディジタル映像にウォーターマーキングする装置及び方法
US8094876B2 (en) Personalized marking for protecting digital audiovisual streams
CN108449563B (zh) 对音视频加解密的方法及系统
US7610626B2 (en) Recording medium, recording apparatus, reading apparatus, and program and method therefore
KR101035893B1 (ko) 컨텐트 보호를 위한 조건적 접속 방법 및 시스템
CN110446105B (zh) 视频加密、解密的方法及装置
US20100100742A1 (en) Transport Stream Watermarking
CN100586154C (zh) 数字电影的字幕显示装置和方法及数字电影放映方法和系统
ES2384965T3 (es) Dispositivo seguro para el tratamiento de obras audiovisuales de alta calidad
US6944296B1 (en) Video bit scrambling
US7567487B2 (en) Content moving device, content moving method, computer program, recording medium, and content moving system
US20130003963A1 (en) Thwarting Unauthorized Content Copying Using Media Tracking Code
US20060045478A1 (en) Method and apparatus for transmitting and receiving protected contents at home
JP4164265B2 (ja) 著作権保護システム、デジタル情報処理装置および著作権保護方法
WO2023093501A1 (zh) 一种视频中隐私内容的处理方法、系统、电子设备及介质
Bloom Digital cinema content security and the DCI
US20050259966A1 (en) Information record apparatus and method, information reproduction apparatus and method, and computer program product
JP2008005323A (ja) 暗号化コンテンツ作成装置、その方法およびそのプログラム、ならびに、コンテンツ復号化装置、その方法およびそのプログラム
JP4814615B2 (ja) コンテンツ暗号化装置、その方法およびそのプログラム、ならびに、コンテンツ復号化装置、その方法およびそのプログラム
CN115550691A (zh) 一种视频处理方法、视频传输方法、视频查看方法和装置
JP2006352265A (ja) 画像配信システム
JP5621014B2 (ja) 映像再生装置、映像処理装置および映像再生方法、映像処理方法ならびに映像再生プログラム、映像処理プログラム
KR20150058298A (ko) 정보처리장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22914545

Country of ref document: EP

Kind code of ref document: A1

WD Withdrawal of designations after international publication