CN104123743A - Image shadow adding method and device - Google Patents

Image shadow adding method and device Download PDF

Info

Publication number
CN104123743A
CN104123743A CN201410284089.9A CN201410284089A CN104123743A CN 104123743 A CN104123743 A CN 104123743A CN 201410284089 A CN201410284089 A CN 201410284089A CN 104123743 A CN104123743 A CN 104123743A
Authority
CN
China
Prior art keywords
shade
image
display screen
added
light source
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.)
Pending
Application number
CN201410284089.9A
Other languages
Chinese (zh)
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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201410284089.9A priority Critical patent/CN104123743A/en
Publication of CN104123743A publication Critical patent/CN104123743A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

The invention discloses an image shadow adding method and device, and belongs to the technical field of computers. The method comprises the following steps: acquiring an image to be added with a shadow; acquiring light direction of the current outside light source relative to a display screen; determining the shadow corresponding to the image according to the light direction and the image to be added with the shadow; adding shadow to the image and displaying. According to the image shadow adding method and device, the light direction of the current outside light source relative to the display screen is acquired, then the shadow corresponding to the image is determined according to the light direction and the image to be added with the shadow, and finally the determined shadow is added to the image and displayed; the problem of the prior art that a preset shadow is directly added to the image and cannot be changed when in use, which causes poor sense of reality is solved; the effects of improving real-time variability of the image shadow can be improved, and the sense of reality of the image shadow is also raised.

Description

