CN106937103B - A kind of image processing method and device - Google Patents

A kind of image processing method and device Download PDF

Info

Publication number
CN106937103B
CN106937103B CN201511033138.2A CN201511033138A CN106937103B CN 106937103 B CN106937103 B CN 106937103B CN 201511033138 A CN201511033138 A CN 201511033138A CN 106937103 B CN106937103 B CN 106937103B
Authority
CN
China
Prior art keywords
image
pixel point
target
transparency
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201511033138.2A
Other languages
Chinese (zh)
Other versions
CN106937103A (en
Inventor
范海玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Super Technology Co Ltd
Original Assignee
SuperD Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SuperD Co Ltd filed Critical SuperD Co Ltd
Priority to CN201511033138.2A priority Critical patent/CN106937103B/en
Publication of CN106937103A publication Critical patent/CN106937103A/en
Application granted granted Critical
Publication of CN106937103B publication Critical patent/CN106937103B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/30Image reproducers
    • H04N13/302Image reproducers for viewing without the aid of special glasses, i.e. using autostereoscopic displays
    • H04N13/31Image reproducers for viewing without the aid of special glasses, i.e. using autostereoscopic displays using parallax barriers
    • H04N13/315Image reproducers for viewing without the aid of special glasses, i.e. using autostereoscopic displays using parallax barriers the parallax barriers being time-variant
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals
    • H04N13/172Processing image signals image signals comprising non-image signal components, e.g. headers or format information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals
    • H04N13/172Processing image signals image signals comprising non-image signal components, e.g. headers or format information
    • H04N13/183On-screen display [OSD] information, e.g. subtitles or menus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/30Image reproducers
    • H04N13/302Image reproducers for viewing without the aid of special glasses, i.e. using autostereoscopic displays
    • H04N13/305Image reproducers for viewing without the aid of special glasses, i.e. using autostereoscopic displays using lenticular lenses, e.g. arrangements of cylindrical lenses

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a kind of image processing method and devices, including:The target image for obtaining pre-set image content, the region in the target image in addition to pre-set image content are transparent region;Determine the default processing region in target image;For each pixel in default processing region, the pixel that the absolute value of difference is greater than threshold value between any one presetted pixel value in pixel value and N number of presetted pixel value is changed to the first transparency as the first background pixel point, and by the transparency of first object pixel adjacent with the first background pixel point in default processing region;Change treated target image is combined to background image, background image includes left eye background image and right eye background image, to obtain 3D left-eye image and 3D eye image;3D display is carried out according to 3D left-eye image and the 3D eye image.

Description

Image processing method and device
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image processing method and apparatus.
Background
At present, a naked eye 3D (3-dimensional) display technology is becoming more mature, the naked eye 3D display technology includes an optical barrier technology, a lenticular technology and the like, a special liquid crystal screen is laminated on a common display, and the special liquid crystal screen can refract images in different directions to separate visual pictures of a left eye and a right eye of a user, so that the user can see a 3D image.
When an image is displayed by a naked eye 3D display technology, data loss may occur due to a compressed image, and a jaggy phenomenon may occur at the edge of some regions in the image. For example, if a 3D image with text is displayed on a naked-eye 3D display device, the jagging phenomenon at the edge of the text area is very obvious, thereby bringing a very poor viewing experience to the user.
At present, no better solution is provided for reducing the sawtooth phenomenon in the image when the image is displayed by the naked eye 3D display technology.
Disclosure of Invention
The embodiment of the invention provides an image processing method and an image processing device, which are used for reducing the sawtooth phenomenon in an image when the image is displayed by a naked eye 3D display technology.
The embodiment of the invention provides an image processing method, which comprises the following steps:
acquiring a target image of preset image content, wherein the region of the target image except the preset image content is a transparent region;
determining a preset processing area in the target image, wherein the preset image content is located in the preset processing area;
regarding each pixel point in the preset processing region, taking a pixel point, as a first background pixel point, of which the absolute value of the difference between a pixel value and any one of N preset pixel values is greater than a threshold value, taking a pixel point, which is adjacent to the first background pixel point and of which the absolute value of the difference between the pixel value and any one of the N preset pixel values is less than or equal to the threshold value, in the preset processing region as a first target pixel point, and changing the transparency of the first target pixel point into a first transparency, wherein the absolute value of the difference between the pixel value of the first target pixel point and any one of the N preset pixel values is less than or equal to the threshold value, and N is a positive integer; or,
regarding each pixel point in the preset processing region, taking a pixel point of which the absolute value of the difference between the pixel value and any one of the N preset pixel values is smaller than or equal to the threshold as a second background pixel point, taking a pixel point of which the absolute value of the difference between the pixel value and any one of the N preset pixel values is larger than the threshold in the preset processing region, which is adjacent to the second background pixel point and is larger than the threshold, as a second target pixel point, changing the transparency of the second target pixel point into a second transparency, and changing the pixel value into the pixel value of the second background pixel point, wherein the absolute value of the difference between the pixel value of the second target pixel point and any one of the N preset pixel values is larger than the threshold;
synthesizing the target image after the change processing with a background image, wherein the background image comprises a left eye background image and a right eye background image, so as to obtain a 3D left eye image and a 3D right eye image;
and performing 3D display according to the 3D left eye image and the 3D right eye image.
Optionally, the changing the transparency of the first target pixel point adjacent to the first background pixel point in the preset processing region into a first transparency includes:
aiming at any one first target pixel point adjacent to the first background pixel point, determining the first transparency of the first target pixel point according to the following formula:
wherein,in order to be said first degree of transparency,the transparency of the first background pixel point is,is the transparency, K, of the first target pixel point1Greater than 0 and less than 1.
Optionally, the changing the transparency of the second target pixel point adjacent to the second background pixel point in the preset processing region to a second transparency includes:
for any second target pixel point adjacent to the second background pixel point, determining the second transparency of the second target pixel point according to the following formula:
wherein,in order to be said second degree of transparency,the transparency of the second background pixel point is,is the transparency, K, of the second target pixel point2Greater than 0 and less than 1.
Optionally, the preset image content is text information;
and the N preset pixel values are pixel values corresponding to the character information.
Optionally, the 3D left-eye image and the 3D right-eye image are disposed on the 3D image;
the acquiring of the target image of the preset image content includes:
determining the 3D format and the size information of the 3D image, and determining the size information of the target image according to the 3D format and the size information; and
determining first area position information of a first area of the text information in the 3D left-eye image when the 3D left-eye image is displayed and second area position information of a second area of the text information in the 3D right-eye image when the 3D right-eye image is displayed, and determining position information of the text information in the target image according to the first area position information and the second area position information;
and generating the target image according to the determined size information and the determined position information, wherein the text information is located in an area corresponding to the first area and the second area in the target image, and the pixel value of the text information is any one or more preset pixel values in the N preset pixel values.
Optionally, the determining the size information of the target image according to the 3D format and the size information includes:
if the 3D format is an upper-lower format or a lower-upper format, determining the size information of the target image according to the 3D format and the size information, so that the height of the target image is the same as that of the 3D image, and the width of the target image is at least larger than that of the character information;
if the 3D format is a left-right format or a right-left format, determining the size information of the target image according to the 3D format and the size information, so that the width of the target image is the same as that of the 3D image, and the height of the target image is at least larger than that of the character information.
Optionally, the target image includes a left-eye target image and a right-eye target image;
the synthesizing the modified target image with a background image, where the background image includes a left-eye background image and a right-eye background image, so as to obtain a 3D left-eye image and a 3D right-eye image includes:
synthesizing the left eye target image and the left eye background image into the 3D left eye image through an alpha mixing method;
and synthesizing the right eye target image and the right eye background image into the 3D right eye image through an alpha mixing method.
An embodiment of the present invention provides an image processing apparatus, including:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a target image of preset image content, and the area of the target image except the preset image content is a transparent area;
a determining unit, configured to determine a preset processing region in the target image, where the preset image content is located;
a processing unit, configured to, for each pixel point in the preset processing region, take a pixel point, as a first background pixel point, where an absolute value of a difference between a pixel value and any one of N preset pixel values is greater than a threshold, and take a pixel point, as a first target pixel point, in the preset processing region, that is adjacent to the first background pixel point and where an absolute value of a difference between the pixel value and any one of the N preset pixel values is less than or equal to the threshold, and change the transparency of the first target pixel point into a first transparency, where an absolute value of a difference between the pixel value of the first target pixel point and any one of the N preset pixel values is less than or equal to the threshold, and N is a positive integer; or, regarding each pixel point in the preset processing region, regarding a pixel point, of which an absolute value of a difference between a pixel value and any one of the N preset pixel values is smaller than or equal to the threshold, as a second background pixel point, regarding a pixel point, of which an absolute value of a difference between a pixel value and any one of the N preset pixel values is greater than the threshold, which is adjacent to the second background pixel point and is adjacent to the second background pixel point in the preset processing region, as a second target pixel point, and changing the transparency of the second target pixel point into a second transparency and changing the pixel value into the pixel value of the second background pixel point, wherein the absolute value of a difference between the pixel value of the second target pixel point and any one of the N preset pixel values is greater than the threshold;
a synthesizing unit, configured to synthesize the modified target image with a background image, where the background image includes a left-eye background image and a right-eye background image, so as to obtain a 3D left-eye image and a 3D right-eye image;
and the display unit is used for carrying out 3D display according to the 3D left eye image and the 3D right eye image.
Optionally, the processing unit is specifically configured to:
aiming at any one first target pixel point adjacent to the first background pixel point, determining the first transparency of the first target pixel point according to the following formula:
wherein,in order to be said first degree of transparency,the transparency of the first background pixel point is,is the transparency, K, of the first target pixel point1Greater than 0 and less than 1.
Optionally, the processing unit is specifically configured to:
for any second target pixel point adjacent to the second background pixel point, determining the second transparency of the second target pixel point according to the following formula:
wherein,in order to be said second degree of transparency,the transparency of the second background pixel point is,is the transparency, K, of the second target pixel point2Greater than 0 and less than 1.
Optionally, the preset image content is text information;
and the N preset pixel values are pixel values corresponding to the character information.
Optionally, the 3D left-eye image and the 3D right-eye image are disposed on the 3D image;
the obtaining unit is specifically configured to:
determining the 3D format and the size information of the 3D image, and determining the size information of the target image according to the 3D format and the size information; and
determining first area position information of a first area of the text information in the 3D left-eye image when the 3D left-eye image is displayed and second area position information of a second area of the text information in the 3D right-eye image when the 3D right-eye image is displayed, and determining position information of the text information in the target image according to the first area position information and the second area position information;
and generating the target image according to the determined size information and the determined position information, wherein the text information is located in an area corresponding to the first area and the second area in the target image, and the pixel value of the text information is any one or more preset pixel values in the N preset pixel values.
Optionally, the obtaining unit is specifically configured to:
if the 3D format is an upper-lower format or a lower-upper format, determining the size information of the target image according to the 3D format and the size information, so that the height of the target image is the same as that of the 3D image, and the width of the target image is at least larger than that of the character information;
if the 3D format is a left-right format or a right-left format, determining the size information of the target image according to the 3D format and the size information, so that the width of the target image is the same as that of the 3D image, and the height of the target image is at least larger than that of the character information.
Optionally, the target image includes a left-eye target image and a right-eye target image; the synthesis unit is specifically configured to:
synthesizing the left eye target image and the left eye background image into the 3D left eye image through an alpha mixing method;
and synthesizing the right eye target image and the right eye background image into the 3D right eye image through an alpha mixing method.
According to the method and the device provided by the embodiment of the invention, the target image of the preset image content is obtained, the region of the target image except the preset image content is a transparent region, and the transparency of the first target pixel point in the preset processing region is changed or the transparency and the pixel value of the second target pixel point are changed aiming at the preset processing region of the target image including the preset image content, so that the transition between the preset image content in the preset processing region and the adjacent pixel points of other content parts is more natural, the sawtooth phenomenon during the edge display of the preset image content is reduced, and the better visual effect is obtained.
Drawings
Fig. 1 is a schematic flow chart of an image processing method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a pixel point relationship provided in an embodiment of the present invention;
fig. 3(a) is a picture that is not processed by the image processing method provided by the embodiment of the invention;
fig. 3(b) is a picture processed by the image processing method provided by the embodiment of the invention;
fig. 4(a) is a picture that is not processed by the image processing method provided by the embodiment of the invention;
fig. 4(b) is a picture processed by the image processing method provided by the embodiment of the invention;
FIG. 5 is a flowchart illustrating an image processing method according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating an image processing method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments.
It should be noted that, in the embodiment of the present invention, the images corresponding to the left eye and the right eye of the viewer respectively for performing 3D display are referred to as a 3D left-eye image and a 3D right-eye image, and in general, in practical applications, for example, in a 3D film source, the 3D left-eye image and the 3D right-eye image are placed on a sheet source, which is referred to as a 3D image. The 3D left-eye image and the 3D right-eye image each contain specific image content and image content (referred to as background image content in the embodiment of the present invention) other than the specific image content, and the two portions of content can be separated, that is, the 3D left-eye image and the 3D right-eye image can be synthesized by the two portions of image content, and the image content other than the specific image content is referred to as a 3D left-eye background image and a 3D right-eye background image in the embodiment of the present invention. For example, the specific image content may be text, for example, in a 3D video, the text is displayed in a changing manner, such as scrolling horizontally/vertically, or dynamically updated, under the same background image.
That is, a 3D left eye image or a 3D right eye image may be a single image, i.e., one image includes all the content to be displayed; the 3D left eye image or the 3D right eye image may also be a combination of a plurality of images, each image in the combination contains different contents, and when displayed, the plurality of images are displayed simultaneously, so as to form a complete 3D left eye image or 3D right eye image.
For example, a 3D left eye image or a 3D right eye image is composed of two images, one image includes only subtitles, and one image includes a background to be displayed. When displayed, the two images are displayed simultaneously, thereby displaying an image including subtitles.
In the prior art, when 3D display is performed, in a stereoscopic image viewed by human eyes, a sawtooth phenomenon at an edge of specific image content is relatively obvious, for example, at an edge of a character, the viewing experience of a user is poor.
In view of this, an embodiment of the present invention provides an image processing method, which first converts and outputs a preset image content into a target image, where the target image only includes a specific image content, and all regions of the target image except the preset image content are transparent regions, and then processes an edge of a preset graph content in the target image, so as to effectively reduce a sawtooth phenomenon of the edge of the preset image content during 3D imaging. It is understood that the image content includes, but is not limited to, text.
In the embodiment of the invention, the target image is an image supporting an alpha transparent channel format, such as a png image. Each pixel point in the target image may be represented by three color channels of R (red), G (green), and B (blue), or may be represented by other color channels.
Based on the above description, as shown in fig. 1, a flowchart of an image processing method is provided for the embodiment of the present invention.
Referring to fig. 1, the method includes:
step 101: acquiring a target image of preset image content, wherein the region of the target image except the preset image content is a transparent region;
step 102: determining a preset processing area in the target image, wherein the preset image content is located in the preset processing area;
step 103: regarding each pixel point in the preset processing region, taking a pixel point, as a first background pixel point, of which the absolute value of the difference between a pixel value and any one of N preset pixel values is greater than a threshold value, taking a pixel point, which is adjacent to the first background pixel point and of which the absolute value of the difference between the pixel value and any one of the N preset pixel values is less than or equal to the threshold value, in the preset processing region as a first target pixel point, and changing the transparency of the first target pixel point into a first transparency, wherein the absolute value of the difference between the pixel value of the first target pixel point and any one of the N preset pixel values is less than or equal to the threshold value, and N is a positive integer; or, regarding each pixel point in the preset processing region, regarding a pixel point, of which an absolute value of a difference between a pixel value and any one of the N preset pixel values is smaller than or equal to the threshold, as a second background pixel point, regarding a pixel point, of which an absolute value of a difference between a pixel value and any one of the N preset pixel values is greater than the threshold, which is adjacent to the second background pixel point and is adjacent to the second background pixel point in the preset processing region, as a second target pixel point, and changing the transparency of the second target pixel point into a second transparency and changing the pixel value into the pixel value of the second background pixel point, wherein the absolute value of a difference between the pixel value of the second target pixel point and any one of the N preset pixel values is greater than the threshold;
step 104: synthesizing the target image after the change processing with a background image, wherein the background image comprises a left eye background image and a right eye background image, so as to obtain a 3D left eye image and a 3D right eye image;
step 105: and performing 3D display according to the 3D left eye image and the 3D right eye image.
According to the method provided by the embodiment of the invention, the target image of the preset image content is obtained, the region of the target image except the preset image content is a transparent region, and the transparency of the first target pixel point in the preset processing region is changed or the transparency and the pixel value of the second target pixel point are changed aiming at the preset processing region of the target image including the preset image content, so that the transition between the preset image content in the preset processing region and the adjacent pixel points of other content parts is more natural, the sawtooth phenomenon during the edge display of the preset image content is reduced, and the better visual effect is obtained.
In step 101, the preset image content may be content such as text information.
In step 101, a target image may be obtained according to preset image content to be stereoscopically displayed, and the preset image content needs to be respectively presented on a 3D left-eye image and a 3D right-eye image, so the obtained target image may be two target images, namely a left-eye target image and a right-eye target image, and it can be understood that, when the 3D left-eye image and the 3D right-eye image are arranged on one 3D image, the obtained target image may be one target image including two parts of preset image content that needs to be presented on the 3D left-eye image and the 3D right-eye image.
For convenience of description, the preset image content is taken as an example for description, and when the preset image content is other content, the description in the embodiment of the present invention may be referred to, and is not repeated herein.
When the preset image content is character information, the target image can be generated in the following mode:
step one, acquiring character information.
The text information may be text information to be displayed. For example, in a 3D movie, a movie subtitle and a movie picture are separated, and the movie subtitle is text information to be displayed.
And step two, determining the size information of the target image.
In the case where the target image is one image, that is, in the case where the 3D left-eye image and the 3D right-eye image are provided in one film source, that is, in one 3D image, this step may first determine the 3D format and size information of the 3D image, and determine the size information of the target image based on the 3D format and size information.
In the embodiment of the present application, the 3D left-eye image and the 3D right-eye image are disposed on the 3D image, and thus the 3D format and the size information may be determined according to the 3D image.
The 3D format may be classified into an upper and lower format, a lower and upper format, a left and right format, a right and left format, and the like, and in the different formats, the positions of the text information in the 3D left-eye image and the 3D right-eye image when displayed are different.
If the 3D format is a top-bottom format or a bottom-top format, the size information of the target image is determined according to the 3D format and the size information, so that the height of the target image is the same as the height of the 3D image, and the width of the target image is at least larger than the width of the character information, namely the width of the target image can completely contain the whole character information content.
If the 3D format is a left-right format or a right-left format, the size information of the target image is determined according to the 3D format and the size information, so that the width of the target image is the same as that of the 3D image, and the height of the target image is at least larger than that of the character information, namely the height of the target image can completely contain the whole character information content.
In the case where the target images are left-eye target images and right-eye target images, the step may first determine size information of the left-eye 3D images and the right-eye 3D images, determine size information of the left-eye target images according to the size information of the left-eye 3D images, and determine size information of the right-eye target images according to the size information of the right-eye 3D images. Also, the height of the left-eye target image may be made the same as the height of the left-eye 3D image, the width may be made at least larger than the width of the character information, or both the height and the width may be made the same, and the height of the right-eye target image may be made the same as the height of the right-eye 3D image, the width may be made at least larger than the width of the character information, or both the height and the width may be made the same.
And step three, determining the display position of the text information.
In this step, the position of the text information in the first region when the 3D left-eye image is displayed and the position of the text information in the second region when the 3D right-eye image is displayed need to be determined, and then the display position of the text information in the target image is determined according to the two position information. Namely, determining first area position information of a first area of the text information in the 3D left-eye image when the 3D left-eye image is displayed and second area position information of a second area of the text information in the 3D right-eye image when the 3D right-eye image is displayed, and determining the position information of the text information in the target image according to the first area position information and the second area position information.
The areas of the text information corresponding to the 3D left-eye image and the 3D right-eye image are different when displayed, and for this purpose, first area coordinate information of a first area located in the 3D left-eye image and second area coordinate information of a second area located in the 3D right-eye image when the text information is displayed are respectively determined.
For example, the region of the text information when displayed is a rectangular region, and the first region coordinate information constituted by four vertices of the first region is (0, 0), (0, 40), (100, 0); the first region coordinate information composed of the four vertices of the first region is (10, 0), (10, 40), (110, 0).
And step four, generating a target image according to the determined size information and the position information.
In the generated target image, the text information is located in the regions of the target image corresponding to the first region and the second region, and the pixel value of the text information is any one or more preset pixel values of the N preset pixel values.
In the embodiment of the present invention, the target image may be one image, or may be two images including a left-eye target image and a right-eye target image.
For example, when the target image is an image, a blank image with a complete blank and a transparency of the alpha transparent channel being a first preset transparency may be generated. The complete blank means that each pixel point in the generated blank image is white, that is, the pixel value of each pixel point is (255, 255, 255). Certainly, the pixel value of each pixel point in the generated blank image can also be other values; the first preset transparency may be 1, and of course, the first preset transparency may also be other values, which is not limited in the embodiment of the present invention. The text information is then synthesized in the regions of the blank image corresponding to the first region and the second region, thereby generating a target image. It should be noted that the font property of the text information in the generated target image is a preset font property, such as font type, font size, color, whether to be bolded, whether to be tilted, and the like; according to the preset font attributes, the pixel value of the pixel point in the region corresponding to the text information can be any one or more preset pixel values in the N preset pixel values; the transparency of the pixel points corresponding to the text information is a second preset transparency; the text format corresponding to the text information may be a preset format, such as a regular script; the font size corresponding to the text message may be a preset font size, for example, a font size four.
For example, when the left-eye target image is generated, a blank image which is completely blank and has the transparency of an alpha transparent channel as a first preset transparency is generated according to the determined size information. The complete blank means that each pixel point in the generated left-eye blank image is white, that is, the pixel value of each pixel point is (255, 255, 255). Certainly, the pixel value of each pixel point in the generated left-eye blank image can also be other values; the first preset transparency may be 1, and of course, the first preset transparency may also be other values, which is not limited in the embodiment of the present invention. And then synthesizing the text information in an area corresponding to the first area coordinate information in the left-eye blank image, thereby generating a left-eye target image.
It should be noted that the font attribute of the text information in the generated left-eye target image is a preset font attribute, and according to the preset font attribute, the pixel value of the pixel point in the region corresponding to the text information may be any one or more preset pixel values among N preset pixel values; the transparency of the pixel points corresponding to the text information is a second preset transparency; the text format corresponding to the text information may be a preset format, such as a regular script; the font size corresponding to the text message may be a preset font size, for example, a font size four.
It should be noted that the second preset transparency is greater than the first preset transparency.
Similarly, the right-eye target image may also be generated by using the same generation method as the left-eye target image, that is, the font attribute of the text information in the generated right-eye target image is a preset font attribute, and according to the preset font attribute, the pixel value of the pixel point in the region corresponding to the text information may be any one or more preset pixel values among N preset pixel values; the transparency of the pixel points corresponding to the text information is a second preset transparency; the text format corresponding to the text information can be a preset format; the font size corresponding to the text information can be a preset font size.
In step 102, after the target image is acquired, the preset processing area may be determined according to image configuration information of the target image, for example, the preset processing area is determined in the left-eye target image and the right-eye target image, respectively.
The minimum area protecting the preset image content may be set as the preset processing area, or the entire target image may be determined as the preset processing area as long as the preset processing area includes the preset image content.
The image configuration information may indicate a position of the preset image content in the target image, a pixel value list of N preset pixel values may be included in the image configuration information, coordinate information of the preset processing area, and the like.
The image configuration information may be stored in a file alone, or may also be stored in an illustrative structure package of image data, which is not limited in this embodiment of the present invention.
The image configuration information can be set by a user, and can be modified according to the actual display effect.
The image configuration information may also be set by the picture generator, which protects the image configuration information from being modified at will.
The preset processing area may be a rectangle, when the preset image content is a text, the preset processing area is an area including text information, and the N preset pixel values are pixel values corresponding to the text information.
After the predetermined processing area is determined, the predetermined processing area may be processed in step 103. In order to reduce the aliasing phenomenon generated when the preset image content is displayed, the embodiment of the present invention may process the preset processing area through various implementation manners, which are described in detail below.
In principle, step 103 actually finds the edge of the preset image content in the preset processing area, and processes the edge. In the first mode, the first target pixel is an edge pixel of the preset image content, the pixel value of the first target pixel is one of N preset pixel values of the preset image content or has a small difference with the N preset pixel values, the first target pixel is adjacent to the first background pixel, the first background pixel is non-preset image content, and the pixel value of the first background pixel is greatly different from the N preset pixel values of the preset image content. In the second mode, the second background pixel points are edge pixel points of the preset image content, and the second target pixel points are pixel points of the non-preset image content and are adjacent to the preset image content.
And after the edge of the preset image content is found, processing the edge. The embodiment of the invention provides two processing modes, wherein one mode is to change the transparency of the edge pixel points of the preset image content, and the other mode is to modify the transparency and the pixel value of the pixel points of the non-preset image content adjacent to the pixel points of the edge of the preset image content, so that the sawtooth phenomenon during the edge display of the preset image content is reduced, and the better visual effect is obtained. The following detailed description:
step one, traversing each pixel point in a preset processing area, and for any pixel point, if the absolute value of the difference between the pixel value of one pixel point and any one preset pixel value in N preset pixel values is larger than a threshold value and the absolute value of the difference between the pixel value of the pixel point adjacent to the pixel point and any one preset pixel value in N preset pixel values is smaller than or equal to the threshold value, taking the pixel point as a first background pixel point, taking the pixel point adjacent to the pixel point as a first target pixel point, and turning to the step two; otherwise, traversing the next pixel point.
For example, each pixel point in the left-eye target image and the right-eye target image may be represented by R, G, B color channels. For example, at this time, for any one pixel point in the preset processing region, if it is determined that the absolute value of the difference between the blue channel color value of the pixel point and any one of the preset blue channel color values in the N preset pixel values is greater than the threshold, the absolute value of the difference between the red channel color value of the pixel point and any one of the preset red channel color values in the N preset pixel values is greater than the threshold, and the absolute value of the difference between the green channel color value of the pixel point and any one of the preset green channel color values in the N preset pixel values is greater than the threshold. And for any pixel point adjacent to the pixel point, if it is determined that the absolute value of the difference between the blue channel color value of the adjacent pixel point and any one of the preset blue channel color values in the N preset pixel values is less than or equal to the threshold, the absolute value of the difference between the red channel color value of the adjacent pixel point and any one of the preset red channel color values in the N preset pixel values is less than or equal to the threshold, and the absolute value of the difference between the green channel color value of the adjacent pixel point and any one of the preset green channel color values in the N preset pixel values is less than or equal to the threshold, the pixel point is taken as a first background pixel point, and the adjacent pixel point is taken as a first target pixel point.
It should be noted that, in the embodiment of the present invention, how to traverse each pixel point in the preset processing region is not limited, and each pixel point in the preset processing region may be traversed by adopting a horizontal scanning manner or a vertical scanning manner, or may be traversed by adopting other manners. Meanwhile, in the embodiment of the invention, the threshold value can be determined according to the actual situation. For example, the threshold value may be 0, or may be any number between 10 and 0.
And secondly, changing the transparency of a first target pixel point which is adjacent to the first background pixel point in the preset processing area and has a difference value between a pixel value and any one of the N preset pixel values smaller than or equal to the threshold value into a first transparency.
It should be noted that the first target pixel point adjacent to the first background pixel point is actually an edge pixel point of a preset image content, such as a text, in the preset processing region, which is formed by all pixel points whose pixel values are that the absolute value of the difference between any one of the N preset pixel values is smaller than or equal to the threshold value. The first background pixel point is a pixel point adjacent to the edge pixel point of the preset image content.
In the embodiment of the present invention, the first transparency may be greater than a minimum value between the transparency of the first background pixel and the transparency of the first target pixel, and less than a maximum value between the transparency of the first background pixel and the transparency of the first target pixel. That is, the transparency is increased or decreased according to the sequence from the first background pixel point to the first target pixel point to the pixel point of the adjacent preset image content of the first target pixel point.
For example, if the transparency of the first background pixel is 0.5 and the transparency of the first target pixel is 0.8, the first transparency may be any number between 0.5 and 0.8.
Alternatively, the first transparency may also be determined in other ways. Specifically, for any one first target pixel point adjacent to the first background pixel point, the first transparency of the first target pixel point may be determined according to the following formula:
wherein,in order to be said first degree of transparency,the transparency of the first background pixel point is,is the transparency, K, of the first target pixel point1Greater than 0 and less than 1. Optionally, K1Is 0.5.
For example, as shown in fig. 2, a schematic diagram of a pixel point relationship provided in the embodiment of the present invention is shown. In fig. 2, pixel 1, pixel 2, pixel 3, pixel 4, pixel 6, pixel 7, pixel 8, and pixel 9 are 8-domain pixels of pixel 5, and in the embodiment of the present invention, any pixel in the 8-domain pixels of pixel 5 can be used as an adjacent pixel of pixel 5. Meanwhile, the pixel point 2, the pixel point 4, the pixel point 6 and the pixel point 8 are 4-field pixel points of the pixel point 5, and any pixel point in the 4-field pixel points of the pixel point 5 can be used as an adjacent pixel point of the pixel point 5 at this time.
That is to say, in the embodiment of the present invention, at least one of the 8-domain pixels of the first background pixel may be used as an adjacent pixel of the first background pixel, and at least one of the 4-domain pixels of the first background pixel may also be used as an adjacent pixel of the first background pixel.
In the above scheme, the transparency of the first target pixel point adjacent to the first background pixel point is changed, so that the transition between the preset image content in the preset processing region and the adjacent pixel point of the background image content (i.e. the image content outside the preset image content region) is more natural, the sawtooth phenomenon during the edge display of the target region is reduced, and the obtained visual effect is better.
A second possible implementation:
step one, traversing all pixel points in the preset processing area, if it is determined that the absolute value of the difference between the pixel value of one pixel point and any one of the N preset pixel values is smaller than or equal to a threshold value, and the absolute value of the difference between the pixel value of the pixel point adjacent to the pixel point and any one of the N preset pixel values is larger than the threshold value, taking the pixel point as a second background pixel point, taking the pixel point adjacent to the pixel point as a second target pixel point, and turning to step two; otherwise, traversing the next pixel point.
Similarly, each pixel point in the preset processing region may be traversed in a transverse scanning manner or a longitudinal scanning manner, and each pixel point in the preset processing region may also be traversed in other manners.
And step two, changing the transparency of a second target pixel point which is adjacent to the second background pixel point in the preset processing area and has the absolute value of the difference value between any one of the N preset pixel values and the second target pixel point which is larger than the threshold value into a second transparency, and changing the pixel value into the pixel value of the second background pixel point.
And aiming at any one second target pixel point in the pixel points adjacent to the second background pixel point, changing the pixel value of the second target pixel point into the pixel value of the second background pixel point.
For example, each pixel point in the left-eye target image and the right-eye target image may be represented by R, G, B color channels. Changing the blue channel color value of the second target pixel point into the blue channel color value of the second background pixel point, changing the red channel color value of the second target pixel point into the red channel color value of the second background pixel point, and changing the green channel color value of the second target pixel point into the green channel color value of the second background pixel point.
It should be noted that, if it is determined that the number of second target pixel points in pixel points adjacent to the second background pixel point is greater than 0, the second background pixel point may be determined as an edge pixel point of the preset image content; the edge pixel is actually a pixel at the edge of the preset image content formed by all pixels of which the absolute value of the difference between the pixel value and any one of the N preset pixel values is smaller than or equal to the threshold. And the second target pixel point is a pixel point adjacent to the edge pixel point of the preset image content.
In this embodiment of the application, the second transparency may be greater than a minimum value between the transparency of the second background pixel and the transparency of the second target pixel, and less than a maximum value between the transparency of the second background pixel and the transparency of the second target pixel.
Alternatively, the first transparency may also be determined in other ways. Specifically, for any second target pixel point adjacent to the second background pixel point, the second transparency of the second target pixel point can be determined according to the following formula:
wherein,in order to be said second degree of transparency,the transparency of the second background pixel point is,is the transparency, K, of the second target pixel point2Greater than 0 and less than 1. Optionally, K2Is 0.5.
Similarly, at least one pixel point of 8-domain pixel points of the second background pixel point can be used as an adjacent pixel point of the second background pixel point, and at least one pixel point of 4-domain pixel points of the second background pixel point can be used as an adjacent pixel point of the second background pixel point.
In the scheme, the transparency of the second target pixel point is changed, and the pixel value of the second target pixel point is changed into the pixel value of the second background pixel point, so that the transition between the preset image content in the preset processing area and the adjacent pixel point of the background image content is more natural, the sawtooth phenomenon during the edge display of the preset image content is reduced, and a better visual effect is obtained.
It should be noted that, taking preset image content as an example of a text, in the embodiment of the present invention, it may also be determined whether to process the preset processing area in a first possible implementation manner or in a second possible implementation manner according to a font attribute of text information in the preset processing area.
Specifically, if the word size of the character information in the preset processing area is determined to be less than or equal to the preset word size, the preset processing area is processed by adopting a first possible implementation mode; if the font size of the character information in the preset processing area is determined to be larger than the preset font size and is a bold font, processing the preset processing area by adopting a first possible implementation mode; and if the word size of the character information in the preset processing area is determined to be larger than the preset word size and not in a bold font, processing the preset processing area by adopting a second possible implementation mode.
In step 104, the modified target image is combined with the background image, so as to obtain a 3D left-eye image and a 3D right-eye image. Further, in step 105, 3D display is performed according to the 3D left eye image and the 3D right eye image.
Specifically, when the background image includes a left-eye background image and a right-eye background image, in the embodiment of the present invention, the left-eye target image and the left-eye background image corresponding to the text information may be synthesized into the 3D left-eye image by an alpha mixing method; synthesizing the right eye target image and a right eye background image corresponding to the text information into a 3D right eye image by an alpha mixing method; and performing 3D display according to the 3D left eye image and the 3D right eye image.
By the method, the transparency of the first target pixel point or the second target pixel point is changed, so that transition between adjacent pixel points in the preset processing area is more natural, and a better visual effect is obtained.
For example, the preset image content is taken as a text, and as shown in fig. 3(a), the preset image content is a picture of a 3D image displayed without being processed by the image processing method according to the embodiment of the present invention. The jaggy of the text edge is more evident in fig. 3 (a). As shown in fig. 3(b), the image is a picture of a 3D image displayed after being processed by the image processing method provided by the embodiment of the present invention. In fig. 3(b), after the picture is processed according to the embodiment of the present invention, the text edge becomes relatively smooth, and the jaggy of the edge is effectively eliminated.
For another example, as shown in fig. 4(a), the image is a picture of a 3D image displayed without being processed by the image processing method according to the embodiment of the present invention. The jaggy of the text edge is more evident in fig. 4 (a). As shown in fig. 4(b), the image is a picture of a 3D image displayed after being processed by the image processing method provided by the embodiment of the present invention. In fig. 4(b), after the picture is processed according to the embodiment of the present invention, the text edge becomes relatively smooth, and the jaggy of the edge is effectively eliminated.
The above flow is described in detail below by way of specific examples.
Fig. 5 is a schematic flow chart of an image processing method according to an embodiment of the present invention.
Step 301: and acquiring a target image.
The target image is an image containing preset image content, such as png picture containing text content, the text content is opaque, and other areas are transparent.
The text content needing 3D display can be extracted and output as a transparent picture.
Step 302: and determining a preset processing area in the target image.
The determined preset processing area encloses preset image content, such as text.
Step 303: determining a pixel point from any one preset processing area;
step 304: judging whether the absolute value of the difference between the pixel value of the pixel point and any one of the N preset pixel values is greater than a threshold, if so, taking the pixel point as a first background pixel point and turning to step 305; otherwise go to step 307.
Step 305: and determining whether a first target pixel point exists in the pixel points adjacent to the first background pixel point, if so, turning to a step 306, and otherwise, turning to a step 307.
Step 306: and determining the first transparency of the first target pixel point adjacent to the first background pixel point according to the formula (1).
Step 307: and judging whether all pixel points in the preset processing area are traversed, if so, turning to step 308, and otherwise, turning to step 303.
Step 308: and obtaining the processed target image.
And synthesizing the target image and the background image to obtain a 3D left-eye image and a 3D right-eye image, and performing 3D display according to the 3D left-eye image and the 3D right-eye image.
Fig. 6 is a schematic flow chart of an image processing method according to an embodiment of the present invention.
Step 401: a left eye target image and a right eye target image are acquired.
The target image is an image containing preset image content, such as png picture containing text content, the text content is opaque, and other areas are transparent. The text content needing 3D display can be extracted and output as a transparent picture.
Step 402: and determining preset processing areas in the left-eye target image and the right-eye target image respectively.
The determined preset processing area encloses preset image content, such as text.
Step 403: determining a pixel point from any one preset processing area;
step 404: judging whether the absolute value of the difference between the pixel value of the pixel point and any one of the N preset pixel values is larger than a threshold value, if not, taking the pixel point as a second background pixel point and turning to the step 405; otherwise go to step 407.
Step 405: and determining whether a second target pixel point exists in the pixel points adjacent to the second background pixel point, if so, turning to the step 406, and otherwise, turning to the step 407.
Step 406: and (3) determining the second transparency of a second target pixel point adjacent to the second background pixel point according to the formula (2), and changing the pixel value of the second target pixel point adjacent to the second background pixel point into the pixel value of the second background pixel point.
Step 407: and judging whether all pixel points in the preset processing area are traversed, if so, turning to step 408, and otherwise, turning to step 403.
Step 408: a processed left eye target image and a processed right eye target image are obtained.
And then, respectively synthesizing the left eye image and the right eye image with the left eye background image and the right eye background image to obtain a 3D left eye image and a 3D right eye image, and performing 3D display according to the 3D left eye image and the 3D right eye image.
Based on the same technical concept, the embodiment of the invention also provides a structural schematic diagram of an image processing device, and the device can execute the method embodiment.
As shown in fig. 7, a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention is provided.
Referring to fig. 7, the apparatus includes:
an obtaining unit 701, configured to obtain a target image of preset image content, where an area of the target image except for the preset image content is a transparent area;
a determining unit 702, configured to determine a preset processing region in the target image, where the preset image content is located;
a processing unit 703, configured to, for each pixel point in the preset processing region, use a pixel point, of which an absolute value of a difference between a pixel value and any one of N preset pixel values is greater than a threshold, as a first background pixel point, and use a pixel point, of the preset processing region, which is adjacent to the first background pixel point and of which an absolute value of a difference between the pixel value and any one of the N preset pixel values is less than or equal to the threshold, as a first target pixel point, and change the transparency of the first target pixel point into a first transparency, where an absolute value of a difference between the pixel value of the first target pixel point and any one of the N preset pixel values is less than or equal to the threshold, and N is a positive integer; or, regarding each pixel point in the preset processing region, regarding a pixel point, of which an absolute value of a difference between a pixel value and any one of the N preset pixel values is smaller than or equal to the threshold, as a second background pixel point, regarding a pixel point, of which an absolute value of a difference between a pixel value and any one of the N preset pixel values is greater than the threshold, which is adjacent to the second background pixel point and is adjacent to the second background pixel point in the preset processing region, as a second target pixel point, and changing the transparency of the second target pixel point into a second transparency and changing the pixel value into the pixel value of the second background pixel point, wherein the absolute value of a difference between the pixel value of the second target pixel point and any one of the N preset pixel values is greater than the threshold;
a synthesizing unit 704, configured to synthesize the modified target image with a background image, where the background image includes a left-eye background image and a right-eye background image, so as to obtain a 3D left-eye image and a 3D right-eye image;
a display unit 705 configured to perform 3D display according to the 3D left-eye image and the 3D right-eye image.
Optionally, the processing unit 703 is specifically configured to:
aiming at any one first target pixel point adjacent to the first background pixel point, determining the first transparency of the first target pixel point according to the following formula:
wherein,in order to be said first degree of transparency,the transparency of the first background pixel point is,is the transparency, K, of the first target pixel point1Greater than 0 and less than 1.
Optionally, the processing unit 703 is specifically configured to:
for any second target pixel point adjacent to the second background pixel point, determining the second transparency of the second target pixel point according to the following formula:
wherein,in order to be said second degree of transparency,the transparency of the second background pixel point is,is the transparency, K, of the second target pixel point2Greater than 0 and less than 1.
Optionally, the preset image content is text information;
and the N preset pixel values are pixel values corresponding to the character information.
Optionally, the 3D left-eye image and the 3D right-eye image are disposed on the 3D image;
the obtaining unit 701 is specifically configured to:
determining the 3D format and the size information of the 3D image, and determining the size information of the target image according to the 3D format and the size information; and
determining first area position information of a first area of the text information in the 3D left-eye image when the 3D left-eye image is displayed and second area position information of a second area of the text information in the 3D right-eye image when the 3D right-eye image is displayed, and determining position information of the text information in the target image according to the first area position information and the second area position information;
and generating the target image according to the determined size information and the determined position information, wherein the text information is located in an area corresponding to the first area and the second area in the target image, and the pixel value of the text information is any one or more preset pixel values in the N preset pixel values.
Optionally, the obtaining unit 701 is specifically configured to:
if the 3D format is an upper-lower format or a lower-upper format, determining the size information of the target image according to the 3D format and the size information, so that the height of the target image is the same as that of the 3D image, and the width of the target image is at least larger than that of the character information;
if the 3D format is a left-right format or a right-left format, determining the size information of the target image according to the 3D format and the size information, so that the width of the target image is the same as that of the 3D image, and the height of the target image is at least larger than that of the character information.
Optionally, the target image includes a left-eye target image and a right-eye target image;
the synthesis unit 704 is specifically configured to:
synthesizing the left eye target image and the left eye background image into the 3D left eye image through an alpha mixing method;
and synthesizing the right eye target image and the right eye background image into the 3D right eye image through an alpha mixing method.
According to the device provided by the embodiment of the invention, by acquiring the target image of the preset image content, the region of the target image except the preset image content is a transparent region, and aiming at the preset processing region of the target image including the preset image content, the transparency of the first target pixel point in the preset processing region is changed, or the transparency and the pixel value of the second target pixel point are changed, so that the transition between the preset image content in the preset processing region and the adjacent pixel points of other content parts is more natural, the sawtooth phenomenon during the edge display of the preset image content is reduced, and the better visual effect is obtained.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the scope of the invention. Thus, it is intended that the present invention cover the modifications and variations of this invention provided they come within the scope of the appended claims.

Claims (14)

1. An image processing method, characterized in that the method comprises:
acquiring a target image of preset image content, wherein the region of the target image except the preset image content is a transparent region;
determining a preset processing area in the target image, wherein the preset image content is located in the preset processing area;
regarding each pixel point in the preset processing region, taking a pixel point, as a first background pixel point, in the preset processing region, which is adjacent to the first background pixel point and has an absolute value of a difference between the pixel value and any one of the N preset pixel values being less than or equal to a threshold value, as a first target pixel point, and changing the transparency of the first target pixel point into a first transparency, wherein the absolute value of the difference between the pixel value of the first target pixel point and any one of the N preset pixel values being less than or equal to the threshold value, N is a positive integer, and the first transparency is greater than a minimum value of the transparency of the first background pixel point and the transparency of the first target pixel point, And is smaller than the maximum value of the transparency of the first background pixel point and the transparency of the first target pixel point; or,
regarding each pixel point in the preset processing region, taking a pixel point of which the absolute value of the difference between the pixel value and any one of the N preset pixel values is smaller than or equal to the threshold as a second background pixel point, taking a pixel point of which the absolute value of the difference between the pixel value and any one of the N preset pixel values is larger than the threshold in the preset processing region and which is adjacent to the second background pixel point and is larger than the threshold as a second target pixel point, changing the transparency of the second target pixel point into a second transparency, and changing the pixel value into the pixel value of the second background pixel point, wherein the absolute value of the difference between the pixel value of the second target pixel point and any one of the N preset pixel values is larger than the threshold, and N is a positive integer; the second transparency is greater than the minimum value of the transparency of the second background pixel point and the transparency of the second target pixel point and is less than the maximum value of the transparency of the second background pixel point and the transparency of the second target pixel point;
synthesizing the target image after the change processing with a background image, wherein the background image comprises a left eye background image and a right eye background image, so as to obtain a 3D left eye image and a 3D right eye image;
and performing 3D display according to the 3D left eye image and the 3D right eye image.
2. The method of claim 1, wherein changing the transparency of the first target pixel point to the first transparency comprises:
aiming at any one first target pixel point adjacent to the first background pixel point, determining the first transparency of the first target pixel point according to the following formula:
wherein,in order to be said first degree of transparency,the transparency of the first background pixel point is,is the transparency, K, of the first target pixel point1Greater than 0 and less than 1.
3. The method of claim 1, wherein said changing the transparency of the second target pixel point to a second transparency comprises:
for any second target pixel point adjacent to the second background pixel point, determining the second transparency of the second target pixel point according to the following formula:
wherein,in order to be said second degree of transparency,the transparency of the second background pixel point is,is the transparency, K, of the second target pixel point2Greater than 0 and less than 1.
4. The method of claim 1,
the preset image content is character information;
and the N preset pixel values are pixel values corresponding to the character information.
5. The method of claim 4,
the 3D left eye image and the 3D right eye image are arranged on the 3D image;
the acquiring of the target image of the preset image content includes:
determining the 3D format and the size information of the 3D image, and determining the size information of the target image according to the 3D format and the size information; and
determining first area position information of a first area of the text information in the 3D left-eye image when the 3D left-eye image is displayed and second area position information of a second area of the text information in the 3D right-eye image when the 3D right-eye image is displayed, and determining position information of the text information in the target image according to the first area position information and the second area position information;
and generating the target image according to the determined size information and the determined position information, wherein the text information is located in an area corresponding to the first area and the second area in the target image, and the pixel value of the text information is any one or more preset pixel values in the N preset pixel values.
6. The method of claim 5, wherein said determining size information for the target image based on the 3D format and the size information comprises:
if the 3D format is an upper-lower format or a lower-upper format, determining the size information of the target image according to the 3D format and the size information, so that the height of the target image is the same as that of the 3D image, and the width of the target image is at least larger than that of the character information;
if the 3D format is a left-right format or a right-left format, determining the size information of the target image according to the 3D format and the size information, so that the width of the target image is the same as that of the 3D image, and the height of the target image is at least larger than that of the character information.
7. The method of claim 5,
the target image comprises a left eye target image and a right eye target image;
the synthesizing the modified target image with a background image, where the background image includes a left-eye background image and a right-eye background image, so as to obtain a 3D left-eye image and a 3D right-eye image includes:
synthesizing the left eye target image and the left eye background image into the 3D left eye image through an alpha mixing method;
and synthesizing the right eye target image and the right eye background image into the 3D right eye image through an alpha mixing method.
8. An image processing apparatus characterized by comprising:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a target image of preset image content, and the area of the target image except the preset image content is a transparent area;
a determining unit, configured to determine a preset processing region in the target image, where the preset image content is located;
a processing unit, configured to, for each pixel point in the preset processing region, use a pixel point, as a first background pixel point, where an absolute value of a difference between a pixel value and any one of N preset pixel values is greater than a threshold, and use, as a first target pixel point, a pixel point, adjacent to the first background pixel point, in the preset processing region, where the absolute value of the difference between the pixel value and any one of the N preset pixel values is less than or equal to the threshold, and change the transparency of the first target pixel point into a first transparency, where the absolute value of the difference between the pixel value of the first target pixel point and any one of the N preset pixel values is less than or equal to the threshold, N is a positive integer, and the first transparency is greater than a minimum value, between the transparency of the first background pixel point and the transparency of the first target pixel point, And is smaller than the maximum value of the transparency of the first background pixel point and the transparency of the first target pixel point; or, regarding each pixel point in the preset processing region, regarding a pixel point, as a second background pixel point, where an absolute value of a difference between a pixel value and any one of N preset pixel values is less than or equal to the threshold, regarding a pixel point, in the preset processing region, which is adjacent to the second background pixel point and has an absolute value of a difference between the pixel value and any one of the N preset pixel values greater than the threshold, as a second target pixel point, and changing the transparency of the second target pixel point to a second transparency and changing the pixel value to the pixel value of the second background pixel point, where the absolute value of a difference between the pixel value of the second target pixel point and any one of the N preset pixel values is greater than the threshold, and N is a positive integer; the second transparency is greater than the minimum value of the transparency of the second background pixel point and the transparency of the second target pixel point and is less than the maximum value of the transparency of the second background pixel point and the transparency of the second target pixel point;
a synthesizing unit, configured to synthesize the modified target image with a background image, where the background image includes a left-eye background image and a right-eye background image, so as to obtain a 3D left-eye image and a 3D right-eye image;
and the display unit is used for carrying out 3D display according to the 3D left eye image and the 3D right eye image.
9. The apparatus as claimed in claim 8, wherein said processing unit is specifically configured to:
aiming at any one first target pixel point adjacent to the first background pixel point, determining the first transparency of the first target pixel point according to the following formula:
wherein,in order to be said first degree of transparency,the transparency of the first background pixel point is,is the transparency, K, of the first target pixel point1Greater than 0 and less than 1.
10. The apparatus as claimed in claim 8, wherein said processing unit is specifically configured to:
for any second target pixel point adjacent to the second background pixel point, determining the second transparency of the second target pixel point according to the following formula:
wherein,in order to be said second degree of transparency,the transparency of the second background pixel point is,is the transparency, K, of the second target pixel point2Greater than 0 and less than 1.
11. The apparatus of claim 8, wherein the predetermined image content is text information;
and the N preset pixel values are pixel values corresponding to the character information.
12. The apparatus of claim 11, wherein the 3D left-eye image and the 3D right-eye image are disposed on a 3D image;
the obtaining unit is specifically configured to:
determining the 3D format and the size information of the 3D image, and determining the size information of the target image according to the 3D format and the size information; and
determining first area position information of a first area of the text information in the 3D left-eye image when the 3D left-eye image is displayed and second area position information of a second area of the text information in the 3D right-eye image when the 3D right-eye image is displayed, and determining position information of the text information in the target image according to the first area position information and the second area position information;
and generating the target image according to the determined size information and the determined position information, wherein the text information is located in an area corresponding to the first area and the second area in the target image, and the pixel value of the text information is any one or more preset pixel values in the N preset pixel values.
13. The apparatus of claim 12, wherein the obtaining unit is specifically configured to:
if the 3D format is an upper-lower format or a lower-upper format, determining the size information of the target image according to the 3D format and the size information, so that the height of the target image is the same as that of the 3D image, and the width of the target image is at least larger than that of the character information;
if the 3D format is a left-right format or a right-left format, determining the size information of the target image according to the 3D format and the size information, so that the width of the target image is the same as that of the 3D image, and the height of the target image is at least larger than that of the character information.
14. The apparatus of claim 12, wherein the target image comprises a left eye target image and a right eye target image; the synthesis unit is specifically configured to:
synthesizing the left eye target image and the left eye background image into the 3D left eye image through an alpha mixing method;
and synthesizing the right eye target image and the right eye background image into the 3D right eye image through an alpha mixing method.
CN201511033138.2A 2015-12-31 2015-12-31 A kind of image processing method and device Active CN106937103B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511033138.2A CN106937103B (en) 2015-12-31 2015-12-31 A kind of image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511033138.2A CN106937103B (en) 2015-12-31 2015-12-31 A kind of image processing method and device

Publications (2)

Publication Number Publication Date
CN106937103A CN106937103A (en) 2017-07-07
CN106937103B true CN106937103B (en) 2018-11-30

Family

ID=59444271

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511033138.2A Active CN106937103B (en) 2015-12-31 2015-12-31 A kind of image processing method and device

Country Status (1)

Country Link
CN (1) CN106937103B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389558B (en) * 2017-08-03 2020-12-08 广州汽车集团股份有限公司 Method and device for eliminating image edge saw teeth
CN108053436B (en) * 2017-11-15 2020-10-16 阿里巴巴(中国)有限公司 Picture processing method and device, electronic equipment and picture server
CN109741465B (en) * 2019-01-10 2023-10-27 京东方科技集团股份有限公司 Image processing method and device and display device
CN112055247B (en) * 2020-09-11 2022-07-08 北京爱奇艺科技有限公司 Video playing method, device, system and storage medium
CN113902804A (en) * 2021-10-14 2022-01-07 北京卓越乐享网络科技有限公司 Method, apparatus, device and medium for identifying transparent area in image

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101268700A (en) * 2005-09-22 2008-09-17 派尔高公司 Method and apparatus for superimposing characters on video
CN102165496A (en) * 2008-09-25 2011-08-24 皇家飞利浦电子股份有限公司 Three dimensional image data processing
EP2391140A2 (en) * 2010-05-31 2011-11-30 Samsung Electronics Co., Ltd. Display apparatus and display method thereof
CN102790891A (en) * 2011-05-16 2012-11-21 乐金显示有限公司 Image processing method and stereoscopic image display device using the same
CN103136723A (en) * 2011-11-29 2013-06-05 方正国际软件(北京)有限公司 Image sawtooth removing method and system
WO2013089183A1 (en) * 2011-12-15 2013-06-20 シャープ株式会社 Image processing device, image processing method, computer program, recording medium, and stereoscopic image display device
JP5324017B1 (en) * 2013-03-13 2013-10-23 楽天株式会社 Image processing apparatus, image processing method, and image processing program
KR20140098512A (en) * 2013-01-31 2014-08-08 엘지전자 주식회사 Image display apparatus, and method for operating the same
CN104200427A (en) * 2014-09-17 2014-12-10 厦门美图之家科技有限公司 Method for eliminating edge sawteeth of images
US9105088B1 (en) * 2013-10-04 2015-08-11 Google Inc. Image blur with preservation of detail

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101268700A (en) * 2005-09-22 2008-09-17 派尔高公司 Method and apparatus for superimposing characters on video
CN102165496A (en) * 2008-09-25 2011-08-24 皇家飞利浦电子股份有限公司 Three dimensional image data processing
EP2391140A2 (en) * 2010-05-31 2011-11-30 Samsung Electronics Co., Ltd. Display apparatus and display method thereof
CN102790891A (en) * 2011-05-16 2012-11-21 乐金显示有限公司 Image processing method and stereoscopic image display device using the same
CN103136723A (en) * 2011-11-29 2013-06-05 方正国际软件(北京)有限公司 Image sawtooth removing method and system
WO2013089183A1 (en) * 2011-12-15 2013-06-20 シャープ株式会社 Image processing device, image processing method, computer program, recording medium, and stereoscopic image display device
KR20140098512A (en) * 2013-01-31 2014-08-08 엘지전자 주식회사 Image display apparatus, and method for operating the same
JP5324017B1 (en) * 2013-03-13 2013-10-23 楽天株式会社 Image processing apparatus, image processing method, and image processing program
US9105088B1 (en) * 2013-10-04 2015-08-11 Google Inc. Image blur with preservation of detail
CN104200427A (en) * 2014-09-17 2014-12-10 厦门美图之家科技有限公司 Method for eliminating edge sawteeth of images

Also Published As

Publication number Publication date
CN106937103A (en) 2017-07-07

Similar Documents

Publication Publication Date Title
CN106937103B (en) A kind of image processing method and device
US9183669B2 (en) Method and apparatus for virtual viewpoint synthesis in multi-viewpoint video
US10237539B2 (en) 3D display apparatus and control method thereof
TWI542190B (en) Method and system for encoding a 3d image signal, encoded 3d image signal, method and system for decoding a 3d image signal
CN104539935B (en) The adjusting method and adjusting means of brightness of image, display device
KR102174258B1 (en) Glassless 3d display apparatus and contorl method thereof
US10694173B2 (en) Multiview image display apparatus and control method thereof
CN108076208B (en) Display processing method and device and terminal
JP5476910B2 (en) Image generating apparatus, image generating method, and program
US8368690B1 (en) Calibrator for autostereoscopic image display
US20120044241A1 (en) Three-dimensional on-screen display imaging system and method
US8872902B2 (en) Stereoscopic video processing device and method for modifying a parallax value, and program
US10939092B2 (en) Multiview image display apparatus and multiview image display method thereof
CN103826114A (en) Stereo display method and free stereo display apparatus
TWI602145B (en) Unpacking method, device and system of packed frame
US20050012814A1 (en) Method for displaying multiple-view stereoscopic images
KR102143463B1 (en) Multi view image display apparatus and contorl method thereof
US20140146146A1 (en) In-painting method for 3d stereoscopic views generation
CN106937104B (en) A kind of image processing method and device
WO2016155126A1 (en) Device and method for displaying three-dimensional image or video on display screen
WO2012175386A1 (en) Method for reducing the size of a stereoscopic image
TWI530155B (en) Method, device for packing multi-view frame and non-transitory storage medium for storing packed frame
CN101588514B (en) Method for processing three dimensional images
CN109726603B (en) Image display method and device
JP5281720B1 (en) 3D image processing apparatus and 3D image processing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20180718

Address after: 518052 Room 201, building A, Qian Wan Road, Shenzhen Nanshan District cooperation zone, Qianhai, Shenzhen, Guangdong

Applicant after: Shenzhen super Technology Co., Ltd.

Address before: 518053 East Guangdong H-1 101, overseas Chinese Town Road, Nanshan District, Shenzhen.

Applicant before: Shenzhen SuperD Photoelectronic Co., Ltd.

GR01 Patent grant
GR01 Patent grant