WO2020019134A1 - Illumination information optimization method and apparatus, and electronic device - Google Patents

Illumination information optimization method and apparatus, and electronic device Download PDF

Info

Publication number
WO2020019134A1
WO2020019134A1 PCT/CN2018/096694 CN2018096694W WO2020019134A1 WO 2020019134 A1 WO2020019134 A1 WO 2020019134A1 CN 2018096694 W CN2018096694 W CN 2018096694W WO 2020019134 A1 WO2020019134 A1 WO 2020019134A1
Authority
WO
WIPO (PCT)
Prior art keywords
sub
picture
light intensity
pictures
illumination
Prior art date
Application number
PCT/CN2018/096694
Other languages
French (fr)
Chinese (zh)
Inventor
菲永奥利维尔
李建亿
Original Assignee
太平洋未来科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 太平洋未来科技(深圳)有限公司 filed Critical 太平洋未来科技(深圳)有限公司
Priority to PCT/CN2018/096694 priority Critical patent/WO2020019134A1/en
Priority to CN201810914867.6A priority patent/CN108965535B/en
Publication of WO2020019134A1 publication Critical patent/WO2020019134A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/026Details of the structure or mounting of specific components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/0279Improving the user comfort or ergonomics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/04Supports for telephone transmitters or receivers