Image shade adding method and device
Technical field
The present invention relates to field of computer technology, particularly a kind of image shade adding method and device.
Background technology
Graphic interface often adopts Shadow Techniques to provide plastic for the image in interface, such as being that image in icon, game control or three-dimensional scenic in interface etc. increases shade.
The shade adding method existing at present normally in the time setting up iconic model, the pre-set shade of iconic model that is respectively different.Because the shade of iconic model is pre-set before issue, therefore, for same iconic model, each user all can see identical shade.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem: due to directly for image adds pre-set shade, thereby the shade of image can not be changed in the process of use, the sense of reality is not strong.
Summary of the invention
In order to solve in prior art due to directly for image adds pre-set shade, thereby the shade of image can not be changed in the process using, the problem that the sense of reality is not strong, the embodiment of the present invention provides a kind of image shade adding method and device.Described technical scheme is as follows:
First aspect, provides image shade adding method, is applied in the electronic equipment that includes display screen, and described method comprises:
Obtain the image of shade to be added;
Obtain the light trend of current external light source with respect to described display screen;
According to the image of described light trend and described shade to be added, determine the shade corresponding with described image;
For adding described shade, described image shows.
In the possible embodiment of the first of first aspect, described external light source is solar source, described in obtain the light trend of current external light source with respect to described display screen, comprising:
Obtain the residing geographic position of described electronic equipment, record obtains obtaining the moment of described geographic position;
According to described geographic position and described in obtain the moment, determine from described solar source and point to the ray of the central point of described display screen;
Be the light trend of described solar source with respect to described display screen by the orientation determination of described ray.
In conjunction with the possible embodiment of the first of first aspect or first aspect, in the possible embodiment of the second, described electronic equipment also comprises the photo-sensitive cell of arranging as the capable * n of n row, described in obtain the light trend of current external light source with respect to described display screen, comprising:
For each photo-sensitive cell, the light intensity that definite external light source sensing produces on described photo-sensitive cell;
The described light intensity sensing according to each photo-sensitive cell, determines that the light of described external light source moves towards.
In conjunction with the third possible embodiment of the possible embodiment of the first of first aspect, first aspect or first aspect, in the third possible embodiment, in the time that the image showing on described display screen is two dimensional image, described according to the image of described light trend and described shade to be added, determine the shade corresponding with described image, comprising:
Edge according to described image away from described external light source, determines the shade corresponding with described edge shape, and described shade has predetermined length;
Described for described image adds described shade and shows, comprising:
Determine that described light moves towards the indicated direction of projection on described display screen, adds described shade and shows at described edge according to described direction.
In conjunction with the possible embodiment of the first of first aspect, first aspect to any one the possible embodiment in the third possible embodiment of first aspect, in the 4th kind of possible embodiment, in the time that the image showing on described display screen is 3-D view, described according to the image of described light trend and described shade to be added, determine the shade corresponding with described image, comprising:
Determine the angle between described light trend and described display screen;
According to the shade amplification coefficient of the height of the image of the tangent value of described angle, described shade to be added and setting, calculate the length of the shade corresponding with described image;
Described for described image adds described shade and shows, comprising:
Determining that described light moves towards the indicated direction of projection on described display screen, is that described image interpolation has the described shade of described length and shows according to described direction.
In conjunction with the possible embodiment of the first of first aspect, first aspect to any one the possible embodiment in the 4th kind of possible embodiment of first aspect, in the 5th kind of possible embodiment, described according to the shade amplification coefficient of the height of the image of the tangent value of described angle, described shade to be added and setting, the length of calculating the shade corresponding with described image, comprising:
Tangent value by the height of the image of described shade to be added divided by described angle, obtains quotient;
Described quotient is multiplied by described shade amplification coefficient, obtains the length of the shade that described image is corresponding.
Second aspect, provides image shade adding set, is applied in the electronic equipment that includes display screen, and described device comprises:
Image collection module, for obtaining the image of shade to be added;
Move towards acquisition module, for obtaining the light trend of current external light source with respect to described display screen;
Shade determination module, for according to the described image that moves towards the described shade to be added that described light trend that acquisition module gets and described image collection module get, determines the shade corresponding with described image;
Shade adds module, is used to described image to add the definite described shade of described shade determination module and shows.
In the possible embodiment of the first of second aspect, described external light source is solar source, and the described acquisition module that moves towards, comprising:
Geographic position acquiring unit, for obtaining the residing geographic position of described electronic equipment, record obtains obtaining the moment of described geographic position;
Ray determining unit, for the described geographic position that obtains according to geographical position acquisition unit and described in obtain the moment, determine the ray that points to the central point of described display screen from described solar source;
First moves towards determining unit, for by the orientation determination of described ray definite described ray determining unit being the light trend of described solar source with respect to described display screen.
In conjunction with the possible embodiment of the first of second aspect or second aspect, in the possible embodiment of the second, described electronic equipment also comprises the photo-sensitive cell of arranging as the capable * n row of n, and the described acquisition module that moves towards, comprising:
Light intensity determining unit, for for each photo-sensitive cell, determines the light intensity that the external light source that senses produces on described photo-sensitive cell;
Second moves towards determining unit, for the described light intensity sensing according to each photo-sensitive cell, determines the light trend of described external light source.
In conjunction with the third possible embodiment of the possible embodiment of the first of second aspect, second aspect or second aspect, in the third possible embodiment, in the time that the image showing on described display screen is two dimensional image, described shade determination module, comprising:
Shade determining unit, for the edge away from described external light source according to described image, determines the shade corresponding with described edge shape, and described shade has predetermined length;
Described shade adds module, comprising:
The first adding device, for determining that described light moves towards the indicated direction of projection on described display screen, adds described shade and shows at described edge according to described direction.
In conjunction with the possible embodiment of the first of second aspect, second aspect to any one the possible embodiment in the third possible embodiment of second aspect, in the 4th kind of possible embodiment, in the time that the image showing on described display screen is 3-D view, described shade determination module, comprising:
Angle determining unit, for determining the angle between described light trend and described display screen;
Shade length determining unit, for according to the shade amplification coefficient of the height of the image of the tangent value of described angle, described shade to be added and setting, calculates the length of the shade corresponding with described image;
Described shade adds module, comprising:
The second adding device, for determining that described light moves towards the indicated direction of projection on described display screen, is that described image interpolation has the described shade of described length and shows according to described direction.
In conjunction with the possible embodiment of the first of second aspect, second aspect, to any one the possible embodiment in the 4th kind of possible embodiment of second aspect, in the 5th kind of possible embodiment, described shade length determining unit, comprising:
Quotient obtains subelement, for the tangent value divided by described angle by the height of the image of described shade to be added, obtains quotient;
Shade length is obtained subelement, is multiplied by described shade amplification coefficient for described quotient being obtained to the described quotient that subelement obtains, and obtains the length of the shade that described image is corresponding.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
By obtaining the light trend of current external light source with respect to display screen, according to the image of light trend and shade to be added, determine the shade corresponding with this image, for adding definite shade, this image shows; Solve in prior art due to directly as image adds pre-set shade, thereby the shade of image can not be changed in the process of use, the problem that the sense of reality is not strong; Owing to can determining according to current external light source the shade of image, therefore make the shade of image to change according to external light source, reached can strengthen image shade real-time change, improved the effect of the sense of reality of image shade.
Brief description of the drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the method flow diagram of the image shade adding method that provides of one embodiment of the invention;
Fig. 2 A is the method flow diagram of the image shade adding method that provides of another embodiment of the present invention;
Fig. 2 B be in the present invention part embodiment, provide according to the schematic diagram of the shade that in two dimensional image, the shape away from the edge of external light source produces;
Fig. 2 C be in another part embodiment of the present invention, provide according to the schematic diagram of the shade that in two dimensional image, the shape away from the edge of external light source produces;
Fig. 2 D is that the indicated direction of projection of moving towards on display screen according to light providing in part embodiment of the present invention is the schematic diagram that image adds shade;
Fig. 3 A is the method flow diagram of the image shade adding method that provides of another embodiment of the present invention;
Fig. 3 B is the schematic diagram of the photo-sensitive cell that is arranged into 3*3 that provides in part embodiment of the present invention;
Fig. 4 is the structural representation of the image shade adding set that provides of one embodiment of the invention;
Fig. 5 is the structural representation of the image shade adding set that provides of another embodiment of the present invention;
Fig. 6 is the structural representation of the image shade adding set that provides of another embodiment of the present invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Shown in Figure 1, it shows the method flow diagram of the image shade adding method that one embodiment of the invention provides, and this image shade adding method is mainly illustrated to be applied in the electronic equipment that includes display screen.Here the electronic equipment said can be for being smart mobile phone, panel computer, intelligent television, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert compression standard audio frequency aspect 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert compression standard audio frequency aspect 4) player, pocket computer on knee, desk-top computer, smart camera and intelligent camera etc.This image shade adding method can comprise:
Step 101, obtains the image of shade to be added;
Step 102, obtains the light trend of current external light source with respect to display screen;
This display screen is the display screen of electronic equipment.
Step 103, according to the image of light trend and shade to be added, determines the shade corresponding with image;
Step 104, shows for this image adds shade.
In sum, the image shade adding method that the embodiment of the present invention provides, by obtaining the light trend of current external light source with respect to display screen, according to the image of light trend and shade to be added, determine the shade corresponding with this image, show for this image adds definite shade; Solve in prior art due to directly as image adds pre-set shade, thereby the shade of image can not be changed in the process of use, the problem that the sense of reality is not strong; Owing to can determining according to current external light source the shade of image, therefore make the shade of image to change according to external light source, reached can strengthen image shade real-time change, improved the effect of the sense of reality of image shade.
Refer to shown in Fig. 2 A, it shows the method flow diagram of the image shade adding method that another embodiment of the present invention provides, and this image shade adding method is mainly illustrated to be applied in the electronic equipment that includes display screen.Here the electronic equipment said can be for being smart mobile phone, panel computer, intelligent television, E-book reader, MP3 player, MP4 player, pocket computer on knee, desk-top computer, smart camera and intelligent camera etc.This image shade adding method can comprise:
Step 201, obtains the image of shade to be added;
Electronic equipment in use, can show various images on the display screen of electronic equipment, such as image of icon, cursor or other types etc.
Can from the image of these demonstrations, obtain as requested the image of shade to be added.
In actual applications, in the time obtaining the image of shade to be added, electronic equipment can be according to the image of the shade to be added showing in predetermined Requirement Acquisition display screen.
By way of example, if need to add shade to the who object in game, now electronic equipment is opened this game, on corresponding display screen, may show who object and background image simultaneously, the corresponding image of these who object showing can be defined as requested to the image of shade to be added.
Again by way of example, if need to add shade to all images that show, obtain all images of current demonstration on display screen, and these images are defined as to the image of shade to be added.
Step 202, obtains the residing geographic position of electronic equipment, and record obtains obtaining the moment of geographic position;
In electronic equipment, can be provided with steady arm, such as based on GPS (Global Positioning System, GPS) or the steady arm of Beidou satellite navigation system (BeiDou Navigation Satellite System) etc., then obtain the residing geographic position of electronic equipment according to this steady arm.Generally, longitude and latitude that the geographic position obtaining according to steady arm can be positioned at the earth according to electronic equipment represent.
In the time getting the residing geographic position of electronic equipment, can also record and obtain obtaining the moment of this geographic position simultaneously.
Step 203, according to geographic position and obtain the moment, determines the ray that points to the central point of display screen from solar source;
Due to the relative angle in geographic position, solar source and geographic position and obtain the moment and have fixed relationship, therefore can and obtain the moment according to geographic position, determine the ray that points to the central point of display screen from solar source.
This ray points to the central point of display screen of electronic equipment from solar source, and and display screen between shape in an angle.
Step 204 is the light trend of solar source with respect to display screen by the orientation determination of ray;
Step 205, in the time that the image showing on display screen is two dimensional image, the edge according to image away from external light source, determines the shade corresponding with edge shape, shade has predetermined length;
For two dimensional image, the length of shade that can two dimensional image is set to identical, is set to predetermined length.The predetermined length that the shade at the edge said here has refers to when this shade is tiled and the relative distance of corresponding edge.
In two dimensional image, because the shape away from the edge of external light source in two dimensional image can determine the shape of shade, therefore can be according to image the edge away from external light source, determine the shade corresponding with edge shape.
Such as, when in two dimensional image away from the edge of external light source be shaped as straight-line segment time, the shape of corresponding shade is also identical with the shape of this straight-line segment; For another example, when in two dimensional image away from the edge of external light source be shaped as irregular lines time, the shape of corresponding shade is also identical with the shape of these irregular lines.
Refer to shown in Fig. 2 B, its show in the present invention part embodiment, provide according to the schematic diagram of the shade that in two dimensional image, the shape away from the edge of external light source produces.In Fig. 2 B, in two dimensional image b, be straight-line segment away from the edge b2 of external light source, the shape of the corresponding shade b4 producing is also the straight-line segment isometric with the straight-line segment of edge b2, and the predetermined length that this shade b4 has is b6.
Refer to shown in Fig. 2 C, its show in another part embodiment of the present invention, provide according to the schematic diagram of the shade that in two dimensional image, the shape away from the edge of external light source produces.In Fig. 2 C, in two dimensional image c, be irregular wave line away from the edge c2 of external light source, the shape of the corresponding shade c4 producing is also the irregular wave line isometric with the irregular wave line of edge c2, and the predetermined length that this shade c4 has is c6.
Step 206, determines that light moves towards the indicated direction of projection on display screen, adds shade and shows at this edge according to this direction;
Because this direction is to determine that light moves towards the indicated direction of projection on display screen, the shade therefore adding on the edge away from light source in two dimensional image according to this direction can be in this two dimensional image region in addition.
Refer to shown in Fig. 2 D, indicated direction of projection of moving towards on display screen according to light providing in part embodiment of the present invention is provided for it is the schematic diagram that image adds shade.In Fig. 2 D, the screen center of solar source d2 and electronic equipment has determined that light moves towards d4, this light moves towards d4 and be projected as ray d6 on display screen, the direction of this ray d6 is label orientation d8 in figure, because solar source d2 is positioned at the upper right side of electronic equipment, therefore in two dimensional image, the edge d10 of lower left is the edge away from solar source, now adds shade d12 and shows at this edge d10 according to direction d8.
Step 207, in the time that the image showing on display screen is 3-D view, determines the angle between light trend and display screen;
Because 3-D view has respective heights, this highly can determine the length of shade, and the height of 3-D view determines the relative distance of shade when by tiling and between 3-D view.Therefore, adding when shade and some difference of two dimensional image for 3-D view.
In the time determining the shade that will add for 3-D view, need to be according to the length of the definite shade such as angle and the shade amplification coefficient of setting between the height of 3-D view, light trend and display screen.
Because light trend is the ray of external light source to the center of the display screen of electronic equipment, therefore can determine the angle between light trend and this display screen.
Step 208, according to the shade amplification coefficient of the height of the image of the tangent value of this angle, shade to be added and setting, calculates the length of the shade corresponding with image;
In actual applications, electronic equipment is moving towards the tangent value of the angle between display screen, the height of image and the shade amplification coefficient of setting of shade to be added according to light, while calculating the length of the shade corresponding with image, can comprise:
The first, the tangent value by the height of the image of shade to be added divided by angle, obtains quotient;
The second, quotient is multiplied by shade amplification coefficient, obtain the length of the shade that image is corresponding.
Hence one can see that, and the length of shade is at least to move towards angle between display screen and the height of 3-D view decides by light.
As adjusted the effect of shade, can utilize amplification coefficient to zoom in or out the shade length obtaining.This amplification coefficient can be set according to hatching effect, and this amplification coefficient is to be greater than 0 numerical value.When amplification coefficient is to be greater than 0 while being less than 1 numerical value, the shade obtaining according to the height of 3-D view is dwindled; When amplification coefficient is, while being greater than 1 numerical value, the shade obtaining according to the height of 3-D view to be amplified.
Step 209, determines that light moves towards the indicated direction of projection on display screen, is that image interpolation has the shade of this length and shows according to direction.
In sum, the image shade adding method that the embodiment of the present invention provides, by obtaining the light trend of current external light source with respect to display screen, according to the image of light trend and shade to be added, determine the shade corresponding with this image, show for this image adds definite shade; Solve in prior art due to directly as image adds pre-set shade, thereby the shade of image can not be changed in the process of use, the problem that the sense of reality is not strong; Owing to can determining according to current external light source the shade of image, therefore make the shade of image to change according to external light source, reached can strengthen image shade real-time change, improved the effect of the sense of reality of image shade.
Refer to shown in Fig. 3 A, it shows the method flow diagram of the image shade adding method that another embodiment of the present invention provides, and this image shade adding method is mainly illustrated to be applied in the electronic equipment that includes display screen.Here the electronic equipment said can be for being smart mobile phone, panel computer, intelligent television, E-book reader, MP3 player, MP4 player, pocket computer on knee, desk-top computer, smart camera and intelligent camera etc.This image shade adding method can comprise:
Step 301, obtains the image of shade to be added;
Step 301 is similar with step 201, just repeats no more here.
Step 302, for each photo-sensitive cell, the light intensity that definite external light source sensing produces on photo-sensitive cell;
In the time that indoor light source exerts an influence to the shade of image, can be according to the photo-sensitive cell in electronic equipment the shade of the image to shade to be added determine and add.Optionally, can be placed with the photo-sensitive cell of the capable * n row of n in electronic equipment, these photo-sensitive cells are positioned at same plane, and the plane parallel at the display screen place of this plane and electronic equipment.
Step 303, the light intensity sensing according to each photo-sensitive cell, determines that the light of external light source moves towards;
In a kind of possible implementation, when there being n*n photo-sensitive cell in electronic equipment, and when these photo-sensitive cells are arranged with the arrangement mode of the capable * n row of n, can select n photo-sensitive cell of sensed light intensity maximum, in the position of n*n photo-sensitive cell, determine the light trend of external light source according to this n photo-sensitive cell.
Taking 9 photo-sensitive cells being arranged into 3*3 as example, refer to shown in Fig. 3 B, schematic diagram of the photo-sensitive cell that is arranged into 3*3 providing in part embodiment of the present invention is provided for it.Refer to shown in Fig. 3 B, left side first row in photo-sensitive cell in electronic equipment (is photo-sensitive cell 1, 4, 7) light intensity that three photo-sensitive cells sense is the strongest, secondary series in photo-sensitive cell from the left side (is the photo-sensitive cell 2 of middle column, 5, 8) light intensity that three photo-sensitive cells sense takes second place, the 3rd row (photo-sensitive cell 3 of right column in photo-sensitive cell from the left side, 6, 9) light intensity that three photo-sensitive cells sense is the most weak, can determine thus: external light source is irradiated to the display screen of electronic equipment from the left side, light now moves towards from left to right.
Optionally, photo-sensitive cell in electronic equipment can also be other quantity, these photo-sensitive cells can also be arranged by all the other arrangement forms, as long as the light intensity that this arrangement form can sense according to photo-sensitive cell and pre-defined algorithm are determined light trend.
Step 304, in the time that the image showing on display screen is two dimensional image, the edge according to image away from external light source, determines the shade corresponding with edge shape, shade has predetermined length;
Step 305, determines that light moves towards the indicated direction of projection on display screen, adds shade and show according to direction at edge;
Step 306, in the time that the image showing on display screen is 3-D view, determines the angle between light trend and display screen;
Step 307, according to the shade amplification coefficient of the height of the image of the tangent value of this angle, shade to be added and setting, calculates the length of the shade corresponding with image;
According to the tangent value of the angle between light trend and display screen, the height of image and the shade amplification coefficient of setting of shade to be added, calculate the length of the shade corresponding with image, comprising:
The first, the tangent value by the height of the image of shade to be added divided by angle, obtains quotient;
The second, quotient is multiplied by shade amplification coefficient, obtain the length of the shade that image is corresponding.
Step 308, determines that light moves towards the indicated direction of projection on display screen, is that image interpolation has the shade of this length and shows according to direction.
Because step 304 is similar to step 209 to step 308 and step 205, therefore just repeat no more.
In sum, the image shade adding method that the embodiment of the present invention provides, by obtaining the light trend of current external light source with respect to display screen, according to the image of light trend and shade to be added, determine the shade corresponding with this image, show for this image adds definite shade; Solve in prior art due to directly as image adds pre-set shade, thereby the shade of image can not be changed in the process of use, the problem that the sense of reality is not strong; Owing to can determining according to current external light source the shade of image, therefore make the shade of image to change according to external light source, reached can strengthen image shade real-time change, improved the effect of the sense of reality of image shade.
Shown in Figure 4, it shows the structural representation of the image shade adding set that one embodiment of the invention provides, and this image shade adding set is mainly illustrated to be applied in the electronic equipment that includes display screen.Here the electronic equipment said can be for being smart mobile phone, panel computer, intelligent television, E-book reader, MP3 player, MP4 player, pocket computer on knee, desk-top computer, smart camera and intelligent camera etc.This image shade adding set can comprise: image collection module 402, move towards acquisition module 404, shade determination module 406 and shade adds module 408.
Image collection module 402, can be for obtaining the image of shade to be added;
Move towards acquisition module 404, can be for obtaining the light trend of current external light source with respect to display screen;
Shade determination module 406, can, for according to the image that moves towards the shade to be added that light trend that acquisition module 404 gets and image collection module get, determine the shade corresponding with image;
Shade adds module 408, can be used to image to add shade determination module 406 definite shades and show.
In sum, the image shade adding set that the embodiment of the present invention provides, by obtaining the light trend of current external light source with respect to display screen, according to the image of light trend and shade to be added, determine the shade corresponding with this image, show for this image adds definite shade; Solve in prior art due to directly as image adds pre-set shade, thereby the shade of image can not be changed in the process of use, the problem that the sense of reality is not strong; Owing to can determining according to current external light source the shade of image, therefore make the shade of image to change according to external light source, reached can strengthen image shade real-time change, improved the effect of the sense of reality of image shade.
Shown in Figure 5, it shows the structural representation of the image shade adding set that another embodiment of the present invention provides, and this image shade adding set is mainly illustrated to be applied in the electronic equipment that includes display screen.Here the electronic equipment said can be for being smart mobile phone, panel computer, intelligent television, E-book reader, MP3 player, MP4 player, pocket computer on knee, desk-top computer, smart camera and intelligent camera etc.This image shade adding set can comprise: image collection module 502, move towards acquisition module 504, shade determination module 506 and shade adds module 508.
Image collection module 502, can be for obtaining the image of shade to be added;
Move towards acquisition module 504, can be for obtaining the light trend of current external light source with respect to display screen;
Shade determination module 506, can, for according to the image that moves towards the shade to be added that light trend that acquisition module 504 gets and image collection module get, determine the shade corresponding with image;
Shade adds module 508, can be used to image to add shade determination module 506 definite shades and show.
Suppose that above-mentioned is the possible embodiment of the first, in the possible embodiment of the first embodiment possible as the second basic and that provide, external light source is solar source, and moving towards acquisition module 504 can comprise: geographic position acquiring unit 504a, ray determining unit 504b and first move towards determining unit 504c.
Geographic position acquiring unit 504a, can be for obtaining the residing geographic position of electronic equipment, and record obtains obtaining the moment of geographic position;
Ray determining unit 504b, can manage the geographic position that position acquisition unit 504a obtains and obtain the moment for base area, determines the ray that points to the central point of display screen from solar source;
First moves towards determining unit 504c, can be for by the orientation determination of ray definite ray determining unit 504b being the light trend of solar source with respect to display screen.
In the third the possible embodiment providing as basis at the possible embodiment of the second, in the time that the image showing on display screen is two dimensional image, shade determination module 506 can comprise: shade determining unit 506a.
Shade determining unit 506a, can, for the edge away from external light source according to image, determine the shade corresponding with edge shape, and shade has predetermined length;
Shade adds module 508 and can comprise: the first adding device 508a.
The first adding device 508a, can, for determining that light moves towards the indicated direction of projection on display screen, add shade and show at edge according to direction.
In the 4th kind of possible embodiment providing as basis at the third possible embodiment, in the time that the image showing on display screen is 3-D view, shade determination module 506 can also comprise: angle determining unit 506b and shade length determining unit 506c.
Angle determining unit 506b, can be for determining the angle between light trend and display screen;
Shade length determining unit 506c, can, for according to the shade amplification coefficient of the height of the image of the tangent value of angle, shade to be added and setting, calculate the length of the shade corresponding with image;
Shade adds module 508 and can also comprise: the second adding device 508b.
The second adding device 508b can, for determining that light moves towards the indicated direction of projection on display screen, be that image interpolation has the shade of length and shows according to direction.
In the 5th kind of possible embodiment providing as basis at the 4th kind of possible embodiment, shade length determining unit 506c, comprising: quotient obtains subelement 506c1 and shade length is obtained subelement 506c2.
Quotient obtains subelement 506c1, can, for the tangent value divided by angle by the height of the image of shade to be added, obtain quotient;
Shade length is obtained subelement 506c2, can be multiplied by shade amplification coefficient for quotient being obtained to the quotient that subelement obtains, and obtains the length of the shade that image is corresponding.
In sum, the image shade adding set that the embodiment of the present invention provides, by obtaining the light trend of current external light source with respect to display screen, according to the image of light trend and shade to be added, determine the shade corresponding with this image, show for this image adds definite shade; Solve in prior art due to directly as image adds pre-set shade, thereby the shade of image can not be changed in the process of use, the problem that the sense of reality is not strong; Owing to can determining according to current external light source the shade of image, therefore make the shade of image to change according to external light source, reached can strengthen image shade real-time change, improved the effect of the sense of reality of image shade.
Shown in Figure 6, it shows the structural representation of the image shade adding set that another embodiment of the present invention provides, and this image shade adding set is mainly illustrated to be applied in the electronic equipment that includes display screen.Here the electronic equipment said can be for being smart mobile phone, panel computer, intelligent television, E-book reader, MP3 player, MP4 player, pocket computer on knee, desk-top computer, smart camera and intelligent camera etc.This image shade adding set can comprise: image collection module 602, move towards acquisition module 604, shade determination module 606 and shade adds module 608.
Image collection module 602, can be for obtaining the image of shade to be added;
Move towards acquisition module 604, can be for obtaining the light trend of current external light source with respect to display screen;
Shade determination module 606, can, for according to the image that moves towards the shade to be added that light trend that acquisition module 604 gets and image collection module get, determine the shade corresponding with image;
Shade adds module 608, can be used to image to add shade determination module 606 definite shades and show.
Suppose that above-mentioned is the possible embodiment of the first, in the possible embodiment of the first embodiment possible as the second basic and that provide, electronic equipment also comprises the photo-sensitive cell of arranging as the capable * n row of n, move towards acquisition module 604, comprising: light intensity determining unit 604a and second moves towards determining unit 604b.
Light intensity determining unit 604a, can be for for each photo-sensitive cell, determines the light intensity that the external light source that senses produces on photo-sensitive cell;
Second moves towards determining unit 604b, can be for the light intensity sensing according to each photo-sensitive cell, determine the light trend of external light source.
In the third the possible embodiment providing as basis at the possible embodiment of the second, in the time that the image showing on display screen is two dimensional image, shade determination module 606 can comprise: shade determining unit 606a.
Shade determining unit 606a, can, for the edge away from external light source according to image, determine the shade corresponding with edge shape, and shade has predetermined length;
Shade adds module 608 and can comprise: the first adding device 608a.
The first adding device 608a, can, for determining that light moves towards the indicated direction of projection on display screen, add shade and show at edge according to direction.
In the 4th kind of possible embodiment providing as basis at the third possible embodiment, in the time that the image showing on display screen is 3-D view, shade determination module 606 can also comprise: angle determining unit 606b and shade length determining unit 606c.
Angle determining unit 606b, can be for determining the angle between light trend and display screen;
Shade length determining unit 606c, can, for according to the shade amplification coefficient of the height of the image of the tangent value of angle, shade to be added and setting, calculate the length of the shade corresponding with image;
Shade adds module 608 and can also comprise: the second adding device 608b.
The second adding device 608b can, for determining that light moves towards the indicated direction of projection on display screen, be that image interpolation has the shade of length and shows according to direction.
In the 5th kind of possible embodiment providing as basis at the 4th kind of possible embodiment, shade length determining unit 606c can comprise: quotient obtains subelement 606c1 and shade length is obtained subelement 606c2.
Quotient obtains subelement 606c1, can, for the tangent value divided by angle by the height of the image of shade to be added, obtain quotient;
Shade length is obtained subelement 606c2, can be multiplied by shade amplification coefficient for quotient being obtained to the quotient that subelement obtains, and obtains the length of the shade that image is corresponding.
In sum, the image shade adding set that the embodiment of the present invention provides, by obtaining the light trend of current external light source with respect to display screen, according to the image of light trend and shade to be added, determine the shade corresponding with this image, show for this image adds definite shade; Solve in prior art due to directly as image adds pre-set shade, thereby the shade of image can not be changed in the process of use, the problem that the sense of reality is not strong; Owing to can determining according to current external light source the shade of image, therefore make the shade of image to change according to external light source, reached can strengthen image shade real-time change, improved the effect of the sense of reality of image shade.
It should be noted that: the image shade adding set that above-described embodiment provides is in the time adding shade to image, only be illustrated with the division of above-mentioned each functional module, in practical application, can above-mentioned functions be distributed and completed by different functional modules as required, be divided into different functional modules by the inner structure of electronic equipment, to complete all or part of function described above.In addition, the image shade adding set that above-described embodiment provides and image shade adding method embodiment belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can carry out the hardware that instruction is relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any amendment of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (12)