Definitions

  • the present invention relates to the field of image processing technology, and in particular, to a method, an apparatus, and an electronic device for optimizing illumination information.
  • Augmented Reality (AR) technology can put the virtual world on the screen and interact with it. Users can perceive the existence of virtual objects by using AR devices.
  • AR Augmented Reality
  • the inventors found that in related technologies, it is generally necessary to obtain the environmental information, location, and time of a picture or video in advance, determine the lighting information corresponding to the picture or video through the above information, and then observe the virtual object Rendering of shadow effects.
  • the above method is not only inefficient, but also may cause deviations in the light and shadow effects of the virtual object from the scene due to the inability to accurately obtain the accurate lighting angle and light intensity in the picture or video.
  • the method, device, and electronic device for optimizing illumination information provided by the embodiments of the present invention are used to solve at least the foregoing problems in related technologies.
  • One aspect of the embodiments of the present invention provides a method for optimizing illumination information, including:
  • performing the grayscale processing on the sub-picture, and obtaining the light intensity of the sub-picture according to the gray-scale value of each point on the sub-picture includes: performing gray-scale processing on the sub-picture, so that Each point on the sub-picture retains only a gray value of 0-255; the gray values of the points on the sub-picture are input into a pre-trained light intensity model to obtain the light intensity of the sub-picture.
  • obtaining the light intensity value corresponding to the sub-picture includes: obtaining position coordinates of the sub-picture in the target picture; determining the position according to the position coordinates of the sub-picture and the size of the sub-picture The light intensity weight value corresponding to the sub-picture.
  • calculating the illumination angle of each of the sub-pictures to obtain the illumination angle corresponding to the target picture includes: determining whether the size of the sub-picture is smaller than a preset threshold; The vectors of the illumination angles of the sub-pictures are summed to obtain the illumination angle of the target picture.
  • calculating the lighting angle of each of the sub-pictures to obtain the lighting angle corresponding to the target picture includes: determining a lighting angle weight value corresponding to each of the sub-pictures; The vector of the illumination angle of each sub-picture is weighted and summed to calculate the illumination angle of the target picture.
  • Another aspect of the embodiments of the present invention provides an apparatus for optimizing illumination information, including:
  • An obtaining module is used to obtain a target picture and decompose the target picture into a first preset number of sub-pictures; wherein the sub-picture is composed of a second preset number of pixels; a determining module is used to obtain the sub-pictures A geometric center of the picture, determining a light intensity weighting center according to the image moment of the sub-picture, and determining an illumination angle of the sub-picture based on the light intensity weighting center and the geometric center of the sub-picture; a processing module for The sub-picture is subjected to gray-scale processing, and the light intensity of the sub-picture is obtained according to the gray value of each point on the sub-picture; a first calculation module is configured to obtain a light-intensity weight value corresponding to the sub-picture, and The light intensity of the sub-picture and the light intensity weight value corresponding to the sub-picture are used to obtain the light intensity of the target picture; a second calculation module is configured to calculate the light angle of the sub-pic
  • the processing module is specifically configured to perform grayscale processing on the sub-picture, so that each point on the sub-picture retains only a gray value of 0-255; and gray-scale each point on the sub-picture.
  • the degree value is input into a pre-trained light intensity model to obtain the light intensity of the sub-picture.
  • the first calculation module includes: an obtaining unit for obtaining position coordinates of the sub-picture in the target picture; and a determining unit for obtaining position coordinates of the sub-picture and a position of the sub-picture The size determines a light intensity weight value corresponding to the sub-picture.
  • the first calculation module further includes: a judging unit for judging whether the size of the sub-picture is smaller than a preset threshold; and a summing unit for judging the sub-pictures if the sub-picture is smaller than the preset threshold.
  • the vectors of the illumination angles are summed to obtain the illumination angle of the target picture.
  • the second calculation module is further configured to determine a lighting angle weight value corresponding to each of the sub-pictures; perform weighted summation on a vector of lighting angles of each of the sub-pictures according to the lighting angle weight value, and calculate Obtain the illumination angle of the target picture.
  • Another aspect of the embodiments of the present invention provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a memory that can be used by the at least one processor An executed instruction, where the instruction is executed by the at least one processor, so that the at least one processor can execute the foregoing optimization method of lighting information.
  • the electronic device is a mobile phone, and the obtaining of the target picture in the method for optimizing the illumination information is performed by the mobile phone.
  • the mobile phone includes a front panel with a display screen and a mobile phone back cover; a middle and lower part of the mobile phone back cover is provided with a recessed area, and a support plate adapted to the shape and size of the recessed area is installed in the recessed area; The upper end of the support plate is hinged with the recessed area, so that the support plate can be rotated to a predetermined angle with the back cover of the mobile phone; a lower end of the support plate is provided with a connecting piece, and one end of the connecting piece and The support plate is soft-connected, and the other end is provided with a plugging portion adapted to the shape and size of the mobile phone charging interface, and the plugging portion is mated with the mobile phone charging interface;
  • the support plate includes a first plate body, a second plate body, a first connection plate, a second connection plate, and a link, the first plate body, the first connection plate, the second connection plate, and the second The plates are sequentially connected to form a plate; the first plate has opposite first and second ends, the second plate has opposite third and fourth ends, and the link includes a first A rod body and a second rod body, opposite ends of the first rod body are hinged to the first end and the third end, respectively, and opposite ends of the second rod body are respectively connected to the second end and the fourth end End-to-phase hinge, wherein the first rod body and the second rod body are both disposed on a side of the support plate away from the front panel; the first connection plate and the second connection plate are located on the first Between the plate body and the second plate body, one side of the first connection plate is hinged to one side of the first plate body, and one side of the second connection plate is opposite to one side of the second plate body.
  • the other side of the first connection plate is hinged with the other side of the second connection plate, the first connection plate and the second connection plate
  • the first plate is provided on a side of the support plate close to the front plate; the first plate is provided with a first portion disposed along a thickness direction of the first plate, and the first portion is located at a hinge between the first plate and the link. And between the first plate body and the hinge of the first connecting plate; the second plate body is provided with a second portion provided along its thickness direction, and the second portion is located on the second plate
  • the first portion, the second portion, the first connecting plate, the second connecting plate, and the connecting rod form five Rod body mechanism.
  • the recessed area includes a bottom wall and a side wall, and the bottom wall and / or the side wall is provided with a ventilation structure, and the ventilation structure is a plurality of ventilation holes or ventilation grilles.
  • the connecting member is made of rubber.
  • each of the first end, the second end, the third end, and the fourth end is provided with a recessed portion, and opposite ends of the first rod body are respectively disposed in the recessed portion of the first end and the first end.
  • the opposite ends of the second rod body are respectively placed in the recessed portion of the third end and the recessed portion of the fourth end.
  • the method, device, and electronic device for optimizing illumination information provided by the embodiments of the present invention obtain the entire light intensity and angle of the sub-picture, and calculate the light intensity and angle of each sub-picture to obtain the entire The lighting information of the picture, and the rendering of the light and shadow effects on the virtual object according to this, so that the virtual object can match its scene environment.
  • the mobile phone with a support plate provided in the method for optimizing the lighting information provided by the embodiments of the present invention can make the mobile phone shoot and play more smoothly.
  • the mobile phone does not need a protective case and a sticking part, and has a more beautiful appearance, which improves the lighting.
  • the quality of the target picture in the information optimization method can be used separately from the above method.
  • FIG. 1 is a flowchart of a method for optimizing illumination information according to an embodiment of the present invention
  • FIG. 2 is a light intensity weighted center and a weighted center coordinate position map of a sub-picture provided by an embodiment of the present invention
  • step S104 is a specific flowchart of step S104 provided by an embodiment of the present invention.
  • FIG. 4 is a structural diagram of an apparatus for optimizing illumination information according to an embodiment of the present invention.
  • FIG. 5 is a structural diagram of an apparatus for optimizing illumination information according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a hardware structure of an electronic device that executes a method for optimizing illumination information provided by a method embodiment of the present invention
  • FIG. 7 is a schematic structural diagram of a mobile phone that obtains a target picture in a method for optimizing illumination information according to an embodiment of the present invention
  • FIG. 8 is an exploded view of a mobile phone support plate for obtaining a target picture in a method for optimizing illumination information according to an embodiment of the present invention
  • FIG. 9 is a schematic diagram of a mobile phone support plate in a supported state for obtaining a target picture in a method for optimizing illumination information according to an embodiment of the present invention.
  • FIG. 10 is an enlarged view of part A of FIG. 9;
  • FIG. 11 is an enlarged view of a portion B of FIG. 9;
  • FIG. 12 is a schematic diagram of a mobile phone support plate that obtains a target picture in a method for optimizing lighting information according to an embodiment of the present invention in a folded state.
  • FIG. 1 is a flowchart of a method for optimizing illumination information according to an embodiment of the present invention.
  • a method for optimizing illumination information provided by an embodiment of the present invention includes:
  • the lighting information includes lighting intensity and lighting angle.
  • the target picture is decomposed to calculate the lighting intensity and lighting angle of the target picture, respectively, to obtain the overall lighting information of the target picture.
  • the target picture may be a certain frame in the video or a single picture frame captured from the camera, which is not limited in the present invention.
  • the acquisition timing may be based on a user's operation instruction, or when the scene of the video meets a preset requirement or condition.
  • the target picture is decomposed into a first preset number of small square grid elements composed of a preset size, and each small square grid element is used as a sub-picture, where The sub-picture is composed of a second preset number of pixels.
  • the target picture can be decomposed into C columns and R rows (where C and R are integers, and C ⁇ 2, R ⁇ 2) to obtain multiple sub-pictures, each of which consists of p pixels.
  • the target picture can be extracted with grayscale, and the influence of the color on the light intensity acquisition can also be avoided.
  • S102 Obtain a geometric center of the sub-picture, determine a light intensity weighting center according to the image moment of the sub-picture, and determine an illumination angle of the sub-picture based on the light intensity weighting center and the geometric center of the sub-picture.
  • An image moment is a set of moments calculated from digital graphics. It usually describes the global features of the image and provides a lot of information about the different types of geometric features of the image, such as size, position, direction, and shape. For example: First-order moments are related to shape; second-order moments show the degree of expansion of a curve around a straight line average; third-order moments are a measure of the symmetry of the mean; second- and third-order moments can be used to derive a set of seven
  • Moment invariant and invariant moment are the statistical characteristics of the image, which meet the invariant invariance of translation, expansion and rotation.
  • geometric invariant moment can be used as an important feature to represent an object.
  • the above-mentioned first, second, third and third moments and the seven invariant moments derived from the second and third moments all have specific calculation formulas. According to these formulas, determining the light intensity weighting center belongs to common technical knowledge in the field. The present invention will not repeat them here.
  • the light intensity weighting center g is determined by the image moment, and its coordinate position in the sub-image is (x g , y g ).
  • Vector from geometric center c to weighted center g The direction of is the result of being affected by light, which provides us with a local light effect indication of the target picture location where the sub-picture is located.
  • vectors represents the direction of the light
  • d represents the modulus of the vector cg ⁇ represents the lighting angle of the sub-picture.
  • the sub-picture after determining the lighting angle of each sub-picture, it can be determined whether the lighting of the sub-picture comes from the ground according to the lighting angle vector of the sub-picture. If the lighting angle of the sub-picture comes from the ground , Indicating that the lighting does not belong to the current scene, the sub-picture is deleted.
  • the data sample set is composed of several pictures, and each picture carries the gray value of each pixel on the picture and the light intensity corresponding to the picture.
  • the gray value of each pixel on each picture is used as the input value of the model, and the output value of the model is compared with the corresponding light intensity of the picture to continuously optimize the model.
  • the gray value of each point on the sub-picture is input into a pre-trained light intensity model, and the light intensity model obtains the light intensity of the sub-picture by analyzing and processing the gray value of each point of the sub-picture. .
  • the light intensity weight value corresponding to the sub-picture can be obtained through the following sub-steps.
  • each sub-picture determine its coordinate position (x i , y i ) in the target picture, where i is the sequence number of the sub-picture in the target picture, for example, the first preset number of sub-pictures is n, You can number n sub-pictures from 1 to n, i ⁇ n. Since the sub-picture is composed of several pixels, it is necessary to select a pixel that can best represent the light intensity of the sub-picture, and use the coordinates of the point as the coordinate position of the sub-picture.
  • the light intensity model when the light intensity model outputs the light intensity of the sub-picture, it may simultaneously output the coordinates of the pixel point corresponding to the gray value closest to the light intensity.
  • the light intensity weight value corresponding to each sub-picture can be calculated by the following formula.
  • Fi is the weight value of the light intensity
  • S i is the length of the sub picture.
  • the light intensity weight value corresponding to each sub-picture can be calculated.
  • the light intensity of the target picture can be calculated by the following formula.
  • L is the light intensity of the target picture
  • L i is the light intensity of each sub-picture obtained in step S103.
  • the illumination angle can be obtained as follows. Determining a lighting angle weight value corresponding to each of the sub-pictures; weighting and summing a vector of lighting angles of each of the sub-pictures according to the lighting angle weight value to calculate a lighting angle of the target picture.
  • a weight value corresponding to each sub-picture may be determined according to a vector module of a lighting angle corresponding to each sub-picture, and / or a lighting angle, and / or previous experience.
  • a confidence factor may be calculated according to a weight value corresponding to each sub-picture and a vector of an illumination angle corresponding to each sub-picture, and when the confidence factor is less than a preset value, the above-mentioned weight value is adjusted.
  • the confidence factor is a ratio of a vector sum of the illumination angle and a sum of the weight values.
  • the confidence factor can indicate whether the weight value matches the trend of the vector. The closer the confidence factor is to 1, this indicates that the weight value The more appropriate.
  • the confidence factor is less than the preset value, it means that the determined weight value is inappropriate. At this time, the weight value needs to be adjusted.
  • a new confidence factor is calculated and tested according to the above method until the new confidence factor can be greater than the preset threshold. .
  • the length of the vector of the lighting angle of each sub-picture is determined according to the weight value, and then the vectors determined by each length are added to obtain the vector of the lighting angle corresponding to the target picture, and the vector of the lighting angle corresponding to the target picture , To obtain the illumination angle corresponding to the target picture according to the method described in step S102.
  • the weight values corresponding to the sub-pictures are the same, which improves the efficiency of the optimization of the illumination angle. Specifically, it is determined whether the size of each sub-picture is smaller than a preset threshold. If it is smaller than the preset threshold, the weight value corresponding to each sub-picture need not be considered, and the vector of the illumination angle of each sub-picture is directly added to obtain the The lighting angle of the target picture. Optionally, the obtained lighting angle can be statistically corrected to obtain a more accurate lighting angle.
  • the method for optimizing the illumination information obtained by the embodiment of the present invention obtains the illumination information of the entire picture by obtaining the illumination intensity and illumination angle of the sub-picture, and calculating the illumination intensity and illumination angle of each sub-picture respectively, and the virtual object is obtained accordingly. Render light and shadow effects so that virtual objects can match their scene environment.
  • FIG. 4 is a structural diagram of an apparatus for optimizing illumination information according to an embodiment of the present invention.
  • the device specifically includes: an acquisition module 100, a determination module 200, a processing module 300, a first calculation module 400 and a second calculation module 500. among them,
  • the obtaining module 100 is configured to obtain a target picture and decompose the target picture into a first preset number of sub-pictures; wherein the sub-picture is composed of a second preset number of pixels; a determining module 200 is configured to obtain all
  • the geometric center of the sub-picture is determined according to the image moment of the sub-picture.
  • the light-weighted center is determined based on the light-intensity weighted center and the geometric center of the sub-picture.
  • the illumination angle of the sub-picture is determined.
  • the processing module 300 uses Performing grayscale processing on the sub-picture, and obtaining the light intensity of the sub-picture according to the gray value of each point on the sub-picture; a first calculation module 400, configured to obtain a light intensity weight corresponding to the sub-picture Value to obtain the light intensity of the target picture according to the light intensity of the sub-picture and the light intensity weight value corresponding to the sub-picture; a second calculation module 500 is configured to calculate the light angle of the sub-picture, Obtain the illumination angle of the target picture.
  • the apparatus for optimizing the illumination information provided by the embodiment of the present invention is specifically configured to execute the method provided by the embodiment shown in FIG. 1 and FIG. 2, and its implementation principles, methods, and functional uses are similar to the embodiments shown in FIG. 1 and FIG. 2. , Will not repeat them here.
  • FIG. 5 is a structural diagram of an apparatus for optimizing illumination information according to an embodiment of the present invention.
  • the device specifically includes: an acquisition module 100, a determination module 200, a processing module 300, a first calculation module 400, and a second calculation module 500. among them,
  • the obtaining module 100 is configured to obtain a target picture and decompose the target picture into a first preset number of sub-pictures; wherein the sub-picture is composed of a second preset number of pixels; a determining module 200 is configured to obtain all
  • the geometric center of the sub-picture is determined according to the image moment of the sub-picture, and the light-weighted center is determined based on the light-weighted center and the geometric center of the sub-picture.
  • the illumination angle of the sub-picture is determined.
  • the processing module 300 uses Performing grayscale processing on the sub-picture, and obtaining the light intensity of the sub-picture according to the gray value of each point on the sub-picture; a first calculation module 400, configured to obtain a light intensity weight corresponding to the sub-picture Value to obtain the light intensity of the target picture according to the light intensity of the sub-picture and the light intensity weight value corresponding to the sub-picture; a second calculation module 500 is configured to calculate the light angle of the sub-picture, Obtain the illumination angle of the target picture.
  • the processing module 300 is specifically configured to perform grayscale processing on the sub-picture, so that each point on the sub-picture retains only a gray-scale value of 0-255; The value is input into a pre-trained light intensity model to obtain the light intensity of the sub-picture.
  • the first calculation module 400 includes: an obtaining unit 410 and a determining unit 42. among them,
  • the obtaining unit 410 is configured to obtain position coordinates of the sub-picture in the target picture; and the determining unit 420 is used to determine the lighting corresponding to the sub-picture according to the position coordinates of the sub-picture and the size of the sub-picture Strength weight value.
  • the first calculation module 400 further includes: a determining unit 430 and a summing unit 440. among them,
  • a judging unit 430 is configured to determine whether the size of the sub-picture is smaller than a preset threshold; and a summing unit 440 is configured to sum the vectors of the illumination angles of the sub-pictures if the sub-picture is smaller than the preset threshold to obtain the The lighting angle of the target picture.
  • the second calculation module 500 is further configured to determine a lighting angle weight value corresponding to each of the sub-pictures; and perform weighted summation on a vector of lighting angles of each of the sub-pictures according to the lighting angle weight value to obtain a calculation The illumination angle of the target picture.
  • the apparatus for optimizing the illumination information provided by the embodiment of the present invention is specifically configured to execute the method provided by the embodiment shown in FIG. 1 to FIG. 3, and its implementation principles, methods, and functional uses are similar to the embodiment shown in FIG. 1-3, I will not repeat them here.
  • the above-mentioned apparatus for optimizing illumination information in the embodiments of the present invention may be used as one of the software or hardware functional units, which may be independently provided in the above-mentioned electronic device, or may be used as one of the functional modules integrated in the processor to execute the embodiments of the present invention. Optimization method of lighting information.
  • FIG. 6 is a schematic diagram of a hardware structure of an electronic device that executes a method for optimizing illumination information provided by a method embodiment of the present invention.
  • the electronic device includes:
  • One or more processors 610 and a memory 620 are taken as an example in FIG. 6.
  • the device for performing the method for optimizing the illumination information may further include an input device 630 and an output device 630.
  • the processor 610, the memory 620, the input device 630, and the output device 640 may be connected through a bus or other methods. In FIG. 6, the connection through the bus is taken as an example.
  • the memory 620 is a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer executable programs, and modules, such as the method for optimizing illumination information in the embodiment of the present invention. Corresponding program instructions / modules.
  • the processor 610 executes various functional applications and data processing of the server by running non-volatile software programs, instructions, and modules stored in the memory 620, that is, an optimization method for implementing the illumination information.
  • the memory 620 may include a storage program area and a storage data area, where the storage program area may store an operating system and an application program required for at least one function; the storage data area may store the use of an optimization device for lighting information provided according to an embodiment of the present invention Data created, etc.
  • the memory 620 may include a high-speed random access memory 620, and may further include a non-volatile memory 620, such as at least one magnetic disk memory 620, a flash memory device, or other non-volatile solid-state memory 620.
  • the memory 620 may optionally include a memory 620 remotely set relative to the processor 66, and these remote memories 620 may be connected to the optimization device of the lighting information through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the input device 630 may receive inputted numeric or character information, and generate key signal inputs related to user settings and function control of the optimized device for lighting information.
  • the input device 630 may include a device such as a pressing module.
  • the one or more modules are stored in the memory 620, and when executed by the one or more processors 610, perform an optimization method of the illumination information.
  • the electronic devices in the embodiments of the present invention exist in various forms, including but not limited to:
  • Mobile communication equipment This type of equipment is characterized by mobile communication functions, and its main goal is to provide voice and data communication.
  • Such terminals include: smart phones (such as iPhone), multimedia phones, feature phones, and low-end phones.
  • Ultra-mobile personal computer equipment This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has the characteristics of mobile Internet access.
  • Such terminals include: PDA, MID and UMPC devices, such as iPad.
  • Portable entertainment equipment This type of equipment can display and play multimedia content.
  • Such devices include: audio and video players (such as iPod), handheld game consoles, e-books, as well as smart toys and portable car navigation devices.
  • the electronic device in this embodiment may be a mobile phone with a support structure.
  • the mobile phone may be used to obtain a target picture in the method for optimizing illumination information in the foregoing embodiment.
  • the mobile phone is provided with a support plate on the back cover, which can make the mobile phone support stably, and is stable enough when acquiring target images and videos, thereby obtaining high-quality target pictures, and laying a foundation for subsequent processing of the target pictures.
  • the mobile phone's built-in support plate prevents the user from using a mobile phone case with a stand and an externally sticky stand, which facilitates the heat dissipation of the mobile phone, improves the aesthetics, and solves the fatigue caused by the user holding the mobile phone for a long time.
  • the mobile phone includes a front panel with a display screen (not shown in the figure) and a mobile phone back cover 1000; a middle and lower part of the mobile phone back cover 1000 is provided with a recessed area 1100, and the recessed area 1100 is inside
  • a support plate 2000 adapted to the shape and size of the recessed area 1100 is installed; the upper end of the support plate 2000 is hinged to the recessed area 1100 so that the support plate 2000 can be rotated to the mobile phone back cover 1000 is a preset angle.
  • the upper end of the support plate 2000 in this embodiment may have a rotating shaft, and the upper end of the recessed portion has a shaft hole adapted to the rotating shaft. The cooperation between the rotating shaft and the shaft hole is used to realize the support plate 2000. It can be rotated, of course, other rotating mechanisms with simpler structures are also within the optional range of this embodiment.
  • a connection piece 3000 is provided at the lower end of the support plate 2000.
  • One end of the connection piece 3000 is soft-connected to the support plate 2000, and the other end has A plugging portion 310 adapted to the shape and size of the mobile phone charging interface 4000.
  • the plugging portion 310 is mated with the mobile phone charging interface 4000.
  • the connecting member 3000 in this embodiment is made of rubber. The use of rubber not only has good deformation ability, but also has low cost and is easy to implement.
  • a rotatable support plate is provided in the recessed area of the back cover of the mobile phone, which can support the mobile phone side by side to meet the user's requirements.
  • the lower end of the support plate is fixed by connecting with the charging interface of the mobile phone, and it can also protect the charging interface and improve the functionality of the support plate.
  • the expansion of the support plate in this embodiment is also very convenient. It only needs to be pulled out from the charging port of the mobile phone.
  • the existing support plate cannot play the role of fixing the mobile phone. Therefore, the inventor made further improvements to the above-mentioned support plate structure.
  • the support plate 2000 in this embodiment specifically includes a first plate body 2100, a second plate body 2200, a first connection plate 2300, a second connection plate 2400, and a connecting rod 2500.
  • the first plate body 2100, the first connection plate 2300, the second connection plate 2400, and the second plate body 2200 are sequentially connected to form a plate body.
  • the first plate body 2100 has opposite first ends and second ends (i.e., FIG.
  • the second plate body 2200 has opposite third and fourth ends (ie, the upper and lower ends in the figure), and the link 2500 includes a first rod body 2510 and a second rod body 2520, opposite ends of the first rod body 2510 are hinged to the first end and the third end, respectively, and opposite ends of the second rod body 2520 are respectively connected to the second end and the fourth end Phase articulation, wherein the first rod body 2510 and the second rod body 2520 are both disposed on a side of the support plate away from the front panel.
  • the number of the connecting rods 2500 in this embodiment may also be one, and two ends of one connecting rod 2500 are respectively connected to the first and second ends, or two ends of one connecting rod 2500 are respectively connected to the first and second ends.
  • the three ends are connected to the fourth end, or one end of a link 2500 is connected to the middle of one side of the first plate 2100, and the other end is connected to the middle of one side of the second plate 2200.
  • the first connection The plate 2300 and the second connection plate 2400 are separate structures, that is, the first connection plate 2300 and the second connection plate 2400 are each composed of two plate-shaped members.
  • Above a link 2500 is the first connection plate 2300 and the second connection One plate-like member of the plate 2400, and below the link 2500 is another plate-like member of the first connection plate 2300 and the second connection plate 2400.
  • first connection plate 2300 and the second connection plate 2400 in this embodiment are located between the first plate body 2100 and the second plate body 2200, and one side of the first connection plate 2300
  • One side of the first plate body 2100 is hinged
  • one side of the second connection plate 2400 is hinged with one side of the second plate body 2200
  • the other side of the first connection plate 2300 is connected to the second plate
  • the other side of the connection plate 2400 is hinged, wherein the first connection plate 2300 and the second connection plate 2400 are disposed on a side of the support plate 2000 near the front panel.
  • the first plate body 2100 in this embodiment is provided with a first portion 2110 disposed along a thickness direction thereof, and the first portion 2110 is located in the first plate body 2100 and the connecting rod 2500.
  • the second plate body 2200 is provided with a second portion 2210 disposed along the thickness direction of the second plate body 2200, and the second portion 2210 is located between the hinge between the second plate body 2200 and the connecting rod 2500 and the hinge between the second plate body 2200 and the second connecting plate 2400; the first portion 2110, the second portion 2210, the first portion A connecting plate 2300, a second connecting plate 2400, and a connecting rod 2500 form a five-bar mechanism.
  • the above structure forms a five-bar mechanism through the first portion 2110, the second portion 2210, the first connection plate 2300, the second connection plate 2400, and the connecting rod 2500.
  • the entire support plate 2000 structure is rotated to a certain angle.
  • the first rod body 2510 and the second rod body 2520 are both disposed on a side of the support plate 2000 away from the front panel, and the first connection plate 2300 and the second connection plate 2400 are disposed on a side of the support plate 2000 near the front panel.
  • the five-link 2500 mechanism is at the first dead point position.
  • the first plate 2100 and the first plate 2100, the first connection plate 2300, and the second connection The plate 2400 cannot be rotated, and the dead point position can only be opened by an external force near the front panel, which can ensure that the support plate 2000 is always a plate structure, which provides a stable support for the mobile phone.
  • the first connecting plate and the second plate 2200 can be folded.
  • the first connecting plate 2300 and the first connecting plate 2300 are rotated to the second dead point and the first connecting plate 2300.
  • the second connecting plate 2400 can form a finger receiving portion for inserting a finger into the finger receiving portion, and can fix the mobile phone on a human hand to prevent the user from being crowded and colliding during use, causing the mobile phone to fall.
  • the support plate 2000 not only plays a supporting role, but also plays a role of fixing the mobile phone, which greatly improves its functionality.
  • phase articulation between the two components described above may be provided with a shaft hole in one component, and a rotation shaft, a rotation shaft and a shaft hole matched with the shaft hole in the other component. Together, they form a rotating mechanism so that the two components can rotate relative to each other.
  • the material of the first connection plate 2300 and the second connection plate 2400 can be selected to have a certain deformability, such as soft plastic.
  • a certain deformability such as soft plastic.
  • the first end, the second end, the third end, and the fourth end of the embodiment are each provided with a recess 2600, and the opposite ends of the first rod body 2510 are respectively disposed in the recesses.
  • opposite ends of the second rod body 2520 are respectively placed in the recessed portion 2600 of the third end and the recessed portion 2600 of the fourth end.
  • the connecting rod 2500 mechanism is provided in the board body through the recessed portion, so that the connecting rod 2500 mechanism, the board body, and the connecting plate together form a board body structure, which improves the integrity of the entire supporting plate 2000 and facilitates the installation of the supporting plate 2000.
  • the recessed area 1100 specifically includes a bottom wall and a side wall.
  • the bottom wall is provided with a ventilation structure 1110, and the ventilation structure 1110 may be a plurality of The ventilation hole and the ventilation structure 1110 may be provided with a ventilation grille on the bottom wall.
  • the design of the ventilation holes and the ventilation grille can enhance the heat dissipation effect of the mobile phone when the support plate 2000 is in a supported state or a folded state, thereby extending the service life of the mobile phone.
  • the device embodiments described above are only schematic, and the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, which may be located in One place, or can be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the objective of the solution of this embodiment. Those of ordinary skill in the art can understand and implement without creative labor.
  • An embodiment of the present invention provides a non-transitory computer-readable storage storage medium, where the computer storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by an electronic device, the electronic device is caused
  • the method for optimizing illumination information in any of the foregoing method embodiments is performed on the above.
  • An embodiment of the present invention provides a computer program product, wherein the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions When executed by an electronic device, the electronic device is caused to execute the method for optimizing illumination information in any of the foregoing method embodiments.
  • each embodiment can be implemented by means of software plus a necessary universal hardware platform, and of course, also by hardware.
  • the above-mentioned technical solution in essence or a part that contributes to the existing technology may be embodied in the form of a software product, and the computer software product may be stored in a computer-readable storage medium, the computer-readable record A medium includes any mechanism for storing or transmitting information in a form readable by a computer (eg, a computer).
  • machine-readable media include read-only memory (ROM), random-access memory (RAM), magnetic disk storage media, optical storage media, flash storage media, electrical, optical, acoustic, or other forms of propagation signals (e.g., carrier waves , Infrared signals, digital signals, etc.), the computer software product includes a number of instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute various embodiments or certain parts of the embodiments Methods.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Studio Devices (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

Embodiments of the present invention provide an illumination information optimization method and apparatus, and an electronic device, said method comprising: acquiring a target picture, and decomposing the target picture into a first pre-set number of sub-pictures; acquiring geometric centers of the sub-pictures, determining light intensity weighted centers according to image moments of the sub-pictures, and determining illumination angles of the sub-pictures on the basis of the light intensity weighted centers and the geometric centers of the sub-pictures; performing grayscale processing on the sub-pictures, and obtaining illumination intensities of the sub-pictures according to grayscale values of points on the sub-pictures; acquiring illumination intensity weight values of the sub-pictures, and obtaining an illumination intensity of the target picture according to the illumination intensities of the sub-pictures and the illumination intensity weight values of the sub-pictures; and calculating the illumination angles of the sub-pictures, so as to obtain an illumination angle of the target picture.

Description

光照信息的优化方法、装置及电子设备Optimization method and device for lighting information and electronic equipment 技术领域Technical field
本发明涉及图像处理技术领域,尤其涉及一种光照信息的优化方法、装置及电子设备。The present invention relates to the field of image processing technology, and in particular, to a method, an apparatus, and an electronic device for optimizing illumination information.
背景技术Background technique
增强现实(Augmented Reality,简称AR)技术,能够在屏幕上把虚拟世界套在真实世界并进行互动,用户通过利用AR设备,能够感知到虚拟对象的存在。然而在实现本发明的过程中,发明人发现相关技术中,一般需要预先获取图片或视频的环境信息、位置和时间,通过上述信息来确定图片或视频对应的光照信息,再对虚拟对象进行观影效果的渲染。上述方法不仅效率较低,且可能由于无法准确获取图片或视频中准确的光照角度和光照强度,而导致虚拟对象的光影效果与场景出现偏差。Augmented Reality (AR) technology can put the virtual world on the screen and interact with it. Users can perceive the existence of virtual objects by using AR devices. However, in the process of implementing the present invention, the inventors found that in related technologies, it is generally necessary to obtain the environmental information, location, and time of a picture or video in advance, determine the lighting information corresponding to the picture or video through the above information, and then observe the virtual object Rendering of shadow effects. The above method is not only inefficient, but also may cause deviations in the light and shadow effects of the virtual object from the scene due to the inability to accurately obtain the accurate lighting angle and light intensity in the picture or video.
此外,为了获得与现实场景相同的AR设备的虚拟对象,往往通过手机摄像头直接拍摄获取,并且越来越多的用户直接通过手机屏幕播放AR视频。为了避免手持设备发生抖动而造成取景效果不佳,或者用户长时间手持手机观看视频导致的不便,往往需要将手机安装于支架上,以保持稳定,普通用户往往使用手机简易支架就能达到所需的取景效果和稳定支撑效果,而通常的简易支架位于手机保护壳上、或通过强力胶粘贴在手机背部,越来越多的用户因为手机玻璃日益坚固、手机散热问题、手机美观度的原因而不愿意使用手机保护壳和胶粘的简易支架。In addition, in order to obtain a virtual object of an AR device that is the same as a real scene, it is often captured directly through a mobile phone camera, and more and more users play AR videos directly through a mobile phone screen. In order to avoid the poor framing effect caused by shaking of the handheld device, or the inconvenience caused by the user holding the mobile phone for a long time to watch the video, it is often necessary to install the mobile phone on the stand to maintain stability. Ordinary users often use the simple stand of the mobile phone to achieve the required Framing effect and stable support effect, and the usual simple bracket is located on the protective case of the mobile phone, or pasted on the back of the mobile phone by strong adhesive. More and more users are because of the increasingly strong glass of the mobile phone, the heat dissipation problem of the mobile phone, and the aesthetics of the mobile phone. Reluctant to use mobile phone case and adhesive simple bracket.
发明内容Summary of the Invention
本发明实施例提供的光照信息的优化方法、装置及电子设备,用以至少解决相关技术中的上述问题。The method, device, and electronic device for optimizing illumination information provided by the embodiments of the present invention are used to solve at least the foregoing problems in related technologies.
本发明实施例一方面提供了一种光照信息的优化方法,包括:One aspect of the embodiments of the present invention provides a method for optimizing illumination information, including:
获取目标图片,将所述目标图片分解成第一预设数量的子图片;其中, 所述子图片由第二预设数量的像素组成;获取所述子图片的几何中心,根据所述子图片的图像矩确定光强加权中心,基于所述光强加权中心和所述子图片的几何中心确定所述子图片的光照角度;对所述子图片进行灰度处理,根据所述子图片上各点的灰度值得到所述子图片的光照强度;获取所述子图片对应的光照强度权重值,根据所述子图片的光照强度和所述子图片对应的光照强度权重值,得到所述目标图片的光照强度;对所述子图片的光照角度进行计算,得到所述目标图片的光照角度。Obtaining a target picture, and decomposing the target picture into a first preset number of sub-pictures; wherein the sub-picture is composed of a second preset number of pixels; obtaining a geometric center of the sub-picture according to the sub-picture The image moment determines the light intensity weighting center, and determines the illumination angle of the sub-picture based on the light intensity weighting center and the geometric center of the sub-picture; performing gray-scale processing on the sub-picture, according to each of the sub-pictures The gray value of the point is used to obtain the light intensity of the sub-picture; the light intensity weight value corresponding to the sub-picture is obtained, and the target is obtained according to the light intensity of the sub-picture and the light intensity weight value corresponding to the sub-picture The light intensity of the picture; calculating the light angle of the sub-picture to obtain the light angle of the target picture.
进一步地,所述对所述子图片进行灰度处理,根据所述子图片上各点的灰度值得到所述子图片的光照强度,包括:对所述子图片进行灰度处理,使得所述子图片上各点只保留一个0-255的灰度值;将所述子图片上各点的灰度值输入预先训练的光照强度模型中,得到所述子图片的光照强度。Further, performing the grayscale processing on the sub-picture, and obtaining the light intensity of the sub-picture according to the gray-scale value of each point on the sub-picture includes: performing gray-scale processing on the sub-picture, so that Each point on the sub-picture retains only a gray value of 0-255; the gray values of the points on the sub-picture are input into a pre-trained light intensity model to obtain the light intensity of the sub-picture.
进一步地,所述获取所述子图片对应的光照强度值包括:获取所述子图片在所述目标图片中的位置坐标;根据所述子图片的位置坐标以及所述子图片的尺寸确定所述子图片对应的光照强度权重值。Further, obtaining the light intensity value corresponding to the sub-picture includes: obtaining position coordinates of the sub-picture in the target picture; determining the position according to the position coordinates of the sub-picture and the size of the sub-picture The light intensity weight value corresponding to the sub-picture.
进一步地,所述对各所述子图片的光照角度进行计算,得到所述目标图片对应的光照角度,包括:判断所述子图片的尺寸是否小于预设阈值;若小于预设阈值,则对各所述子图片的光照角度的向量进行求和,得到所述目标图片的光照角度。Further, calculating the illumination angle of each of the sub-pictures to obtain the illumination angle corresponding to the target picture includes: determining whether the size of the sub-picture is smaller than a preset threshold; The vectors of the illumination angles of the sub-pictures are summed to obtain the illumination angle of the target picture.
进一步地,所述对各所述子图片的光照角度进行计算,得到所述目标图片对应的光照角度,包括:确定各所述子图片对应的光照角度权重值;根据所述光照角度权重值对各所述子图片的光照角度的向量进行加权求和,计算得到所述目标图片的光照角度。Further, calculating the lighting angle of each of the sub-pictures to obtain the lighting angle corresponding to the target picture includes: determining a lighting angle weight value corresponding to each of the sub-pictures; The vector of the illumination angle of each sub-picture is weighted and summed to calculate the illumination angle of the target picture.
本发明实施例的另一方面提供了一种光照信息的优化装置,包括:Another aspect of the embodiments of the present invention provides an apparatus for optimizing illumination information, including:
获取模块,用于获取目标图片,将所述目标图片分解成第一预设数量的子图片;其中,所述子图片由第二预设数量的像素组成;确定模块,用于获取所述子图片的几何中心,根据所述子图片的图像矩确定光强加权中心,基于所述光强加权中心和所述子图片的几何中心确定所述子图片的光照角度;处理模块,用于对所述子图片进行灰度处理,根据所述子图片上各点的灰度值得到所述子图片的光照强度;第一计算模块,用于获取所述子图片对应的光照强度权重值,根据所述子图片的光照强度和所述子图片对应的光照强度权重值,得到所述目标图片的光照强度;第二计算模块, 用于对所述子图片的光照角度进行计算,得到所述目标图片的光照角度。An obtaining module is used to obtain a target picture and decompose the target picture into a first preset number of sub-pictures; wherein the sub-picture is composed of a second preset number of pixels; a determining module is used to obtain the sub-pictures A geometric center of the picture, determining a light intensity weighting center according to the image moment of the sub-picture, and determining an illumination angle of the sub-picture based on the light intensity weighting center and the geometric center of the sub-picture; a processing module for The sub-picture is subjected to gray-scale processing, and the light intensity of the sub-picture is obtained according to the gray value of each point on the sub-picture; a first calculation module is configured to obtain a light-intensity weight value corresponding to the sub-picture, and The light intensity of the sub-picture and the light intensity weight value corresponding to the sub-picture are used to obtain the light intensity of the target picture; a second calculation module is configured to calculate the light angle of the sub-picture to obtain the target picture Light angle.
进一步地,所述处理模块具体用于,对所述子图片进行灰度处理,使得所述子图片上各点只保留一个0-255的灰度值;将所述子图片上各点的灰度值输入预先训练的光照强度模型中,得到所述子图片的光照强度。Further, the processing module is specifically configured to perform grayscale processing on the sub-picture, so that each point on the sub-picture retains only a gray value of 0-255; and gray-scale each point on the sub-picture. The degree value is input into a pre-trained light intensity model to obtain the light intensity of the sub-picture.
进一步地,所述第一计算模块包括:获取单元,用于获取所述子图片在所述目标图片中的位置坐标;确定单元,用于根据所述子图片的位置坐标以及所述子图片的尺寸确定所述子图片对应的光照强度权重值。Further, the first calculation module includes: an obtaining unit for obtaining position coordinates of the sub-picture in the target picture; and a determining unit for obtaining position coordinates of the sub-picture and a position of the sub-picture The size determines a light intensity weight value corresponding to the sub-picture.
进一步地,所述第一计算模块还包括:判断单元,用于判断所述子图片的尺寸是否小于预设阈值;求和单元,用于若小于预设阈值,则对各所述子图片的光照角度的向量进行求和,得到所述目标图片的光照角度。Further, the first calculation module further includes: a judging unit for judging whether the size of the sub-picture is smaller than a preset threshold; and a summing unit for judging the sub-pictures if the sub-picture is smaller than the preset threshold. The vectors of the illumination angles are summed to obtain the illumination angle of the target picture.
进一步地,所述第二计算模块还用于,确定各所述子图片对应的光照角度权重值;根据所述光照角度权重值对各所述子图片的光照角度的向量进行加权求和,计算得到所述目标图片的光照角度。Further, the second calculation module is further configured to determine a lighting angle weight value corresponding to each of the sub-pictures; perform weighted summation on a vector of lighting angles of each of the sub-pictures according to the lighting angle weight value, and calculate Obtain the illumination angle of the target picture.
本发明实施例的又一方面提供一种电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述光照信息的优化方法。Another aspect of the embodiments of the present invention provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a memory that can be used by the at least one processor An executed instruction, where the instruction is executed by the at least one processor, so that the at least one processor can execute the foregoing optimization method of lighting information.
进一步地,所述电子设备为手机,所述光照信息的优化方法中的目标图片的获取通过该手机实现。所述手机包括具有显示屏的前面板和手机后盖;所述手机后盖的中下部设有一凹陷区,所述凹陷区内安装有与所述凹陷区形状尺寸相适配的支撑板;所述支撑板的上端与所述凹陷区铰接,以使所述支撑板能够转动至与所述手机后盖呈一预设角度;所述支撑板的下端设置有一连接件,所述连接件一端与所述支撑板软连接,另一端具有与手机充电接口形状尺寸相适配的封堵部,所述封堵部与所述手机充电接口插接配合;Further, the electronic device is a mobile phone, and the obtaining of the target picture in the method for optimizing the illumination information is performed by the mobile phone. The mobile phone includes a front panel with a display screen and a mobile phone back cover; a middle and lower part of the mobile phone back cover is provided with a recessed area, and a support plate adapted to the shape and size of the recessed area is installed in the recessed area; The upper end of the support plate is hinged with the recessed area, so that the support plate can be rotated to a predetermined angle with the back cover of the mobile phone; a lower end of the support plate is provided with a connecting piece, and one end of the connecting piece and The support plate is soft-connected, and the other end is provided with a plugging portion adapted to the shape and size of the mobile phone charging interface, and the plugging portion is mated with the mobile phone charging interface;
进一步的,所述支撑板包括第一板体、第二板体、第一连接板、第二连接板以及连杆,所述第一板体、第一连接板、第二连接板和第二板体依次连接形成一板体;所述第一板体具有相对的第一端和第二端,所述第二板体具有相对的第三端和第四端,所述连杆包括第一杆体和第二杆体,所述第一杆体相对两端分别与所述第一端和所述第三端相铰接,所述第二杆体相对两端分别与所述第二端和所述第四端相铰接,其中所述第一杆体和所述第二杆体均设置在所述支撑板远离所述前面板的一侧;所述第一连接板和所述第二连 接板位于所述第一板体和所述第二板体之间,所述第一连接板一侧与所述第一板体一侧相铰接,所述第二连接板一侧与所述第二板体一侧相铰接,所述第一连接板另一侧与所述第二连接板另一侧相铰接,所述第一连接板和所述第二连接板设置在所述支撑板靠近所述前面板的一侧;所述第一板体设有沿其厚度方向设置的第一部分,所述第一部分位于所述第一板体与所述连杆的铰接处和所述第一板体与所述第一连接板的铰接处之间;所述第二板体设有沿其厚度方向设置的第二部分,所述第二部分位于所述第二板体与连杆的铰接处和所述第二板体与所述第二连接板的铰接处之间;所述第一部分、第二部分、第一连接板、第二连接板以及连杆形成五杆体机构。Further, the support plate includes a first plate body, a second plate body, a first connection plate, a second connection plate, and a link, the first plate body, the first connection plate, the second connection plate, and the second The plates are sequentially connected to form a plate; the first plate has opposite first and second ends, the second plate has opposite third and fourth ends, and the link includes a first A rod body and a second rod body, opposite ends of the first rod body are hinged to the first end and the third end, respectively, and opposite ends of the second rod body are respectively connected to the second end and the fourth end End-to-phase hinge, wherein the first rod body and the second rod body are both disposed on a side of the support plate away from the front panel; the first connection plate and the second connection plate are located on the first Between the plate body and the second plate body, one side of the first connection plate is hinged to one side of the first plate body, and one side of the second connection plate is opposite to one side of the second plate body. Hinged, the other side of the first connection plate is hinged with the other side of the second connection plate, the first connection plate and the second connection plate The first plate is provided on a side of the support plate close to the front plate; the first plate is provided with a first portion disposed along a thickness direction of the first plate, and the first portion is located at a hinge between the first plate and the link. And between the first plate body and the hinge of the first connecting plate; the second plate body is provided with a second portion provided along its thickness direction, and the second portion is located on the second plate Between the hinge between the body and the connecting rod and the hinge between the second plate and the second connecting plate; the first portion, the second portion, the first connecting plate, the second connecting plate, and the connecting rod form five Rod body mechanism.
进一步地,所述凹陷区包括底壁和侧壁,所述底壁和/或所述侧壁上设有通风结构,所述通风结构为多个通风孔或通风格栅。Further, the recessed area includes a bottom wall and a side wall, and the bottom wall and / or the side wall is provided with a ventilation structure, and the ventilation structure is a plurality of ventilation holes or ventilation grilles.
进一步地,所述连接件由橡胶制成。Further, the connecting member is made of rubber.
进一步地,所述第一端、第二端、第三端和第四端均设有一凹陷部,所述第一杆体的相对两端分别置于所述第一端的凹陷部和所述第三端的凹陷部内,所述第二杆体相对两端分别置于所述第三端的凹陷部和所述第四端的凹陷部内。Further, each of the first end, the second end, the third end, and the fourth end is provided with a recessed portion, and opposite ends of the first rod body are respectively disposed in the recessed portion of the first end and the first end. In the recessed portion at the three ends, the opposite ends of the second rod body are respectively placed in the recessed portion of the third end and the recessed portion of the fourth end.
由以上技术方案可见,本发明实施例提供的光照信息的优化方法、装置及电子设备,通过获取子图片光照强度和光照角度,并分别将各子图片的光照强度、光照角度进行计算,得到整个图片的光照信息,并据此对虚拟对象进行光影效果的渲染,使得虚拟对象能够与其所处的场景环境相匹配。此外,本发明实施例提供地用于上述光照信息的优化方法中的带有支撑板的手机,可以使得手机拍摄、播放更加平稳,手机无需保护壳和粘贴部件,外观更加美观,既改善了光照信息的优化方法中目标图片的获取质量,又可以脱离上述方法单独使用。It can be seen from the above technical solutions that the method, device, and electronic device for optimizing illumination information provided by the embodiments of the present invention obtain the entire light intensity and angle of the sub-picture, and calculate the light intensity and angle of each sub-picture to obtain the entire The lighting information of the picture, and the rendering of the light and shadow effects on the virtual object according to this, so that the virtual object can match its scene environment. In addition, the mobile phone with a support plate provided in the method for optimizing the lighting information provided by the embodiments of the present invention can make the mobile phone shoot and play more smoothly. The mobile phone does not need a protective case and a sticking part, and has a more beautiful appearance, which improves the lighting. The quality of the target picture in the information optimization method can be used separately from the above method.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明实施例中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。In order to more clearly explain the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely These are some of the embodiments described in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to these drawings.
图1为本发明一个实施例提供的光照信息的优化方法流程图;FIG. 1 is a flowchart of a method for optimizing illumination information according to an embodiment of the present invention; FIG.
图2为本发明一个实施例提供的子图片的光强加权中心和加权中心坐标位置图;FIG. 2 is a light intensity weighted center and a weighted center coordinate position map of a sub-picture provided by an embodiment of the present invention; FIG.
图3为本发明一个实施例提供的步骤S104的具体流程图;3 is a specific flowchart of step S104 provided by an embodiment of the present invention;
图4为本发明一个实施例提供的光照信息的优化装置结构图;4 is a structural diagram of an apparatus for optimizing illumination information according to an embodiment of the present invention;
图5为本发明一个实施例提供的光照信息的优化装置结构图;5 is a structural diagram of an apparatus for optimizing illumination information according to an embodiment of the present invention;
图6为执行本发明方法实施例提供的光照信息的优化方法的电子设备的硬件结构示意图;6 is a schematic diagram of a hardware structure of an electronic device that executes a method for optimizing illumination information provided by a method embodiment of the present invention;
图7为本发明一个实施例提供的用于光照信息的优化方法中获取目标图片的手机结构示意图;7 is a schematic structural diagram of a mobile phone that obtains a target picture in a method for optimizing illumination information according to an embodiment of the present invention;
图8为本发明一个实施例提供的用于光照信息的优化方法中获取目标图片的手机支撑板的爆炸图;8 is an exploded view of a mobile phone support plate for obtaining a target picture in a method for optimizing illumination information according to an embodiment of the present invention;
图9为本发明一个实施例提供的用于光照信息的优化方法中获取目标图片的手机支撑板的处于支撑状态下的示意图;FIG. 9 is a schematic diagram of a mobile phone support plate in a supported state for obtaining a target picture in a method for optimizing illumination information according to an embodiment of the present invention; FIG.
图10为图9的A部放大图;10 is an enlarged view of part A of FIG. 9;
图11为图9的B部放大图;11 is an enlarged view of a portion B of FIG. 9;
图12为本发明一个实施例提供的用于光照信息的优化方法中获取目标图片的手机支撑板的处于折叠状态下的示意图。FIG. 12 is a schematic diagram of a mobile phone support plate that obtains a target picture in a method for optimizing lighting information according to an embodiment of the present invention in a folded state.
具体实施方式detailed description
为了使本领域的人员更好地理解本发明实施例中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明实施例一部分实施例,而不是全部的实施例。基于本发明实施例中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于本发明实施例保护的范围。In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described The embodiments are only a part of the embodiments of the present invention, but not all the embodiments. Based on the embodiments in the embodiments of the present invention, all other embodiments obtained by those skilled in the art should belong to the protection scope of the embodiments of the present invention.
下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互结合。图1为本发明实施例提供的光照信息的优化方法流程图。如图1所示,本发明实施例提供的光照信息的优化方法,包括:Hereinafter, some embodiments of the present invention will be described in detail with reference to the drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other. FIG. 1 is a flowchart of a method for optimizing illumination information according to an embodiment of the present invention. As shown in FIG. 1, a method for optimizing illumination information provided by an embodiment of the present invention includes:
S101,获取目标图片,将所述目标图片分解成第一预设数量的子图片。S101. Obtain a target picture, and decompose the target picture into a first preset number of sub-pictures.
具体地,光照信息包括光照强度和光照角度,本发明实施例通过将目标图片进行分解,分别计算目标图片的光照强度和光照角度,得到目标图片的整体光照信息。目标图片可以是视频中的某一帧、也可以是从相机上捕捉的单个图片帧,本发明在此不做限定。获取的时机可以是基于用户的操作指令,也可以是当视频的场景满足预设的要求或条件。Specifically, the lighting information includes lighting intensity and lighting angle. In the embodiment of the present invention, the target picture is decomposed to calculate the lighting intensity and lighting angle of the target picture, respectively, to obtain the overall lighting information of the target picture. The target picture may be a certain frame in the video or a single picture frame captured from the camera, which is not limited in the present invention. The acquisition timing may be based on a user's operation instruction, or when the scene of the video meets a preset requirement or condition.
在本步骤中,获取目标图片之后,将该目标图片分解成第一预设数量个由预设尺寸组成的小正方形网格元素,每个小正方形网格元素作为一张子图片,其中,所述子图片由第二预设数量的像素组成。举例来说,可以把目标图片分解成C列R行(其中C、R都是整数,且C≥2,R≥2),得到多张子图片,每个子图片由p个像素组成。In this step, after obtaining the target picture, the target picture is decomposed into a first preset number of small square grid elements composed of a preset size, and each small square grid element is used as a sub-picture, where The sub-picture is composed of a second preset number of pixels. For example, the target picture can be decomposed into C columns and R rows (where C and R are integers, and C≥2, R≥2) to obtain multiple sub-pictures, each of which consists of p pixels.
作为本实施例的可选实施方式,由于光照信息不涉及颜色问题,因此对于彩色的图片,在进行分解之前,可以对目标图片进行灰度提取,也可以避免颜色会光照强度获取的影响。As an optional implementation manner of this embodiment, since the lighting information does not involve color problems, for a color picture, before performing decomposition, the target picture can be extracted with grayscale, and the influence of the color on the light intensity acquisition can also be avoided.
S102,获取所述子图片的几何中心,根据所述子图片的图像矩确定光强加权中心,基于所述光强加权中心和所述子图片的几何中心确定所述子图片的光照角度。S102: Obtain a geometric center of the sub-picture, determine a light intensity weighting center according to the image moment of the sub-picture, and determine an illumination angle of the sub-picture based on the light intensity weighting center and the geometric center of the sub-picture.
对于处于第一预设范围的子图片,需要计算每一个该子图片的图像矩,来确定其对应的光强加权中心。图像矩是一个从数字图形中计算出来的矩集,通常描述了该图像的全局特征,并提供了大量的关于该图像不同类型的几何特征信息,比如大小、位置、方向及形状等,例如:一阶矩与形状有关;二阶矩显示了曲线围绕直线平均值的扩展程度;三阶矩则是关于平均值的对称性测量;由二阶矩和三阶矩可以导出一组共七个不变矩,不变矩是图像的统计特征,满足平移、伸缩、旋转均不变的不变形,在图像处理中,几何不变矩可以作为一个重要的特征来表示物体,可以据此特征来对图像进行分类等操作。上述一阶矩、二阶矩、三阶矩以及由二阶矩和三阶矩导出的七个不变矩都有具体的计算公式,根据这些公式确定光强加权中心属于本领域的技术常识,本发明在此不做赘述。For the sub-pictures in the first preset range, the image moment of each sub-picture needs to be calculated to determine the corresponding light intensity weighting center. An image moment is a set of moments calculated from digital graphics. It usually describes the global features of the image and provides a lot of information about the different types of geometric features of the image, such as size, position, direction, and shape. For example: First-order moments are related to shape; second-order moments show the degree of expansion of a curve around a straight line average; third-order moments are a measure of the symmetry of the mean; second- and third-order moments can be used to derive a set of seven Moment invariant and invariant moment are the statistical characteristics of the image, which meet the invariant invariance of translation, expansion and rotation. In image processing, geometric invariant moment can be used as an important feature to represent an object. Classify images. The above-mentioned first, second, third and third moments and the seven invariant moments derived from the second and third moments all have specific calculation formulas. According to these formulas, determining the light intensity weighting center belongs to common technical knowledge in the field. The present invention will not repeat them here.
如图2所示,通过图像矩确定了光强加权中心g,其在子图像中的坐标位置为(x g,y g)。 As shown in FIG. 2, the light intensity weighting center g is determined by the image moment, and its coordinate position in the sub-image is (x g , y g ).
如图2所示,确定子图片中几何中心c的坐标位置(x c,y c),并将该几何中心c的坐标位置与步骤S102中确定的光强加权中心g的坐标位 置进行比较,从几何中心c到加权中心g的向量
Figure PCTCN2018096694-appb-000001
的方向即是受到光照影响的结果,为我们提供了该子图片所在目标图片位置的局部光效指示。具体地,向量
Figure PCTCN2018096694-appb-000002
代表光照的方向,d代表向量cg的模
Figure PCTCN2018096694-appb-000003
α代表子图片的光照角度,由于tanα=(y g-y c)/(x g-x c),则α=Arctan((y g-y c)/(x g-x c)),即通过几何中心和加权中心的坐标计算得到该子图片的光照角度。
As shown in FIG. 2, determining the coordinate position (x c , y c ) of the geometric center c in the sub-picture, and comparing the coordinate position of the geometric center c with the coordinate position of the light intensity weighted center g determined in step S102. Vector from geometric center c to weighted center g
Figure PCTCN2018096694-appb-000001
The direction of is the result of being affected by light, which provides us with a local light effect indication of the target picture location where the sub-picture is located. Specifically, vectors
Figure PCTCN2018096694-appb-000002
Represents the direction of the light, and d represents the modulus of the vector cg
Figure PCTCN2018096694-appb-000003
α represents the lighting angle of the sub-picture. Since tanα = (y g -y c ) / (x g -x c ), then α = Arctan ((y g -y c ) / (x g -x c )), that is, The illumination angle of the sub-picture is calculated by the coordinates of the geometric center and the weighted center.
作为本实施例的可选实施方式,在确定了每个子图片的光照角度之后,可以根据子图片的光照角度向量判断该子图片的光照是否来自于地面,若该子图片的光照角度来自于地面,说明该光照不属于当前场景,则将所述子图片剔除。As an optional implementation of this embodiment, after determining the lighting angle of each sub-picture, it can be determined whether the lighting of the sub-picture comes from the ground according to the lighting angle vector of the sub-picture. If the lighting angle of the sub-picture comes from the ground , Indicating that the lighting does not belong to the current scene, the sub-picture is deleted.
S103,对所述子图片进行灰度处理,根据所述子图片上各点的灰度值得到所述子图片的光照强度。S103. Perform grayscale processing on the sub-picture, and obtain a light intensity of the sub-picture according to a gray-scale value of each point on the sub-picture.
由于光照角度、光照强度等与子图片中像素点中色彩的饱和度、色域信息关联相对较小,且为了能够提高后续的处理效率,我们将各子图片进行灰度处理,使得每张子图片上各像素点只保留一个0-255的灰度值。Because the light angle and light intensity are relatively less related to the color saturation and color gamut information of the pixels in the sub-pictures, and in order to improve the subsequent processing efficiency, we perform gray-scale processing on each sub-picture so that each sub-picture Each pixel in the picture only retains a gray value of 0-255.
在进行本步骤之前,可以准备数据样本集,训练一个光照强度模型。该数据样本集由若干图片组成,每个图片携带有该图片上各像素点的灰度值以及该图片对应的光照强度。在训练的过程中,将每个图片上各像素点的灰度值作为模型的输入值,将模型的输出值与该图片对应的光照强度进行对比,对模型进行不断优化。Before performing this step, you can prepare a data sample set and train a light intensity model. The data sample set is composed of several pictures, and each picture carries the gray value of each pixel on the picture and the light intensity corresponding to the picture. In the training process, the gray value of each pixel on each picture is used as the input value of the model, and the output value of the model is compared with the corresponding light intensity of the picture to continuously optimize the model.
在本步骤中,将所述子图片上各点的灰度值输入预先训练的光照强度模型中,该光照强度模型通过对子图片各点灰度值进行分析处理,得到该子图片的光照强度。In this step, the gray value of each point on the sub-picture is input into a pre-trained light intensity model, and the light intensity model obtains the light intensity of the sub-picture by analyzing and processing the gray value of each point of the sub-picture. .
S104,获取所述子图片对应的光照强度权重值,根据所述子图片的光照强度和所述子图片对应的光照强度权重值,得到所述目标图片的光照强度。S104. Obtain a light intensity weight value corresponding to the sub-picture, and obtain the light intensity of the target picture according to the light intensity of the sub-picture and the light intensity weight value corresponding to the sub-picture.
具体地,可以通过如下子步骤获取子图片对应的光照强度权重值。Specifically, the light intensity weight value corresponding to the sub-picture can be obtained through the following sub-steps.
S1041,获取所述子图片在所述目标图片中的位置坐标。S1041: Obtain position coordinates of the sub-picture in the target picture.
对于每个子图片,确定其在目标图片中的坐标位置(x i,y i),其中,i为子图片在目标图片中的序号,举例来说,子图片的第一预设数量为n,可以将n个子图片按照从1到n进行编号,i≤n。由于子图片是由若干像 素点构成的,需要选择最能够代表该子图片光照强度的像素点,将该点的坐标作为该子图片的坐标位置。可选地,在步骤S103中,光照强度模型在输出子图片的光照强度时,也可以同时输出最接近该光照强度的灰度值对应的像素点坐标。 For each sub-picture, determine its coordinate position (x i , y i ) in the target picture, where i is the sequence number of the sub-picture in the target picture, for example, the first preset number of sub-pictures is n, You can number n sub-pictures from 1 to n, i≤n. Since the sub-picture is composed of several pixels, it is necessary to select a pixel that can best represent the light intensity of the sub-picture, and use the coordinates of the point as the coordinate position of the sub-picture. Optionally, in step S103, when the light intensity model outputs the light intensity of the sub-picture, it may simultaneously output the coordinates of the pixel point corresponding to the gray value closest to the light intensity.
S1042,根据所述子图片的位置坐标以及所述子图片的尺寸确定所述子图片对应的光照强度权重值。S1042. Determine a light intensity weight value corresponding to the sub-picture according to a position coordinate of the sub-picture and a size of the sub-picture.
具体地,可以通过如下公式计算每个子图片对应的光照强度权重值。Specifically, the light intensity weight value corresponding to each sub-picture can be calculated by the following formula.
F i=F(x i)*F(y i),
Figure PCTCN2018096694-appb-000004
F i = F (x i ) * F (y i ),
Figure PCTCN2018096694-appb-000004
其中,Fi为光照强度权重值,S i为子图片的长度。 Wherein, Fi is the weight value of the light intensity, S i is the length of the sub picture.
根据上述公式可以计算得到各个子图片对应的光照强度权重值。According to the above formula, the light intensity weight value corresponding to each sub-picture can be calculated.
在得到每个子图片对应的光照强度权重值之后,可以通过如下公式计算目标图片的光照强度。After obtaining the light intensity weight value corresponding to each sub-picture, the light intensity of the target picture can be calculated by the following formula.
Figure PCTCN2018096694-appb-000005
Figure PCTCN2018096694-appb-000005
其中,L为目标图片的光照强度,L i为步骤S103得到的各子图片的光照强度。 Wherein, L is the light intensity of the target picture, and L i is the light intensity of each sub-picture obtained in step S103.
S105,对所述子图片光照角度进行计算,得到所述目标图片的光照角度。S105. Calculate the illumination angle of the sub-picture to obtain the illumination angle of the target picture.
具体地,可以通过如下方式得到光照角度。确定各所述子图片对应的光照角度权重值;根据所述光照角度权重值对各所述子图片的光照角度的向量进行加权求和,计算得到所述目标图片的光照角度。Specifically, the illumination angle can be obtained as follows. Determining a lighting angle weight value corresponding to each of the sub-pictures; weighting and summing a vector of lighting angles of each of the sub-pictures according to the lighting angle weight value to calculate a lighting angle of the target picture.
具体地,可以根据每个子图片对应的光照角度的向量模、和/或光照角度、和/或之前的经验确定每个子图片对应的权重值。Specifically, a weight value corresponding to each sub-picture may be determined according to a vector module of a lighting angle corresponding to each sub-picture, and / or a lighting angle, and / or previous experience.
可选地,首先,可以根据各子图片对应的权重值和各子图片对应的光照角度的向量计算置信因子,当置信因子小于预设值时,则对上述权重值进行调整。具体地,所述置信因子为所述光照角度的向量和与所述权重值加和之比,置信因子能够表明权重值是否与向量趋势相匹配,置信因子越趋近于1,这说明权重值越合适。当置信因子小于预设值时,说明确定的权重值不合适,此时需要对权重值进行调整,调整之后再根据上述方法计算新的置信因子进行检验,直至新的置信因子能够大于预设阈值。Optionally, first, a confidence factor may be calculated according to a weight value corresponding to each sub-picture and a vector of an illumination angle corresponding to each sub-picture, and when the confidence factor is less than a preset value, the above-mentioned weight value is adjusted. Specifically, the confidence factor is a ratio of a vector sum of the illumination angle and a sum of the weight values. The confidence factor can indicate whether the weight value matches the trend of the vector. The closer the confidence factor is to 1, this indicates that the weight value The more appropriate. When the confidence factor is less than the preset value, it means that the determined weight value is inappropriate. At this time, the weight value needs to be adjusted. After the adjustment, a new confidence factor is calculated and tested according to the above method until the new confidence factor can be greater than the preset threshold. .
其次,根据权重值确定各子图片的光照角度的向量的长度,之后再对每个长度确定的向量进行加和,得到目标图片对应的光照角度的向量,根 据该目标图片对应的光照角度的向量,即可按照步骤S102中介绍方法得到目标图片对应的光照角度。Secondly, the length of the vector of the lighting angle of each sub-picture is determined according to the weight value, and then the vectors determined by each length are added to obtain the vector of the lighting angle corresponding to the target picture, and the vector of the lighting angle corresponding to the target picture , To obtain the illumination angle corresponding to the target picture according to the method described in step S102.
作为本发明实施例的另一可选实施方式,当子图片尺寸足够小时,可以认为各子图片对应的权重值是相同的,提高光照角度优化的效率。具体地,判断各子图片的尺寸是否小于预设阈值,若小于预设阈值,则不需要考虑各子图片对应的权重值,直接对各子图片的光照角度的向量进行求和,得到所述目标图片的光照角度。可选地,可以对得到的光照角度进行统计修正,得到更精准的光照角度。As another optional implementation of the embodiment of the present invention, when the size of the sub-picture is sufficiently small, it can be considered that the weight values corresponding to the sub-pictures are the same, which improves the efficiency of the optimization of the illumination angle. Specifically, it is determined whether the size of each sub-picture is smaller than a preset threshold. If it is smaller than the preset threshold, the weight value corresponding to each sub-picture need not be considered, and the vector of the illumination angle of each sub-picture is directly added to obtain the The lighting angle of the target picture. Optionally, the obtained lighting angle can be statistically corrected to obtain a more accurate lighting angle.
本发明实施例提供的光照信息的优化方法,通过获取子图片光照强度和光照角度,并分别将各子图片的光照强度、光照角度进行计算,得到整个图片的光照信息,并据此对虚拟对象进行光影效果的渲染,使得虚拟对象能够与其所处的场景环境相匹配。The method for optimizing the illumination information provided by the embodiment of the present invention obtains the illumination information of the entire picture by obtaining the illumination intensity and illumination angle of the sub-picture, and calculating the illumination intensity and illumination angle of each sub-picture respectively, and the virtual object is obtained accordingly. Render light and shadow effects so that virtual objects can match their scene environment.
图4为本发明实施例提供的光照信息的优化装置结构图。如图4所示,该装置具体包括:获取模块100、确定模块200、处理模块300、第一计算模块400和第二计算模块500。其中,FIG. 4 is a structural diagram of an apparatus for optimizing illumination information according to an embodiment of the present invention. As shown in FIG. 4, the device specifically includes: an acquisition module 100, a determination module 200, a processing module 300, a first calculation module 400 and a second calculation module 500. among them,
获取模块100,用于获取目标图片,将所述目标图片分解成第一预设数量的子图片;其中,所述子图片由第二预设数量的像素组成;确定模块200,用于获取所述子图片的几何中心,根据所述子图片的图像矩确定光强加权中心,基于所述光强加权中心和所述子图片的几何中心确定所述子图片的光照角度;处理模块300,用于对所述子图片进行灰度处理,根据所述子图片上各点的灰度值得到所述子图片的光照强度;第一计算模块400,用于获取所述子图片对应的光照强度权重值,根据所述子图片的光照强度和所述子图片对应的光照强度权重值,得到所述目标图片的光照强度;第二计算模块500,用于对所述子图片的光照角度进行计算,得到所述目标图片的光照角度。The obtaining module 100 is configured to obtain a target picture and decompose the target picture into a first preset number of sub-pictures; wherein the sub-picture is composed of a second preset number of pixels; a determining module 200 is configured to obtain all The geometric center of the sub-picture is determined according to the image moment of the sub-picture. The light-weighted center is determined based on the light-intensity weighted center and the geometric center of the sub-picture. The illumination angle of the sub-picture is determined. The processing module 300 uses Performing grayscale processing on the sub-picture, and obtaining the light intensity of the sub-picture according to the gray value of each point on the sub-picture; a first calculation module 400, configured to obtain a light intensity weight corresponding to the sub-picture Value to obtain the light intensity of the target picture according to the light intensity of the sub-picture and the light intensity weight value corresponding to the sub-picture; a second calculation module 500 is configured to calculate the light angle of the sub-picture, Obtain the illumination angle of the target picture.
本发明实施例提供的光照信息的优化装置具体用于执行图1和图2所示实施例提供的所述方法,其实现原理、方法和功能用途等与图1和图2所示实施例类似,在此不再赘述。The apparatus for optimizing the illumination information provided by the embodiment of the present invention is specifically configured to execute the method provided by the embodiment shown in FIG. 1 and FIG. 2, and its implementation principles, methods, and functional uses are similar to the embodiments shown in FIG. 1 and FIG. 2. , Will not repeat them here.
图5为本发明实施例提供的光照信息的优化装置结构图。如图5所示, 该装置具体包括::获取模块100、确定模块200、处理模块300、第一计算模块400和第二计算模块500。其中,FIG. 5 is a structural diagram of an apparatus for optimizing illumination information according to an embodiment of the present invention. As shown in FIG. 5, the device specifically includes: an acquisition module 100, a determination module 200, a processing module 300, a first calculation module 400, and a second calculation module 500. among them,
获取模块100,用于获取目标图片,将所述目标图片分解成第一预设数量的子图片;其中,所述子图片由第二预设数量的像素组成;确定模块200,用于获取所述子图片的几何中心,根据所述子图片的图像矩确定光强加权中心,基于所述光强加权中心和所述子图片的几何中心确定所述子图片的光照角度;处理模块300,用于对所述子图片进行灰度处理,根据所述子图片上各点的灰度值得到所述子图片的光照强度;第一计算模块400,用于获取所述子图片对应的光照强度权重值,根据所述子图片的光照强度和所述子图片对应的光照强度权重值,得到所述目标图片的光照强度;第二计算模块500,用于对所述子图片的光照角度进行计算,得到所述目标图片的光照角度。The obtaining module 100 is configured to obtain a target picture and decompose the target picture into a first preset number of sub-pictures; wherein the sub-picture is composed of a second preset number of pixels; a determining module 200 is configured to obtain all The geometric center of the sub-picture is determined according to the image moment of the sub-picture, and the light-weighted center is determined based on the light-weighted center and the geometric center of the sub-picture. The illumination angle of the sub-picture is determined. The processing module 300 uses Performing grayscale processing on the sub-picture, and obtaining the light intensity of the sub-picture according to the gray value of each point on the sub-picture; a first calculation module 400, configured to obtain a light intensity weight corresponding to the sub-picture Value to obtain the light intensity of the target picture according to the light intensity of the sub-picture and the light intensity weight value corresponding to the sub-picture; a second calculation module 500 is configured to calculate the light angle of the sub-picture, Obtain the illumination angle of the target picture.
进一步地,处理模块300具体用于,对所述子图片进行灰度处理,使得所述子图片上各点只保留一个0-255的灰度值;将所述子图片上各点的灰度值输入预先训练的光照强度模型中,得到所述子图片的光照强度。Further, the processing module 300 is specifically configured to perform grayscale processing on the sub-picture, so that each point on the sub-picture retains only a gray-scale value of 0-255; The value is input into a pre-trained light intensity model to obtain the light intensity of the sub-picture.
进一步地,第一计算模块400包括:获取单元410和确定单元42。其中,Further, the first calculation module 400 includes: an obtaining unit 410 and a determining unit 42. among them,
获取单元410,用于获取所述子图片在所述目标图片中的位置坐标;确定单元420,用于根据所述子图片的位置坐标以及所述子图片的尺寸确定所述子图片对应的光照强度权重值。The obtaining unit 410 is configured to obtain position coordinates of the sub-picture in the target picture; and the determining unit 420 is used to determine the lighting corresponding to the sub-picture according to the position coordinates of the sub-picture and the size of the sub-picture Strength weight value.
进一步地,第一计算模块还400包括:判断单元430和求和单元440。其中,Further, the first calculation module 400 further includes: a determining unit 430 and a summing unit 440. among them,
判断单元430,用于判断所述子图片的尺寸是否小于预设阈值;求和单元440,用于若小于预设阈值,则对各所述子图片的光照角度的向量进行求和,得到所述目标图片的光照角度。A judging unit 430 is configured to determine whether the size of the sub-picture is smaller than a preset threshold; and a summing unit 440 is configured to sum the vectors of the illumination angles of the sub-pictures if the sub-picture is smaller than the preset threshold to obtain the The lighting angle of the target picture.
进一步地,第二计算模块500还用于,确定各所述子图片对应的光照角度权重值;根据所述光照角度权重值对各所述子图片的光照角度的向量进行加权求和,计算得到所述目标图片的光照角度。Further, the second calculation module 500 is further configured to determine a lighting angle weight value corresponding to each of the sub-pictures; and perform weighted summation on a vector of lighting angles of each of the sub-pictures according to the lighting angle weight value to obtain a calculation The illumination angle of the target picture.
本发明实施例提供的光照信息的优化装置具体用于执行图1-图3所示实施例提供的所述方法,其实现原理、方法和功能用途和图1-图3所示实施例类似,在此不再赘述。The apparatus for optimizing the illumination information provided by the embodiment of the present invention is specifically configured to execute the method provided by the embodiment shown in FIG. 1 to FIG. 3, and its implementation principles, methods, and functional uses are similar to the embodiment shown in FIG. 1-3, I will not repeat them here.
上述这些本发明实施例的光照信息的优化装置可以作为其中一个软件或者硬件功能单元,独立设置在上述电子设备中,也可以作为整合在处理器中的其中一个功能模块,执行本发明实施例的光照信息的优化方法。The above-mentioned apparatus for optimizing illumination information in the embodiments of the present invention may be used as one of the software or hardware functional units, which may be independently provided in the above-mentioned electronic device, or may be used as one of the functional modules integrated in the processor to execute the embodiments of the present invention. Optimization method of lighting information.
图6为执行本发明方法实施例提供的光照信息的优化方法的电子设备的硬件结构示意图。根据图6所示,该电子设备包括:FIG. 6 is a schematic diagram of a hardware structure of an electronic device that executes a method for optimizing illumination information provided by a method embodiment of the present invention. According to FIG. 6, the electronic device includes:
一个或多个处理器610以及存储器620,图6中以一个处理器610为例。执行所述的光照信息的优化方法的设备还可以包括:输入装置630和输出装置630。One or more processors 610 and a memory 620. One processor 610 is taken as an example in FIG. 6. The device for performing the method for optimizing the illumination information may further include an input device 630 and an output device 630.
处理器610、存储器620、输入装置630和输出装置640可以通过总线或者其他方式连接,图6中以通过总线连接为例。The processor 610, the memory 620, the input device 630, and the output device 640 may be connected through a bus or other methods. In FIG. 6, the connection through the bus is taken as an example.
存储器620作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本发明实施例中的所述光照信息的优化方法对应的程序指令/模块。处理器610通过运行存储在存储器620中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现所述光照信息的优化方法。The memory 620 is a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer executable programs, and modules, such as the method for optimizing illumination information in the embodiment of the present invention. Corresponding program instructions / modules. The processor 610 executes various functional applications and data processing of the server by running non-volatile software programs, instructions, and modules stored in the memory 620, that is, an optimization method for implementing the illumination information.
存储器620可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据本发明实施例提供的光照信息的优化装置的使用所创建的数据等。此外,存储器620可以包括高速随机存取存储器620,还可以包括非易失性存储器620,例如至少一个磁盘存储器620件、闪存器件、或其他非易失性固态存储器620件。在一些实施例中,存储器620可选包括相对于处理器66远程设置的存储器620,这些远程存储器620可以通过网络连接至所述光照信息的优化装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 620 may include a storage program area and a storage data area, where the storage program area may store an operating system and an application program required for at least one function; the storage data area may store the use of an optimization device for lighting information provided according to an embodiment of the present invention Data created, etc. In addition, the memory 620 may include a high-speed random access memory 620, and may further include a non-volatile memory 620, such as at least one magnetic disk memory 620, a flash memory device, or other non-volatile solid-state memory 620. In some embodiments, the memory 620 may optionally include a memory 620 remotely set relative to the processor 66, and these remote memories 620 may be connected to the optimization device of the lighting information through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
输入装置630可接收输入的数字或字符信息,以及产生与光照信息的优化装置的用户设置以及功能控制有关的键信号输入。输入装置630可包括按压模组等设备。The input device 630 may receive inputted numeric or character information, and generate key signal inputs related to user settings and function control of the optimized device for lighting information. The input device 630 may include a device such as a pressing module.
所述一个或者多个模块存储在所述存储器620中,当被所述一个或者多个处理器610执行时,执行所述光照信息的优化方法。The one or more modules are stored in the memory 620, and when executed by the one or more processors 610, perform an optimization method of the illumination information.
本发明实施例的电子设备以多种形式存在,包括但不限于:The electronic devices in the embodiments of the present invention exist in various forms, including but not limited to:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。(1) Mobile communication equipment: This type of equipment is characterized by mobile communication functions, and its main goal is to provide voice and data communication. Such terminals include: smart phones (such as iPhone), multimedia phones, feature phones, and low-end phones.
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。(2) Ultra-mobile personal computer equipment: This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has the characteristics of mobile Internet access. Such terminals include: PDA, MID and UMPC devices, such as iPad.
(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载导航设备。(3) Portable entertainment equipment: This type of equipment can display and play multimedia content. Such devices include: audio and video players (such as iPod), handheld game consoles, e-books, as well as smart toys and portable car navigation devices.
(4)服务器。(4) The server.
(5)其他具有数据交互功能的电子装置。(5) Other electronic devices with data interaction function.
具体的,本实施例中的电子设备可以是一种带有支撑结构的手机,参见图7-12,该手机可以用于上述实施例中的光照信息的优化方法中的目标图片的获取。该手机通过在后盖设置支撑板,可以令手机平稳支撑,获取目标图像和视频时足够稳定,从而获取高质量的目标图片,为目标图片的后续处理打下基础。同时,手机自带支撑板避免了用户使用带支架的手机壳和外粘的支架,方便了手机散热,提高了美观度,解决了用户长时间手持手机导致的疲劳问题。Specifically, the electronic device in this embodiment may be a mobile phone with a support structure. Referring to FIGS. 7-12, the mobile phone may be used to obtain a target picture in the method for optimizing illumination information in the foregoing embodiment. The mobile phone is provided with a support plate on the back cover, which can make the mobile phone support stably, and is stable enough when acquiring target images and videos, thereby obtaining high-quality target pictures, and laying a foundation for subsequent processing of the target pictures. At the same time, the mobile phone's built-in support plate prevents the user from using a mobile phone case with a stand and an externally sticky stand, which facilitates the heat dissipation of the mobile phone, improves the aesthetics, and solves the fatigue caused by the user holding the mobile phone for a long time.
如图7所示,所述手机包括具有显示屏的前面板(图中未示出)和手机后盖1000;所述手机后盖1000的中下部设有一凹陷区1100,所述凹陷区1100内安装有与所述凹陷区1100形状尺寸相适配的支撑板2000;所述支撑板2000的上端与所述凹陷区1100相铰接,以使所述支撑板2000能够转动至与所述手机后盖1000呈一预设角度,具体的,本实施例的支撑板2000的上端可以具有转轴,凹陷部的上端具有与转轴相适配的轴孔,通过转轴和轴孔的配合以实现支撑板2000的可转动,当然其他结构较简单的转动机构也在本实施例的可选范围之内。As shown in FIG. 7, the mobile phone includes a front panel with a display screen (not shown in the figure) and a mobile phone back cover 1000; a middle and lower part of the mobile phone back cover 1000 is provided with a recessed area 1100, and the recessed area 1100 is inside A support plate 2000 adapted to the shape and size of the recessed area 1100 is installed; the upper end of the support plate 2000 is hinged to the recessed area 1100 so that the support plate 2000 can be rotated to the mobile phone back cover 1000 is a preset angle. Specifically, the upper end of the support plate 2000 in this embodiment may have a rotating shaft, and the upper end of the recessed portion has a shaft hole adapted to the rotating shaft. The cooperation between the rotating shaft and the shaft hole is used to realize the support plate 2000. It can be rotated, of course, other rotating mechanisms with simpler structures are also within the optional range of this embodiment.
另外,为了实现支撑板2000下端与手机的可拆卸连接,本实施例在所述支撑板2000的下端设置有一连接件3000,所述连接件3000一端与所述支撑板2000软连接,另一端具有与手机充电接口4000形状尺寸相适配的封堵部310,所述封堵部310与所述手机充电接口4000插接配合,该结构不仅实现了支撑板2000下端与手机的可拆卸连接,而且还能对充 电接口4000起到保护作用,提高了支撑板2000的功能性。具体的,本实施例的所述连接件3000由橡胶制成,采用橡胶不仅具有良好的形变能力,而且成本较低,易于实现。In addition, in order to realize the detachable connection between the lower end of the support plate 2000 and the mobile phone, in this embodiment, a connection piece 3000 is provided at the lower end of the support plate 2000. One end of the connection piece 3000 is soft-connected to the support plate 2000, and the other end has A plugging portion 310 adapted to the shape and size of the mobile phone charging interface 4000. The plugging portion 310 is mated with the mobile phone charging interface 4000. This structure not only realizes the detachable connection between the lower end of the support plate 2000 and the mobile phone, but also It can also protect the charging interface 4000 and improve the functionality of the support plate 2000. Specifically, the connecting member 3000 in this embodiment is made of rubber. The use of rubber not only has good deformation ability, but also has low cost and is easy to implement.
本实施例在手机后盖的凹陷区内设有可转动的支撑板,可以对手机起到侧立支撑作用,满足用户的使用要求,无需在手机上套设手机壳,避免了手机壳对手机散热的影响。而支撑板的下端通过与手机充电接口的连接实现自身的固定,而且还能够起到保护充电接口的作用,提升了支撑板的功能性,另外,本实施例的支撑板的展开也十分方便,仅需要通过将封堵部从手机充电接口拔出即可。In this embodiment, a rotatable support plate is provided in the recessed area of the back cover of the mobile phone, which can support the mobile phone side by side to meet the user's requirements. There is no need to set a mobile phone case on the mobile phone, which prevents the mobile phone case from affecting the mobile phone The effect of heat dissipation. The lower end of the support plate is fixed by connecting with the charging interface of the mobile phone, and it can also protect the charging interface and improve the functionality of the support plate. In addition, the expansion of the support plate in this embodiment is also very convenient. It only needs to be pulled out from the charging port of the mobile phone.
另外,现有的支撑板无法起到固定手机的作用。因此发明人对上述支撑板结构做出了进一步改进。In addition, the existing support plate cannot play the role of fixing the mobile phone. Therefore, the inventor made further improvements to the above-mentioned support plate structure.
结合附图8-12所示,本实施例的所述支撑板2000具体包括第一板体2100、第二板体2200、第一连接板2300、第二连接板2400以及连杆2500,所述第一板体2100、第一连接板2300、第二连接板2400和第二板体2200依次连接形成一板体;所述第一板体2100具有相对的第一端和第二端(即图示中的上端和下端),所述第二板体2200具有相对的第三端和第四端(即图示中的上端和下端),所述连杆2500包括第一杆体2510和第二杆体2520,所述第一杆体2510的相对两端分别与所述第一端和所述第三端相铰接,所述第二杆体2520相对两端分别与所述第二端和所述第四端相铰接,其中所述第一杆体2510和所述第二杆体2520均设置在所述支撑板远离所述前面板的一侧。As shown in FIGS. 8-12, the support plate 2000 in this embodiment specifically includes a first plate body 2100, a second plate body 2200, a first connection plate 2300, a second connection plate 2400, and a connecting rod 2500. The first plate body 2100, the first connection plate 2300, the second connection plate 2400, and the second plate body 2200 are sequentially connected to form a plate body. The first plate body 2100 has opposite first ends and second ends (i.e., FIG. (The upper and lower ends shown), the second plate body 2200 has opposite third and fourth ends (ie, the upper and lower ends in the figure), and the link 2500 includes a first rod body 2510 and a second rod body 2520, opposite ends of the first rod body 2510 are hinged to the first end and the third end, respectively, and opposite ends of the second rod body 2520 are respectively connected to the second end and the fourth end Phase articulation, wherein the first rod body 2510 and the second rod body 2520 are both disposed on a side of the support plate away from the front panel.
需要说明的是,本实施例的连杆2500的数量也可以为一个,一个连杆2500的两端分别与第一端和第二端相连接,或者,一个连杆2500的两端分别与第三端和第四端相连接,又或者,一个连杆2500的一端与第一板体2100一侧的中间相连,另一端与第二板体2200一侧的中间相连,此时,第一连接板2300和第二连接板2400为分体结构,即第一连接板2300和第二连接板2400均由两个板状件构成,一个连杆2500的上方为第一连接板2300和第二连接板2400的一个板状件,连杆2500的下方为第一连接板2300和第二连接板2400的另一板状件。It should be noted that the number of the connecting rods 2500 in this embodiment may also be one, and two ends of one connecting rod 2500 are respectively connected to the first and second ends, or two ends of one connecting rod 2500 are respectively connected to the first and second ends. The three ends are connected to the fourth end, or one end of a link 2500 is connected to the middle of one side of the first plate 2100, and the other end is connected to the middle of one side of the second plate 2200. At this time, the first connection The plate 2300 and the second connection plate 2400 are separate structures, that is, the first connection plate 2300 and the second connection plate 2400 are each composed of two plate-shaped members. Above a link 2500 is the first connection plate 2300 and the second connection One plate-like member of the plate 2400, and below the link 2500 is another plate-like member of the first connection plate 2300 and the second connection plate 2400.
具体的,本实施例的所述第一连接板2300和所述第二连接板2400位于所述第一板体2100和所述第二板体2200之间,所述第一连接板2300 一侧与所述第一板体2100一侧相铰接,所述第二连接板2400一侧与所述第二板体2200一侧相铰接,所述第一连接板2300另一侧与所述第二连接板2400另一侧相铰接,其中所述第一连接板2300和所述第二连接板2400设置在所述支撑板2000靠近所述前面板的一侧。Specifically, the first connection plate 2300 and the second connection plate 2400 in this embodiment are located between the first plate body 2100 and the second plate body 2200, and one side of the first connection plate 2300 One side of the first plate body 2100 is hinged, one side of the second connection plate 2400 is hinged with one side of the second plate body 2200, and the other side of the first connection plate 2300 is connected to the second plate The other side of the connection plate 2400 is hinged, wherein the first connection plate 2300 and the second connection plate 2400 are disposed on a side of the support plate 2000 near the front panel.
如图9-11所示,本实施例的所述第一板体2100设有沿其厚度方向设置的第一部分2110,所述第一部分2110位于所述第一板体2100与所述连杆2500的铰接处和所述第一板体2100与所述第一连接板2300的铰接处之间;所述第二板体2200设有沿其厚度方向设置的第二部分2210,所述第二部分2210位于所述第二板体2200与连杆2500的铰接处和所述第二板体2200与所述第二连接板2400的铰接处之间;所述第一部分2110、第二部分2210、第一连接板2300、第二连接板2400以及连杆2500形成五杆体机构。As shown in FIGS. 9-11, the first plate body 2100 in this embodiment is provided with a first portion 2110 disposed along a thickness direction thereof, and the first portion 2110 is located in the first plate body 2100 and the connecting rod 2500. Between the hinge portion of the first plate body 2100 and the hinge portion of the first connection plate 2300; the second plate body 2200 is provided with a second portion 2210 disposed along the thickness direction of the second plate body 2200, and the second portion 2210 is located between the hinge between the second plate body 2200 and the connecting rod 2500 and the hinge between the second plate body 2200 and the second connecting plate 2400; the first portion 2110, the second portion 2210, the first portion A connecting plate 2300, a second connecting plate 2400, and a connecting rod 2500 form a five-bar mechanism.
上述结构通过第一部分2110、第二部分2210、第一连接板2300、第二连接板2400以及连杆2500形成五杆体机构,在需要支撑时,将整个支撑板2000结构转动至一定角度,而由于第一杆体2510和第二杆体2520均设置在支撑板2000远离所述前面板的一侧,第一连接板2300和第二连接板2400设置在支撑板2000靠近所述前面板的一侧,因此在支撑板2000支撑面给到向远离前面板方向的力时,五连杆2500机构处于第一死点位置,第一板体2100和第一板体2100、第一连接板2300和第二连接板2400无法转动,只能通过向靠近前面板方向的外力打开死点位置,能够保证支撑板2000始终为一个板体结构,对手机起到稳定的支撑作用;而当通过向靠近前面板方向的外力打开死点位置时,可以将第一连板体和第二板体2200折叠,此时第一连接板2300和第一连接板2300转动至第二死点位置,第一连接板2300和第二连接板2400可以形成一个手指收容部,用于将手指插入到手指收容部内,可以将手机固定在人手上,避免用户在使用过程中出现拥挤和碰撞,而造成手机摔落,该结构的支撑板2000不仅起到支撑作用,还起到手机的固定作用,大大提高了其功能性。The above structure forms a five-bar mechanism through the first portion 2110, the second portion 2210, the first connection plate 2300, the second connection plate 2400, and the connecting rod 2500. When support is needed, the entire support plate 2000 structure is rotated to a certain angle. The first rod body 2510 and the second rod body 2520 are both disposed on a side of the support plate 2000 away from the front panel, and the first connection plate 2300 and the second connection plate 2400 are disposed on a side of the support plate 2000 near the front panel. When the support surface of the support plate 2000 gives a force away from the front panel, the five-link 2500 mechanism is at the first dead point position. The first plate 2100 and the first plate 2100, the first connection plate 2300, and the second connection The plate 2400 cannot be rotated, and the dead point position can only be opened by an external force near the front panel, which can ensure that the support plate 2000 is always a plate structure, which provides a stable support for the mobile phone. When the external force is used to open the dead point position, the first connecting plate and the second plate 2200 can be folded. At this time, the first connecting plate 2300 and the first connecting plate 2300 are rotated to the second dead point and the first connecting plate 2300. The second connecting plate 2400 can form a finger receiving portion for inserting a finger into the finger receiving portion, and can fix the mobile phone on a human hand to prevent the user from being crowded and colliding during use, causing the mobile phone to fall. The support plate 2000 not only plays a supporting role, but also plays a role of fixing the mobile phone, which greatly improves its functionality.
需要说明的是,上述的两个构件之间“相铰接”的实现方式可以是在一个构件上设有轴孔,另一构件上设有与所述轴孔相配合的转轴,转轴和轴孔共同形成一个转动机构,以使得两个构件可以相对转动。It should be noted that the implementation of the "phase articulation" between the two components described above may be provided with a shaft hole in one component, and a rotation shaft, a rotation shaft and a shaft hole matched with the shaft hole in the other component. Together, they form a rotating mechanism so that the two components can rotate relative to each other.
有利的,可以将第一连接板2300和第二连接板2400的材质选用为具 有一定形变能力的材料,例如软质塑料,在第一连接板2300和第二连接板2400形成一个手指收容部时,手指插入其中可以提高舒适度。Advantageously, the material of the first connection plate 2300 and the second connection plate 2400 can be selected to have a certain deformability, such as soft plastic. When the first connection plate 2300 and the second connection plate 2400 form a finger receiving portion, , Inserting fingers into it can improve comfort.
再结合附图8所示,本实施例的所述第一端、第二端、第三端和第四端均设有一凹陷部2600,所述第一杆体2510的相对两端分别置于所述第一端的凹陷部2600和所述第三端的凹陷部2600内,所述第二杆体2520相对两端分别置于所述第三端的凹陷部2600和所述第四端的凹陷部2600内。In combination with FIG. 8, the first end, the second end, the third end, and the fourth end of the embodiment are each provided with a recess 2600, and the opposite ends of the first rod body 2510 are respectively disposed in the recesses. Within the recessed portion 2600 of the first end and the recessed portion 2600 of the third end, opposite ends of the second rod body 2520 are respectively placed in the recessed portion 2600 of the third end and the recessed portion 2600 of the fourth end.
上述结构将连杆2500机构通过凹陷部设置在板体内,使得连杆2500机构和板体及连接板共同形成一个板体结构,提高了整个支撑板2000的整体性,便于支撑板2000的安装。In the above structure, the connecting rod 2500 mechanism is provided in the board body through the recessed portion, so that the connecting rod 2500 mechanism, the board body, and the connecting plate together form a board body structure, which improves the integrity of the entire supporting plate 2000 and facilitates the installation of the supporting plate 2000.
更有利的,本实施例还对凹陷区1100的结构进行改进,所述凹陷区1100具体包括底壁和侧壁,所述底壁上设有通风结构1110,所述通风结构1110可以是多个通风孔,通风结构1110也可以是在所述底壁设有通风格栅。通风孔和通风格栅的设计可以在支撑板2000处于支撑状态或者折叠状态下,加强手机的散热效果,进而延长了手机的使用寿命。More advantageously, this embodiment further improves the structure of the recessed area 1100. The recessed area 1100 specifically includes a bottom wall and a side wall. The bottom wall is provided with a ventilation structure 1110, and the ventilation structure 1110 may be a plurality of The ventilation hole and the ventilation structure 1110 may be provided with a ventilation grille on the bottom wall. The design of the ventilation holes and the ventilation grille can enhance the heat dissipation effect of the mobile phone when the support plate 2000 is in a supported state or a folded state, thereby extending the service life of the mobile phone.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only schematic, and the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, which may be located in One place, or can be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the objective of the solution of this embodiment. Those of ordinary skill in the art can understand and implement without creative labor.
本发明实施例提供了一种非暂态计算机可读存存储介质,所述计算机存储介质存储有计算机可执行指令,其中,当所述计算机可执行指令被电子设备执行时,使所述电子设备上执行上述任意方法实施例中的光照信息的优化方法。An embodiment of the present invention provides a non-transitory computer-readable storage storage medium, where the computer storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by an electronic device, the electronic device is caused The method for optimizing illumination information in any of the foregoing method embodiments is performed on the above.
本发明实施例提供了一种计算机程序产品,其中,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,其中,当所述程序指令被电子设备执行时,使所述电子设备执行上述任意方法实施例中的光照信息的优化方法。An embodiment of the present invention provides a computer program product, wherein the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions When executed by an electronic device, the electronic device is caused to execute the method for optimizing illumination information in any of the foregoing method embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通 过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,所述计算机可读记录介质包括用于以计算机(例如计算机)可读的形式存储或传送信息的任何机制。例如,机器可读介质包括只读存储器(ROM)、随机存取存储器(RAM)、磁盘存储介质、光存储介质、闪速存储介质、电、光、声或其他形式的传播信号(例如,载波、红外信号、数字信号等)等,该计算机软件产品包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary universal hardware platform, and of course, also by hardware. Based on such an understanding, the above-mentioned technical solution in essence or a part that contributes to the existing technology may be embodied in the form of a software product, and the computer software product may be stored in a computer-readable storage medium, the computer-readable record A medium includes any mechanism for storing or transmitting information in a form readable by a computer (eg, a computer). For example, machine-readable media include read-only memory (ROM), random-access memory (RAM), magnetic disk storage media, optical storage media, flash storage media, electrical, optical, acoustic, or other forms of propagation signals (e.g., carrier waves , Infrared signals, digital signals, etc.), the computer software product includes a number of instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute various embodiments or certain parts of the embodiments Methods.
最后应说明的是:以上实施例仅用以说明本发明实施例的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。In the end, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than limiting them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some of the technical features are equivalently replaced; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and range.

Claims (10)

  1. 一种光照信息的优化方法,其特征在于,包括:A method for optimizing lighting information includes:
    获取目标图片,将所述目标图片分解成第一预设数量的子图片;其中,所述子图片由第二预设数量的像素组成;Obtaining a target picture, and decomposing the target picture into a first preset number of sub-pictures; wherein the sub-pictures are composed of a second preset number of pixels;
    获取所述子图片的几何中心,根据所述子图片的图像矩确定光强加权中心,基于所述光强加权中心和所述子图片的几何中心确定所述子图片的光照角度;Obtaining a geometric center of the sub-picture, determining a light intensity weighting center according to the image moment of the sub-picture, and determining an illumination angle of the sub-picture based on the light intensity weighting center and the geometric center of the sub-picture;
    对所述子图片进行灰度处理,根据所述子图片上各点的灰度值得到所述子图片的光照强度;Performing grayscale processing on the sub-picture, and obtaining the light intensity of the sub-picture according to the gray-scale value of each point on the sub-picture;
    获取所述子图片对应的光照强度权重值,根据所述子图片的光照强度和所述子图片对应的光照强度权重值,得到所述目标图片的光照强度;Obtaining a light intensity weight value corresponding to the sub-picture, and obtaining the light intensity of the target picture according to the light intensity of the sub-picture and the light intensity weight value corresponding to the sub-picture;
    对所述子图片的光照角度进行计算,得到所述目标图片的光照角度。Calculate the illumination angle of the sub-picture to obtain the illumination angle of the target picture.
  2. 根据权利要求1所述的方法,其特征在于,所述对所述子图片进行灰度处理,根据所述子图片上各点的灰度值得到所述子图片的光照强度,包括:The method according to claim 1, wherein the step of performing grayscale processing on the sub-picture and obtaining the light intensity of the sub-picture according to the gray-scale value of each point on the sub-picture comprises:
    对所述子图片进行灰度处理,使得所述子图片上各点只保留一个0-255的灰度值;Performing grayscale processing on the sub-picture, so that each point on the sub-picture retains only a gray-scale value of 0-255;
    将所述子图片上各点的灰度值输入预先训练的光照强度模型中,得到所述子图片的光照强度。The gray value of each point on the sub-picture is input into a pre-trained light intensity model to obtain the light intensity of the sub-picture.
  3. 根据权利要求2所述的方法,其特征在于,所述获取所述子图片对应的光照强度值包括:The method according to claim 2, wherein the obtaining the light intensity value corresponding to the sub-picture comprises:
    获取所述子图片在所述目标图片中的位置坐标;Obtaining position coordinates of the sub-picture in the target picture;
    根据所述子图片的位置坐标以及所述子图片的尺寸确定所述子图片对应的光照强度权重值。A light intensity weight value corresponding to the sub-picture is determined according to a position coordinate of the sub-picture and a size of the sub-picture.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述对各所述子图片的光照角度进行计算,得到所述目标图片对应的光照角度,包括:The method according to any one of claims 1 to 3, wherein the calculating an illumination angle of each of the sub-pictures to obtain an illumination angle corresponding to the target picture includes:
    判断所述子图片的尺寸是否小于预设阈值;Determining whether the size of the sub-picture is smaller than a preset threshold;
    若小于预设阈值,则对各所述子图片的光照角度的向量进行求和,得到所述目标图片的光照角度。If it is less than a preset threshold, the vectors of the illumination angles of the sub-pictures are summed to obtain the illumination angle of the target picture.
  5. 根据权利要求1-3任一项所述的方法,其特征在于,所述对各所述子图片的光照角度进行计算,得到所述目标图片对应的光照角度,包括:The method according to any one of claims 1 to 3, wherein the calculating an illumination angle of each of the sub-pictures to obtain an illumination angle corresponding to the target picture includes:
    确定各所述子图片对应的光照角度权重值;Determining a lighting angle weight value corresponding to each of the sub-pictures;
    根据所述光照角度权重值对各所述子图片的光照角度的向量进行加权求和,计算得到所述目标图片的光照角度。A vector of the illumination angle of each of the sub-pictures is weighted and summed according to the illumination angle weight value to calculate the illumination angle of the target picture.
  6. 一种光照信息的优化装置,其特征在于,包括:An apparatus for optimizing illumination information, comprising:
    获取模块,用于获取目标图片,将所述目标图片分解成第一预设数量的子图片;其中,所述子图片由第二预设数量的像素组成;An acquisition module, configured to acquire a target picture and decompose the target picture into a first preset number of sub-pictures; wherein the sub-pictures are composed of a second preset number of pixels;
    确定模块,用于获取所述子图片的几何中心,根据所述子图片的图像矩确定光强加权中心,基于所述光强加权中心和所述子图片的几何中心确定所述子图片的光照角度;A determining module, configured to obtain a geometric center of the sub-picture, determine a light intensity weighting center according to the image moment of the sub-picture, and determine the illumination of the sub-picture based on the light intensity weighting center and the geometric center of the sub-picture angle;
    处理模块,用于对所述子图片进行灰度处理,根据所述子图片上各点的灰度值得到所述子图片的光照强度;A processing module, configured to perform grayscale processing on the sub-picture, and obtain a light intensity of the sub-picture according to a gray-scale value of each point on the sub-picture;
    第一计算模块,用于获取所述子图片对应的光照强度权重值,根据所述子图片的光照强度和所述子图片对应的光照强度权重值,得到所述目标图片的光照强度;A first calculation module, configured to obtain a light intensity weight value corresponding to the sub-picture, and obtain a light intensity of the target picture according to the light intensity of the sub-picture and the light intensity weight value corresponding to the sub-picture;
    第二计算模块,用于对所述子图片的光照角度进行计算,得到所述目标图片的光照角度。A second calculation module is configured to calculate an illumination angle of the sub-picture to obtain an illumination angle of the target picture.
  7. 根据权利要求6所述的装置,其特征在于,所述处理模块具体用于,对所述子图片进行灰度处理,使得所述子图片上各点只保留一个0-255的灰度值;将所述子图片上各点的灰度值输入预先训练的光照强度模型中,得到所述子图片的光照强度。The device according to claim 6, wherein the processing module is specifically configured to perform grayscale processing on the sub-picture, so that each point on the sub-picture retains only a gray-scale value of 0-255; The gray value of each point on the sub-picture is input into a pre-trained light intensity model to obtain the light intensity of the sub-picture.
  8. 根据权利要求7所述的装置,其特征在于,所述第一计算模块包括:The apparatus according to claim 7, wherein the first calculation module comprises:
    获取单元,用于获取所述子图片在所述目标图片中的位置坐标;An obtaining unit, configured to obtain position coordinates of the sub-picture in the target picture;
    确定单元,用于根据所述子图片的位置坐标以及所述子图片的尺寸确定所述子图片对应的光照强度权重值。The determining unit is configured to determine a light intensity weight value corresponding to the sub-picture according to a position coordinate of the sub-picture and a size of the sub-picture.
  9. 根据权利要求6-8任一项所述的装置,其特征在于,所述第一计算模块还包括:The apparatus according to any one of claims 6 to 8, wherein the first calculation module further comprises:
    判断单元,用于判断所述子图片的尺寸是否小于预设阈值;A judging unit, configured to judge whether the size of the sub-picture is smaller than a preset threshold;
    求和单元,用于若小于预设阈值,则对各所述子图片的光照角度的向量进行求和,得到所述目标图片的光照角度。The summing unit is configured to sum the vectors of the illumination angles of the sub-pictures to obtain the illumination angles of the target picture if they are less than a preset threshold.
  10. 一种电子设备,其特征在于,包括:至少一个处理器;以及,An electronic device, comprising: at least one processor; and
    与所述至少一个处理器通信连接的存储器;其中,A memory connected in communication with the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1至5中任一项所述的光照信息的优化方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any one of claims 1 to 5. Optimization method of lighting information.
PCT/CN2018/096694 2018-07-23 2018-07-23 Illumination information optimization method and apparatus, and electronic device WO2020019134A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/096694 WO2020019134A1 (en) 2018-07-23 2018-07-23 Illumination information optimization method and apparatus, and electronic device
CN201810914867.6A CN108965535B (en) 2018-07-23 2018-08-13 Illumination information optimization method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/096694 WO2020019134A1 (en) 2018-07-23 2018-07-23 Illumination information optimization method and apparatus, and electronic device

Publications (1)

Publication Number Publication Date
WO2020019134A1 true WO2020019134A1 (en) 2020-01-30

Family

ID=64469553

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/096694 WO2020019134A1 (en) 2018-07-23 2018-07-23 Illumination information optimization method and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN108965535B (en)
WO (1) WO2020019134A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110288692B (en) * 2019-05-17 2021-05-11 腾讯科技(深圳)有限公司 Illumination rendering method and device, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100134509A1 (en) * 2008-12-03 2010-06-03 Yoshikatsu Matsuo Image rendering processing apparatus
CN106469439A (en) * 2016-08-30 2017-03-01 乐视控股(北京)有限公司 The processing method and processing device of picture in a kind of Night
CN106550521A (en) * 2015-09-23 2017-03-29 阿里巴巴集团控股有限公司 A kind of determination method and device of lighting angle
CN108122155A (en) * 2017-09-30 2018-06-05 苏州美房云客软件科技股份有限公司 Storage device, processing device and scene model rendering method of virtual room selection system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7555155B2 (en) * 2005-01-27 2009-06-30 Cambridge Research & Instrumentation, Inc. Classifying image features
US9587804B2 (en) * 2012-05-07 2017-03-07 Chia Ming Chen Light control systems and methods
CN105469357B (en) * 2015-11-27 2018-09-14 努比亚技术有限公司 Image processing method, device and terminal
US10489975B2 (en) * 2017-01-04 2019-11-26 Daqri, Llc Environmental mapping system
CN107948617B (en) * 2017-12-06 2021-03-02 Oppo广东移动通信有限公司 Image processing method, image processing device, computer-readable storage medium and computer equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100134509A1 (en) * 2008-12-03 2010-06-03 Yoshikatsu Matsuo Image rendering processing apparatus
CN106550521A (en) * 2015-09-23 2017-03-29 阿里巴巴集团控股有限公司 A kind of determination method and device of lighting angle
CN106469439A (en) * 2016-08-30 2017-03-01 乐视控股(北京)有限公司 The processing method and processing device of picture in a kind of Night
CN108122155A (en) * 2017-09-30 2018-06-05 苏州美房云客软件科技股份有限公司 Storage device, processing device and scene model rendering method of virtual room selection system

Also Published As

Publication number Publication date
CN108965535B (en) 2020-05-26
CN108965535A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
US11270419B2 (en) Augmented reality scenario generation method, apparatus, system, and device
WO2020029178A1 (en) Light and shadow rendering method and device for virtual object in panoramic video, and electronic apparatus
US10878537B2 (en) Image splicing method, apparatus, terminal, and storage medium
CN111556278B (en) Video processing method, video display device and storage medium
WO2020019132A1 (en) Method and apparatus for rendering virtual object on the basis of light information, and electronic device
CN107566730B (en) A kind of panoramic picture image pickup method and mobile terminal
WO2018072267A1 (en) Photographing method for terminal, and terminal
US20240036792A1 (en) Picture displaying method and apparatus, and electronic device
CN104427230B (en) The method of augmented reality and the system of augmented reality
CN110930329B (en) Star image processing method and device
WO2020019133A1 (en) Method and device for determining shadow effect and electronic device
WO2019200720A1 (en) Image processing-based ambient light compensation method and apparatus, and electronic device
CN103155000B (en) Image processing apparatus, image processing method and computer readable recording medium storing program for performing
WO2022262618A1 (en) Screen saver interaction method and apparatus, electronic device, and storage medium
US9288437B2 (en) Communication device, communication method, and computer-readable storage medium
JP5213500B2 (en) Image conversion program and image conversion apparatus
CN108171744A (en) Determining method, mobile terminal and the storage medium of disparity map in a kind of binocular virtualization
CN111866483A (en) Color restoration method and device, computer readable medium and electronic device
CN110533598A (en) Device and method for continuous multiple frames image denoising
CN110766610A (en) Super-resolution image reconstruction method and electronic equipment
US20170161928A1 (en) Method and Electronic Device for Displaying Virtual Device Image
CN108200352A (en) A kind of method, terminal and storage medium for reconciling picture luminance
WO2020019134A1 (en) Illumination information optimization method and apparatus, and electronic device
CN109698908A (en) Intelligence calls method, terminal and the storage medium of front camera and rear camera imaging
CN113014960B (en) Method, device and storage medium for online video production

Legal Events

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

Ref document number: 18928136

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18928136

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 01/06/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18928136

Country of ref document: EP

Kind code of ref document: A1