1. an image shade adding method, is applied in the electronic equipment that includes display screen, it is characterized in that, described method comprises:
Obtain the image of shade to be added;
Obtain the light trend of current external light source with respect to described display screen;
According to the image of described light trend and described shade to be added, determine the shade corresponding with described image;
For adding described shade, described image shows.
2. method according to claim 1, is characterized in that, described external light source is solar source, described in obtain the light trend of current external light source with respect to described display screen, comprising:
Obtain the residing geographic position of described electronic equipment, record obtains obtaining the moment of described geographic position;
According to described geographic position and described in obtain the moment, determine from described solar source and point to the ray of the central point of described display screen;
Be the light trend of described solar source with respect to described display screen by the orientation determination of described ray.
3. method according to claim 1, is characterized in that, described electronic equipment also comprises the photo-sensitive cell of arranging as the capable * n of n row, described in obtain the light trend of current external light source with respect to described display screen, comprising:
For each photo-sensitive cell, the light intensity that definite external light source sensing produces on described photo-sensitive cell;
The described light intensity sensing according to each photo-sensitive cell, determines that the light of described external light source moves towards.
4. according to the method in claim 2 or 3, it is characterized in that, in the time that the image showing on described display screen is two dimensional image, described according to the image of described light trend and described shade to be added, definite shade corresponding with described image, comprising:
Edge according to described image away from described external light source, determines the shade corresponding with described edge shape, and described shade has predetermined length;
Described for described image adds described shade and shows, comprising:
Determine that described light moves towards the indicated direction of projection on described display screen, adds described shade and shows at described edge according to described direction.
5. according to the method in claim 2 or 3, it is characterized in that, in the time that the image showing on described display screen is 3-D view, described according to the image of described light trend and described shade to be added, definite shade corresponding with described image, comprising:
Determine the angle between described light trend and described display screen;
According to the shade amplification coefficient of the height of the image of the tangent value of described angle, described shade to be added and setting, calculate the length of the shade corresponding with described image;
Described for described image adds described shade and shows, comprising:
Determining that described light moves towards the indicated direction of projection on described display screen, is that described image interpolation has the described shade of described length and shows according to described direction.
6. method according to claim 5, is characterized in that, described according to the shade amplification coefficient of the height of the image of the tangent value of described angle, described shade to be added and setting, calculates the length of the shade corresponding with described image, comprising:
Tangent value by the height of the image of described shade to be added divided by described angle, obtains quotient;
Described quotient is multiplied by described shade amplification coefficient, obtains the length of the shade that described image is corresponding.
7. an image shade adding set, is applied in the electronic equipment that includes display screen, it is characterized in that, described device comprises:
Image collection module, for obtaining the image of shade to be added;
Move towards acquisition module, for obtaining the light trend of current external light source with respect to described display screen;
Shade determination module, for according to the described image that moves towards the described shade to be added that described light trend that acquisition module gets and described image collection module get, determines the shade corresponding with described image;
Shade adds module, is used to described image to add the definite described shade of described shade determination module and shows.
8. device according to claim 7, is characterized in that, described external light source is solar source, and the described acquisition module that moves towards, comprising:
Geographic position acquiring unit, for obtaining the residing geographic position of described electronic equipment, record obtains obtaining the moment of described geographic position;
Ray determining unit, for the described geographic position that obtains according to geographical position acquisition unit and described in obtain the moment, determine the ray that points to the central point of described display screen from described solar source;
First moves towards determining unit, for by the orientation determination of described ray definite described ray determining unit being the light trend of described solar source with respect to described display screen.
9. device according to claim 7, is characterized in that, described electronic equipment also comprises the photo-sensitive cell of arranging as the capable * n row of n, and the described acquisition module that moves towards, comprising:
Light intensity determining unit, for for each photo-sensitive cell, determines the light intensity that the external light source that senses produces on described photo-sensitive cell;
Second moves towards determining unit, for the described light intensity sensing according to each photo-sensitive cell, determines the light trend of described external light source.
10. device according to claim 8 or claim 9, is characterized in that, in the time that the image showing on described display screen is two dimensional image, described shade determination module, comprising:
Shade determining unit, for the edge away from described external light source according to described image, determines the shade corresponding with described edge shape, and described shade has predetermined length;
Described shade adds module, comprising:
The first adding device, for determining that described light moves towards the indicated direction of projection on described display screen, adds described shade and shows at described edge according to described direction.
11. devices according to claim 8 or claim 9, is characterized in that, in the time that the image showing on described display screen is 3-D view, described shade determination module, comprising:
Angle determining unit, for determining the angle between described light trend and described display screen;
Shade length determining unit, for according to the shade amplification coefficient of the height of the image of the tangent value of described angle, described shade to be added and setting, calculates the length of the shade corresponding with described image;
Described shade adds module, comprising:
The second adding device, for determining that described light moves towards the indicated direction of projection on described display screen, is that described image interpolation has the described shade of described length and shows according to described direction.
12. devices according to claim 11, is characterized in that, described shade length determining unit, comprising:
Quotient obtains subelement, for the tangent value divided by described angle by the height of the image of described shade to be added, obtains quotient;
Shade length is obtained subelement, is multiplied by described shade amplification coefficient for described quotient being obtained to the described quotient that subelement obtains, and obtains the length of the shade that described image is corresponding.
CN201410284089.9A 2014-06-23 2014-06-23 Image shadow adding method and device Pending CN104123743A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410284089.9A CN104123743A (en) 2014-06-23 2014-06-23 Image shadow adding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410284089.9A CN104123743A (en) 2014-06-23 2014-06-23 Image shadow adding method and device

Publications (1)

Publication Number Publication Date
CN104123743A true CN104123743A (en) 2014-10-29

Family

ID=51769140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410284089.9A Pending CN104123743A (en) 2014-06-23 2014-06-23 Image shadow adding method and device

Country Status (1)

Country Link
CN (1) CN104123743A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104933746A (en) * 2015-05-21 2015-09-23 广东欧珀移动通信有限公司 Method and device for setting dynamic shadow for plane image
CN106408647A (en) * 2016-09-20 2017-02-15 广州视睿电子科技有限公司 Image shading adding method and device
CN107818548A (en) * 2017-10-27 2018-03-20 上海京颐科技股份有限公司 A kind of image processing method, device, equipment and computer-readable medium
CN107993278A (en) * 2016-10-26 2018-05-04 三星电子株式会社 The method of display device and display content
CN108062752A (en) * 2017-12-13 2018-05-22 网易(杭州)网络有限公司 Judge method, medium, device and the computing device in the orientation of main light source
CN108320320A (en) * 2018-01-25 2018-07-24 重庆爱奇艺智能科技有限公司 A kind of method for information display, device and equipment
CN109300186A (en) * 2018-09-28 2019-02-01 Oppo广东移动通信有限公司 Image processing method and device, storage medium, electronic equipment
CN109447925A (en) * 2018-09-28 2019-03-08 Oppo广东移动通信有限公司 Image processing method and device, storage medium, electronic equipment
WO2020019133A1 (en) * 2018-07-23 2020-01-30 太平洋未来科技(深圳)有限公司 Method and device for determining shadow effect and electronic device
CN114584652A (en) * 2020-11-28 2022-06-03 华为技术有限公司 User graphical interface display method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080211813A1 (en) * 2004-10-13 2008-09-04 Siemens Aktiengesellschaft Device and Method for Light and Shade Simulation in an Augmented-Reality System
CN101510913A (en) * 2009-03-17 2009-08-19 山东师范大学 System and method for implementing intelligent mobile phone enhancement based on three-dimensional electronic compass
US20090216446A1 (en) * 2008-01-22 2009-08-27 Maran Ma Systems, apparatus and methods for delivery of location-oriented information
US20100066750A1 (en) * 2008-09-16 2010-03-18 Motorola, Inc. Mobile virtual and augmented reality system
US20120133790A1 (en) * 2010-11-29 2012-05-31 Google Inc. Mobile device image feedback
CN102696057A (en) * 2010-03-25 2012-09-26 比兹摩德莱恩有限公司 Augmented reality systems

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080211813A1 (en) * 2004-10-13 2008-09-04 Siemens Aktiengesellschaft Device and Method for Light and Shade Simulation in an Augmented-Reality System
US20090216446A1 (en) * 2008-01-22 2009-08-27 Maran Ma Systems, apparatus and methods for delivery of location-oriented information
US20100066750A1 (en) * 2008-09-16 2010-03-18 Motorola, Inc. Mobile virtual and augmented reality system
CN101510913A (en) * 2009-03-17 2009-08-19 山东师范大学 System and method for implementing intelligent mobile phone enhancement based on three-dimensional electronic compass
CN102696057A (en) * 2010-03-25 2012-09-26 比兹摩德莱恩有限公司 Augmented reality systems
US20120133790A1 (en) * 2010-11-29 2012-05-31 Google Inc. Mobile device image feedback

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104933746A (en) * 2015-05-21 2015-09-23 广东欧珀移动通信有限公司 Method and device for setting dynamic shadow for plane image
CN104933746B (en) * 2015-05-21 2018-03-23 广东欧珀移动通信有限公司 A kind of method and device that dynamic shadow is set for plane picture
CN106408647A (en) * 2016-09-20 2017-02-15 广州视睿电子科技有限公司 Image shading adding method and device
CN106408647B (en) * 2016-09-20 2019-03-05 广州视睿电子科技有限公司 A kind of image shade adding method and device
CN107993278A (en) * 2016-10-26 2018-05-04 三星电子株式会社 The method of display device and display content
CN107993278B (en) * 2016-10-26 2023-08-08 三星电子株式会社 Display device and method of displaying content
CN107818548A (en) * 2017-10-27 2018-03-20 上海京颐科技股份有限公司 A kind of image processing method, device, equipment and computer-readable medium
CN108062752A (en) * 2017-12-13 2018-05-22 网易(杭州)网络有限公司 Judge method, medium, device and the computing device in the orientation of main light source
CN108062752B (en) * 2017-12-13 2023-07-25 杭州易现先进科技有限公司 Method, medium, device and computing equipment for judging azimuth of main light source
CN108320320B (en) * 2018-01-25 2021-04-20 重庆爱奇艺智能科技有限公司 Information display method, device and equipment
CN108320320A (en) * 2018-01-25 2018-07-24 重庆爱奇艺智能科技有限公司 A kind of method for information display, device and equipment
WO2020019133A1 (en) * 2018-07-23 2020-01-30 太平洋未来科技(深圳)有限公司 Method and device for determining shadow effect and electronic device
CN109447925A (en) * 2018-09-28 2019-03-08 Oppo广东移动通信有限公司 Image processing method and device, storage medium, electronic equipment
CN109447925B (en) * 2018-09-28 2021-07-09 Oppo广东移动通信有限公司 Image processing method and device, storage medium and electronic equipment
CN109300186B (en) * 2018-09-28 2023-03-31 Oppo广东移动通信有限公司 Image processing method and device, storage medium and electronic equipment
CN109300186A (en) * 2018-09-28 2019-02-01 Oppo广东移动通信有限公司 Image processing method and device, storage medium, electronic equipment
CN114584652A (en) * 2020-11-28 2022-06-03 华为技术有限公司 User graphical interface display method and device
CN114584652B (en) * 2020-11-28 2023-06-20 华为技术有限公司 User graphical interface display method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN104123743A (en) Image shadow adding method and device
CN103455480B (en) A kind of position search method based on electronic chart and device
CN108267154B (en) Map display method and device
CN105378433B (en) Method and apparatus for adaptively showing location-based digital information
CN103268621B (en) A kind of house realistic picture generates method and apparatus
CN107545057A (en) Show method, apparatus, equipment and the storage medium of mind map
CN104183016A (en) Method for rapidly constructing 2.5-dimensional building model
CN106020655A (en) Method and device for switching interface screen and electronic equipment
US9164651B2 (en) Management of geographic data layers in a geographic information system
BRPI0714106A2 (en) method for evaluating an image for a dominant line, and method for determining the movement of an image in a presentation
CN106598428A (en) Method and system for playing panoramic video, and terminal equipment
CN103177649A (en) Method and device for converging pixel coordinates
CN114648615B (en) Method, device and equipment for controlling interactive reproduction of target object and storage medium
CN104050709A (en) 3D image processing method and electronic device
CN107656961A (en) A kind of method for information display and device
CN104142776A (en) Icon processing method and device
CN105573485A (en) Display content adjustment method and terminal
CN106611441A (en) Processing method and device for three-dimensional map
CN204695673U (en) A kind of for the three-dimensional digital sand table in urban planning and construction
CN108846901A (en) Model introduction method and device
CN109146775A (en) Two-dimension picture conversion method, device, equipment and storage medium
CN117292079A (en) Multi-dimensional scene coordinate point position conversion and mapping method applied to digital twin
CN111127661B (en) Data processing method and device and electronic equipment
CN104346771B (en) A kind of electronic map tiered management approach
CN104346046A (en) Three-dimensional simulation page turning method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20141029