WO2018191887A1 - Photographing and patterning method and apparatus, and electronic device - Google Patents

Photographing and patterning method and apparatus, and electronic device Download PDF

Info

Publication number
WO2018191887A1
WO2018191887A1 PCT/CN2017/081092 CN2017081092W WO2018191887A1 WO 2018191887 A1 WO2018191887 A1 WO 2018191887A1 CN 2017081092 W CN2017081092 W CN 2017081092W WO 2018191887 A1 WO2018191887 A1 WO 2018191887A1
Authority
WO
WIPO (PCT)
Prior art keywords
area
image information
main feature
target area
frame
Prior art date
Application number
PCT/CN2017/081092
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/CN2017/081092 priority Critical patent/WO2018191887A1/en
Priority to CN201780089416.7A priority patent/CN110622498B/en
Publication of WO2018191887A1 publication Critical patent/WO2018191887A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a photographing composition method, apparatus, and electronic device.
  • the photo usually includes the main features (that is, features that the user wants to highlight, such as people, buildings, etc.) and the background.
  • the different positions between the main feature and the background can make the photos have different effects.
  • Embodiments of the present invention provide a photographing composition method, device, and electronic device, which can improve the quality of a photo.
  • an embodiment of the present invention provides a photographing composition method, which is applied to an electronic device, where the electronic device includes a framing frame, and the photographing composition method includes:
  • a target area in the Fibonacci spiral is determined based on the main feature, and the target area is prompted in the finder frame.
  • an embodiment of the present invention provides a photographing and mapping device, which is applied to an electronic device, where the electronic device includes a framing frame, and the photo composition device includes:
  • An obtaining module configured to obtain image information in the finder frame
  • An analysis module configured to analyze the image information to extract a main feature in the image information
  • a determining module is configured to determine a target area in the Fibonacci spiral according to the main feature, and prompt the target area in the finder frame.
  • an embodiment of the present invention provides an electronic device, including:
  • a finder frame connected to the camera for displaying the image information
  • a processor coupled to the memory
  • the processor calls the executable program code stored in the memory, and performs the following steps:
  • a target area in the Fibonacci spiral is determined based on the main feature, and the target area is prompted in the finder frame.
  • Embodiments of the present invention provide a photographing composition method, device, and electronic device, which can improve the quality of a photo.
  • FIG. 1 is a schematic diagram of a first flow chart of a photographing composition method according to an embodiment of the present invention.
  • FIG. 2 is a second schematic flowchart of a photo composition method according to an embodiment of the present invention.
  • FIG. 3 is a third schematic flowchart of a photo composition method according to an embodiment of the present invention.
  • FIG. 4 is a fourth schematic flowchart of a photo composition method according to an embodiment of the present invention.
  • FIG. 5 is a first schematic diagram of image information in a photo composition method according to an embodiment of the present invention.
  • FIG. 6 is a first schematic diagram of establishing a reference line in a photo composition method according to an embodiment of the present invention.
  • FIG. 7 is a first schematic diagram of establishing a Fibonacci spiral in a photographing composition method according to an embodiment of the present invention.
  • FIG. 8 is a second schematic diagram of establishing a reference line in a photo composition method according to an embodiment of the present invention.
  • FIG. 9 is a second schematic diagram of establishing a Fibonacci spiral in a photographing composition method according to an embodiment of the present invention.
  • FIG. 10 is a third schematic diagram of establishing a Fibonacci spiral in a photographing composition method according to an embodiment of the present invention.
  • FIG. 11 is a fourth schematic diagram of establishing a Fibonacci spiral in a photographing composition method according to an embodiment of the present invention.
  • FIG. 12 is a schematic diagram of determining a target area in a photographing composition method according to an embodiment of the present invention.
  • FIG. 13 is a first schematic diagram showing a target area in a photographing composition method according to an embodiment of the present invention.
  • FIG. 14 is a second schematic diagram showing a target area in a photographing composition method according to an embodiment of the present invention.
  • FIG. 15 is a second schematic diagram of image information in a photo composition method according to an embodiment of the present invention.
  • FIG. 16 is a schematic diagram of a first structure of a photographing composition device according to an embodiment of the present invention.
  • FIG. 17 is a schematic diagram of a second structure of a photographing composition device according to an embodiment of the present invention.
  • FIG. 18 is a third schematic structural diagram of a photographing composition device according to an embodiment of the present invention.
  • FIG. 19 is a fourth structural diagram of a photographing composition device according to an embodiment of the present invention.
  • FIG. 20 is a fifth structural diagram of a photographing composition device according to an embodiment of the present invention.
  • FIG. 21 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • the embodiment of the invention provides a photographing composition method, device and electronic device, which will be respectively described in detail below.
  • the photo composition method may include the following steps:
  • the photo composition method can be applied to electronic devices such as digital cameras and smart phones.
  • the electronic device has a camera and a framing frame.
  • the camera is used to capture image information in the external environment.
  • the image information captured by the camera can be displayed in the viewfinder.
  • the smartphone implements the camera function, the image information collected by the camera can be displayed on the display screen.
  • the display of the smartphone acts as a framing frame.
  • the user can observe the image information collected by the camera in real time through the framing frame, thereby adjusting the position and angle of the camera to obtain a better photographing effect.
  • the electronic device can acquire image information displayed in the finder frame and analyze and process the image information.
  • the electronic device can obtain image information of the framing frame once every interval.
  • image information can be acquired once per second.
  • Image information typically includes a main feature and a background.
  • the main feature is the feature that the user wants to highlight during the photographing process, such as characters, buildings, animals, and the like.
  • the background is the environmental information around the main feature. Referring to FIG. 5, the image information displayed in the finder frame includes a main feature and a background, and the main feature is a character.
  • the photo composition method may further include the following steps:
  • the image information is analyzed to extract main features in the image information, including:
  • Convolutional Neural Network (Convolutional Neural Network) Network
  • CNN Convolutional Neural Network
  • Processing images using convolutional neural networks is a mature technology.
  • the convolutional neural network may be applied to train the image information analysis model, and the image information analysis model is stored in the electronic device.
  • the image information analysis model is used to analyze and identify images.
  • the electronic device calls the image information analysis model stored in the electronic device to analyze the image information to extract the main features in the image information.
  • Fibonacci spiral is also called the "golden spiral", which is a spiral curve drawn according to the Fibonacci sequence, along which a plurality of rectangles are distributed.
  • a Fibonacci spiral can then be created in the framing frame.
  • the photo composition method may further include:
  • the electronic device may compare the plurality of main features extracted in a period of time to determine the similarity between the plurality of main features in the time period. When the similarity between each two adjacent main features is greater than the preset value, the main feature extraction is considered to be successful, otherwise the main feature extraction is considered unsuccessful.
  • the preset value may be a preset value, for example, 70%.
  • the electronic device when the electronic device extracts the main feature once per second, the five main features extracted within 5 seconds may be compared to determine the similarity between the five main features.
  • the similarity between each two adjacent main features of the five main features is greater than 70%, the main feature extraction is considered to be successful.
  • the viewfinder frame of the electronic device can integrate the touch sensing function, that is, the viewfinder frame can be a touch screen.
  • the electronic device determines that the main feature extraction is unsuccessful, the user may be prompted to specify the main feature in the finder frame. For example, the text message "Please specify the main feature in the image information" can be displayed in the finder frame to prompt the user.
  • the electronic device receives a touch operation of the user on the finder frame, and determines an area of the image information corresponding to the touch operation as a main feature.
  • the user's touch operation may be a click operation or a sliding operation.
  • establishing a Fibonacci spiral in the finder frame includes the following steps:
  • the preset ratio can be a preset value.
  • the preset ratio is greater than 0 and less than 1.
  • the above preset ratio may be a golden ratio (the golden ratio is about 0.618).
  • the electronic device can establish lateral reference lines and longitudinal reference lines in the horizontal and vertical directions of the framing frame, respectively, in a golden section.
  • the horizontal reference line divides the framing frame into upper and lower parts, and the ratio of the lower part to the upper part is the golden ratio.
  • the vertical reference line divides the framing frame into two parts, and the ratio of the left half to the right half is the golden ratio.
  • the intersection O of the lateral reference line and the longitudinal reference line is determined as the origin, and the Fibonacci spiral is established in the finder frame starting from the origin.
  • Fibonacci spiral In the process of establishing the Fibonacci spiral, you can first establish a Cartesian coordinate system with O as the origin, the horizontal reference line as the X axis, and the vertical reference line as the Y axis. Then, the Fibonacci spiral is established by taking the values in the Fibonacci sequence as the straight line in the direction of -Y, -X, +Y, and +X. The final Fibonacci spiral is shown in Figure 7.
  • determining the intersection of the lateral reference line and the longitudinal reference line as the origin includes the following steps:
  • the number of horizontal reference lines established by the electronic device is two, and the number of vertical reference lines is also two.
  • the ratio of the lower region to the upper region of the lateral reference line 1 is a golden ratio
  • the ratio of the upper region to the lower region of the lateral reference line 2 is a golden ratio
  • the ratio of the left region to the right region of the longitudinal reference line 1 is a golden ratio
  • the ratio of the right region to the left region of the longitudinal reference line 2 is a golden ratio.
  • the two lateral reference lines and the two longitudinal reference lines form four intersections A, B, C, D.
  • the electronic device establishes a horizontal center line and a longitudinal center line along the lateral direction and the longitudinal direction of the finder frame, respectively.
  • the horizontal center line divides the framing frame into upper and lower halves.
  • the vertical center line divides the framing frame into left and right halves.
  • the horizontal center line and the vertical center line divide the framing frame into four areas: the lower left area, the upper left area, the upper right area, and the lower right area. Among them, the intersection point A is located in the lower left area, the intersection point B is located in the upper left area, the intersection point C is located in the upper right area, and the intersection point D is located in the lower right area.
  • the electronic device can determine which region the main feature extracted in step S120 is in and determine the region as the starting region.
  • the main feature spans a plurality of regions, for example, the main feature spans the lower left region and the upper left region, the region in which most of the main feature is located is determined as the start region.
  • the intersection of the lateral reference line and the longitudinal reference line in the starting area is determined as the origin.
  • the electronic device can establish a Cartesian coordinate system with the horizontal reference line in the starting area as the X axis and the vertical reference line as the Y axis, and the determined origin.
  • the Fibonacci spiral is established by sequentially taking the values in the Fibonacci sequence as the straight line in the direction of -Y, -X, +Y, and +X.
  • the final Fibonacci spiral is shown in Figure 7.
  • the Fibonacci spiral is established by sequentially taking the values in the Fibonacci sequence as the straight line in the directions of +Y, -X, -Y, and +X.
  • the final Fibonacci spiral is shown in Figure 9.
  • the Fibonacci spiral is established by sequentially taking the values in the Fibonacci sequence as the straight line in the direction of +Y, +X, -Y, and -X.
  • the final Fibonacci spiral is shown in Figure 10.
  • the Fibonacci spiral is established by sequentially taking the values in the Fibonacci sequence as the straight line in the direction of -Y, +X, +Y, and -X.
  • the final Fibonacci spiral is shown in Figure 11.
  • the embodiment of the present invention is described herein only by taking the lateral length of the finder frame as being larger than the longitudinal length.
  • the horizontal data and the vertical data may be interchanged.
  • the Fibonacci spiral comprises a spiral curve and a plurality of rectangles distributed along the spiral curve.
  • the target area can be a point on the Fibonacci spiral or a rectangle on the Fibonacci spiral.
  • the electronic device determines a target area in the Fibonacci spiral according to the main feature. For example, the determined target area is a rectangle in the Fibonacci spiral, as shown in FIG.
  • the target area is prompted in the finder frame. After prompting the target area, the user can move the lens to quickly place the main feature in the target area. Thereby, the user can quickly obtain the best photographing effect.
  • Fibonacci spiral created in the framing frame is only calculated by the electronic device and is invisible to the user. There are several ways to prompt the target area.
  • the target area can be displayed in the finder frame.
  • the display may be performed by highlighting the edge of the target area, by blinking the target area, or by other means such as gradation.
  • the manner in which the target area is prompted includes, but is not limited to, the manner enumerated above.
  • a text prompt may also be displayed in the finder frame to enhance the prompting effect.
  • the text prompt can be information such as "put the main feature in the prompt box".
  • the photographing effect is as shown in FIG.
  • the user can quickly achieve the best photo effect.
  • determining a target area in the Fibonacci spiral according to the main feature, and prompting the target area in the finder frame includes the following steps:
  • the electronic device can calculate the area of the main feature according to the extracted main features. At the same time, the electronic device can calculate the area of each rectangle in the Fibonacci spiral. Subsequently, the area of the main feature is adapted to the area of each rectangle to determine the rectangle with the highest degree of area fit to the main feature.
  • the electronic device can determine the target area in the Fibonacci spiral according to the adaptation result, and prompt the target area in the finder frame.
  • the area of the main feature is respectively adapted to the area of each rectangle in the Fibonacci spiral to obtain an adaptation result, including the following steps:
  • Determining the target area in the Fibonacci spiral according to the adaptation result, and prompting the target area in the finder frame including:
  • S1431 Determine a rectangle corresponding to the smallest absolute value as a target area, and prompt the target area in the finder frame.
  • the electronic device can separately calculate the absolute value of the difference between the area S0 of the main feature and the area Sn of each rectangle in the Fibonacci spiral (n is the number of the rectangle when the rectangular area is arranged from small to large)
  • the area of the fourth rectangle S4 15, then
  • 4,
  • 3,
  • 1,
  • 10.
  • is the smallest, and the third rectangle can be determined as the target area. Then, the target area is prompted in the finder frame.
  • the present invention is not limited by the order of execution of the various steps described. In the case where no conflict occurs, some steps may be performed in other orders or simultaneously.
  • the photographing composition method acquires image information in the framing frame; analyzes the image information to extract main features in the image information; and establishes a Fibonacci spiral in the framing frame. a line; determining a target area in the Fibonacci spiral according to the main feature, and prompting the target area in the finder frame.
  • the scheme establishes a Fibonacci spiral in the framing frame, determines the target area in the Fibonacci spiral by the main features in the image information, and prompts the target area to remind the user to place the main feature in the target area. Quickly achieve the best photo results.
  • the embodiment of the present invention further provides a photo composition device, which can be integrated into an electronic device, and the electronic device can be an electronic device such as a digital camera or a smart phone.
  • the photo composition device 200 includes an acquisition module 201 , an analysis module 202 , an establishment module 203 , and a determination module 204 .
  • the obtaining module 201 is configured to acquire image information in the finder frame.
  • the photo composition device can be integrated in electronic devices such as digital cameras and smart phones.
  • the electronic device has a camera and a framing frame.
  • the camera is used to capture image information in the external environment.
  • the image information captured by the camera can be displayed in the viewfinder.
  • the smartphone implements the camera function, the image information collected by the camera can be displayed on the display screen.
  • the display of the smartphone acts as a framing frame.
  • the user can observe the image information collected by the camera in real time through the framing frame, thereby adjusting the position and angle of the camera to obtain a better photographing effect.
  • the acquiring module 201 in the photographing composition device can acquire the image information displayed in the finder frame, and analyze and process the image information.
  • the obtaining module 201 may acquire image information of the framing frame once every interval.
  • image information can be acquired once per second.
  • the analyzing module 202 is configured to analyze the image information to extract a main feature in the image information.
  • the analyzing module 202 analyzes the image information to extract the main features in the image information.
  • Image information typically includes a main feature and a background.
  • the main feature is the feature that the user wants to highlight during the photographing process, such as characters, buildings, animals, and the like.
  • the background is the environmental information around the main feature.
  • the photo composition device 200 further includes a training module 205.
  • a training module 205 configured to apply a convolutional neural network training image information analysis model
  • the analyzing module 202 is configured to analyze the image information by using the image information analysis model to extract a main feature in the image information.
  • Convolutional Neural Network (Convolutional Neural Network) Network
  • CNN Convolutional Neural Network
  • Processing images using convolutional neural networks is a mature technology.
  • the training module 205 may apply the convolutional neural network to train the image information analysis model, and store the image information analysis model in the electronic device.
  • the image information analysis model is used to analyze and identify images.
  • the analyzing module 202 calls the image information analysis model stored in the electronic device to analyze the image information to extract the main features in the image information.
  • a module 203 is created for establishing a Fibonacci spiral in the framing frame.
  • Fibonacci spiral is also called the "golden spiral", which is a spiral curve drawn according to the Fibonacci sequence, along which a plurality of rectangles are distributed.
  • the building module 203 can establish a Fibonacci spiral in the framing frame.
  • the photo composition device 200 further includes a determination module 206.
  • the determining module 206 is configured to determine whether the main feature extraction is successful
  • the establishing module 203 is configured to establish a Fibonacci spiral in the finder frame when the determining module 206 determines YES.
  • the judging module 206 may compare the plurality of main features extracted within a period of time to determine the similarity between the plurality of main features in the period of time. When the similarity between each two adjacent main features is greater than the preset value, the main feature extraction is considered to be successful, otherwise the main feature extraction is considered unsuccessful.
  • the preset value may be a preset value, for example, 70%.
  • the building module 203 creates a Fibonacci spiral in the framing frame.
  • the judging module 206 can compare the five main features extracted within 5 seconds to determine the similarity between the five main features. When the similarity between each two adjacent main features of the five main features is greater than 70%, the main feature extraction is considered to be successful.
  • the determining module 206 is further configured to:
  • An area of the image information corresponding to the touch operation is determined as a main feature.
  • the viewfinder frame of the electronic device can integrate the touch sensing function, that is, the viewfinder frame can be a touch screen.
  • the judging module 206 judges that the main feature extraction is unsuccessful, the user may be prompted to specify the main feature in the framing frame. For example, the text message "Please specify the main feature in the image information" can be displayed in the finder frame to prompt the user.
  • the judging module 206 receives the touch operation of the user on the finder frame, and determines an area corresponding to the touch operation in the image information as the main feature.
  • the user's touch operation may be a click operation or a sliding operation.
  • the setup module 203 creates a Fibonacci spiral in the framing frame.
  • the establishing module 203 includes: a first establishing submodule 2031, a second determining submodule 2032, and a second establishing submodule 2033.
  • a first establishing sub-module 2031 configured to respectively establish a horizontal reference line and a vertical reference line in a horizontal direction and a longitudinal direction of the finder frame
  • a second determining sub-module 2032 configured to determine an intersection of the horizontal reference line and the vertical reference line as an origin
  • the second establishing sub-module 2033 is configured to establish a Fibonacci spiral in the finder frame starting from the origin.
  • the preset ratio can be a preset value.
  • the preset ratio is greater than 0 and less than 1.
  • the above preset ratio may be a golden ratio (the golden ratio is about 0.618).
  • the first establishing sub-module 2031 may respectively establish a lateral reference line and a longitudinal reference line in a lateral direction and a longitudinal direction of the finder frame in a golden section ratio.
  • the horizontal reference line divides the framing frame into upper and lower parts, and the ratio of the lower part to the upper part is the golden ratio.
  • the vertical reference line divides the framing frame into two parts, and the ratio of the left half to the right half is the golden ratio.
  • the second determining sub-module 2032 determines the intersection O of the lateral reference line and the longitudinal reference line as the origin, and the second establishing sub-module 2033 establishes a Fibonacci spiral in the finder frame starting from the origin.
  • Fibonacci spiral In the process of establishing the Fibonacci spiral, you can first establish a Cartesian coordinate system with O as the origin, the horizontal reference line as the X axis, and the vertical reference line as the Y axis. Then, the Fibonacci spiral is established by taking the values in the Fibonacci sequence as the straight line in the direction of -Y, -X, +Y, and +X.
  • the second determining sub-module 2032 is configured to perform the following steps:
  • intersection of the lateral reference line and the longitudinal reference line in the starting area is determined as the origin.
  • the number of horizontal reference lines established by the first establishing submodule 2031 is two, and the number of vertical reference lines is also two.
  • the ratio of the lower region to the upper region of the lateral reference line 1 is a golden ratio
  • the ratio of the upper region to the lower region of the lateral reference line 2 is a golden ratio
  • the ratio of the left region to the right region of the longitudinal reference line 1 is a golden ratio
  • the ratio of the right region to the left region of the longitudinal reference line 2 is a golden ratio.
  • the two lateral reference lines and the two longitudinal reference lines form four intersections A, B, C, D.
  • the second determining sub-module 2032 establishes a horizontal center line and a longitudinal center line respectively in the lateral direction and the longitudinal direction of the finder frame.
  • the horizontal center line divides the framing frame into upper and lower halves.
  • the vertical center line divides the framing frame into left and right halves.
  • the horizontal center line and the vertical center line divide the framing frame into four areas: the lower left area, the upper left area, the upper right area, and the lower right area. Among them, the intersection point A is located in the lower left area, the intersection point B is located in the upper left area, the intersection point C is located in the upper right area, and the intersection point D is located in the lower right area.
  • the second determining sub-module 2032 can determine which region the main feature extracted by the analyzing module 202 is in, and determine the region as the starting region.
  • the main feature spans a plurality of regions, for example, the main feature spans the lower left region and the upper left region, the region in which most of the main feature is located is determined as the start region.
  • the intersection of the lateral reference line and the longitudinal reference line in the starting area is determined as the origin.
  • the determining module 204 is configured to determine a target area in the Fibonacci spiral according to the main feature, and prompt the target area in the finder frame.
  • the Fibonacci spiral comprises a spiral curve and a plurality of rectangles distributed along the spiral curve.
  • the target area can be a point on the Fibonacci spiral or a rectangle on the Fibonacci spiral.
  • the determination module 204 determines a target area in the Fibonacci spiral according to the main feature and prompts the target area in the finder frame. After prompting the target area, the user can move the lens to quickly place the main feature in the target area. Thereby, the user can quickly obtain the best photographing effect.
  • Fibonacci spiral created in the framing frame is only calculated by the electronic device and is invisible to the user. There are several ways to prompt the target area.
  • the target area can be displayed in the finder frame.
  • the display may be performed by highlighting the edge of the target area, by blinking the target area, or by other means such as gradation.
  • the manner in which the target area is prompted includes, but is not limited to, the manner enumerated above.
  • a text prompt may also be displayed in the finder frame to enhance the prompting effect.
  • the text prompt can be information such as "put the main feature in the prompt box".
  • the determining module 204 includes: an obtaining submodule 2041, an adapting submodule 2042, and a first determining submodule 2043.
  • Obtaining a sub-module 2041 configured to obtain an area of the main feature and an area of each rectangle in the Fibonacci spiral;
  • the adaptation sub-module 2042 is configured to respectively adapt an area of the main feature to an area of each rectangle in the Fibonacci spiral to obtain an adaptation result
  • the first determining sub-module 2043 is configured to determine a target area in the Fibonacci spiral according to the adaptation result, and prompt the target area in the finder frame.
  • the obtaining sub-module 2041 may calculate the area of the main feature according to the extracted main features. At the same time, the acquisition sub-module 2041 can calculate the area of each rectangle in the Fibonacci spiral. The adaptor sub-module 2042 then adapts the area of the main feature to the area of each rectangle to determine the rectangle with the highest degree of area fit to the main feature.
  • the first determining sub-module 2043 may determine a target area in the Fibonacci spiral according to the fitting result, and prompt the target area in the finder frame.
  • the adaptation sub-module 2042 is configured to perform the following steps:
  • the first determining submodule 2043 is configured to perform the following steps:
  • a rectangle corresponding to the smallest absolute value is determined as the target area, and the target area is prompted in the finder frame.
  • the adapting sub-module 2042 can calculate the absolute value of the difference between the area S0 of the main feature and the area Sn of each rectangle in the Fibonacci spiral (n is the number of the rectangle when the rectangular area is arranged from small to large).
  • the area of the fourth rectangle S4 15, then
  • 4,
  • 3,
  • 1,
  • 10.
  • is the smallest
  • the first determining sub-module 2043 may determine the third rectangle as the target area, and present the target area in the finder frame.
  • each of the above modules may be implemented as a separate entity, or may be implemented in any combination as one or several entities.
  • the photographing composition device 200 acquires the image information in the framing frame by the obtaining module 201; the analyzing module 202 analyzes the image information to extract the main features in the image information; and the establishing module 203 A Fibonacci spiral is established in the framing frame; the determination module 204 determines a target area in the Fibonacci spiral according to the main feature, and prompts the target area in the finder frame.
  • the scheme establishes a Fibonacci spiral in the framing frame, determines the target area in the Fibonacci spiral by the main features in the image information, and prompts the target area to remind the user to place the main feature in the target area. Quickly achieve the best photo results.
  • the embodiment of the invention further provides an electronic device for performing the above photo composition method.
  • the electronic device may be a device such as a digital camera or a smart phone, or may be another device. The following only illustrates the electronic device as a smart phone.
  • the electronic device 300 includes a camera 301, a touch screen 302, a memory 303, a processor 304, and a power source 305.
  • the camera 301 is used to collect external image information.
  • the camera 301 can include a front camera and a rear camera.
  • the number of cameras 301 can be one or more.
  • the touch screen 302 is electrically connected to the camera 301 and the processor 303.
  • the touch screen 302 is configured to receive a touch operation of the user and transmit the touch information of the touch operation to the processor 303 to cause the electronic device 300 to respond to the touch operation of the user.
  • the touch screen 302 can also serve as a display screen of the electronic device 300 for displaying information such as images, texts, and the like to the user.
  • the touch screen 302 can display image information collected by the camera 301.
  • Memory 303 can be used to store applications and data.
  • the application stored in the memory 303 contains executable program code.
  • Applications can form various functional modules.
  • the processor 304 executes various functional applications and data processing by running an application stored in the memory 303.
  • the processor 304 is a control center of the electronic device 300, and connects various parts of the electronic device 300 using various interfaces and lines, executes the electronic by running or executing an application stored in the memory 303, and calling data stored in the memory 303. Various functions and processing data of device 300.
  • the power supply 305 can be logically coupled to the processor 304 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the processor 304 in the electronic device 300 loads the executable program code corresponding to the process of one or more applications into the memory 303 according to the following instructions, and the processor 304 runs the storage.
  • the application in memory 303 thus implements various functions:
  • a target area in the Fibonacci spiral is determined based on the main feature, and the target area is prompted in the finder frame.
  • the processor 304 before acquiring the image information in the finder frame, is further configured to: apply the convolutional neural network training image information analysis model; and analyze the image information to extract the main features in the image information.
  • the processor 304 is configured to: analyze the image information by using the image information analysis model to extract a main feature in the image information.
  • the processor 304 before the Fibonacci spiral is established in the finder frame, is further configured to: determine whether the main feature extraction is successful; if the main feature extraction is successful, establish a Fibonacci in the finder frame. The spiral line.
  • the processor 304 is further configured to: if the main feature extraction is unsuccessful, receive a touch operation of the user on the finder frame; The area corresponding to the touch operation is determined to be the main feature.
  • the Fibonacci spiral includes a spiral curve and a plurality of rectangles distributed along the spiral curve, determining a target area in the Fibonacci spiral according to the main feature, and prompting the frame in the finder frame
  • the processor 304 is configured to: acquire an area of the main feature and an area of each rectangle; and respectively adapt an area of the main feature to an area of each rectangle to obtain an adaptation result; according to the adaptation result Determine the target area in the Fibonacci spiral and prompt the target area in the frame.
  • the area of the main feature is respectively adapted to the area of each rectangle to obtain an adaptation result
  • the processor 304 is configured to separately calculate the difference between the area of the main feature and the area of each rectangle.
  • Absolute value determining a minimum absolute value from the calculated plurality of absolute values; determining a target area in the Fibonacci spiral according to the fitting result, and processing the target area when the target frame is processed
  • the device 304 is configured to: determine a rectangle corresponding to the smallest absolute value as the target area, and prompt the target area in the finder frame.
  • the processor 304 when the Fibonacci spiral is established in the finder frame, is configured to: establish horizontal reference lines and longitudinal reference lines at a preset ratio along the lateral and longitudinal directions of the finder frame; The intersection of the reference line and the longitudinal reference line is determined as the origin; the Fibonacci spiral is established in the finder frame starting from the origin.
  • the transverse reference line is two, and the longitudinal reference line is also two.
  • the processor 304 is configured to: respectively follow the transverse direction of the finder frame. And a longitudinal center line and a longitudinal center line, wherein the horizontal center line and the longitudinal center line divide the finder frame into four areas; the area where the main feature is located is determined as a start area; the horizontal reference line and the vertical direction in the start area The intersection of the reference lines is determined as the origin.
  • an embodiment of the present invention provides an electronic device that acquires image information in a framing frame, analyzes the image information to extract a main feature in the image information, and establishes a Philip in the framing frame. a Bonachet spiral; the target area in the Fibonacci spiral is determined based on the main feature, and the target area is prompted in the finder frame.
  • the scheme establishes a Fibonacci spiral in the framing frame, determines the target area in the Fibonacci spiral by the main features in the image information, and prompts the target area to remind the user to place the main feature in the target area. Quickly achieve the best photo results.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

A photographing and patterning method, comprising: obtaining image information in a finder frame; analyzing the image information to extract a main feature in the image information; establishing a Fibonacci spiral line in the finder frame; and determining a target region in the Fibonacci spiral line according to the main feature, and prompting the target region in the finder frame. The present invention further provides a photographing and patterning apparatus and an electronic device.

Description

拍照构图方法、装置及电子设备 Photographing method, device and electronic device 技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种拍照构图方法、装置及电子设备。The present invention relates to the field of communications technologies, and in particular, to a photographing composition method, apparatus, and electronic device.
背景技术Background technique
现如今,通过数码相机、智能手机等电子设备进行拍照,在人们的生活中随处可见。照片中通常包括主特征(也即用户想要凸显的特征,例如人物、建筑物等)和背景。主特征和背景之间的不同位置搭配,能够使得照片具有不同的效果。Nowadays, taking pictures through electronic devices such as digital cameras and smart phones can be seen everywhere in people's lives. The photo usually includes the main features (that is, features that the user wants to highlight, such as people, buildings, etc.) and the background. The different positions between the main feature and the background can make the photos have different effects.
技术问题technical problem
本发明实施例提供一种拍照构图方法、装置以及电子设备,能够提高照片的质量。Embodiments of the present invention provide a photographing composition method, device, and electronic device, which can improve the quality of a photo.
技术解决方案Technical solution
第一方面,本发明实施例提供一种拍照构图方法,应用于电子设备中,该电子设备包括取景框,该拍照构图方法包括:In a first aspect, an embodiment of the present invention provides a photographing composition method, which is applied to an electronic device, where the electronic device includes a framing frame, and the photographing composition method includes:
获取该取景框中的图像信息;Obtaining image information in the frame;
对该图像信息进行分析,以提取该图像信息中的主特征;And analyzing the image information to extract main features in the image information;
在该取景框中建立斐波那契螺旋线;Create a Fibonacci spiral in the view frame;
根据该主特征确定斐波那契螺旋线中的目标区域,并在该取景框中提示该目标区域。A target area in the Fibonacci spiral is determined based on the main feature, and the target area is prompted in the finder frame.
第二方面,本发明实施例提供一种拍照构图装置,应用于电子设备中,该电子设备包括取景框,该拍照构图装置包括:In a second aspect, an embodiment of the present invention provides a photographing and mapping device, which is applied to an electronic device, where the electronic device includes a framing frame, and the photo composition device includes:
获取模块,用于获取该取景框中的图像信息;An obtaining module, configured to obtain image information in the finder frame;
分析模块,用于对该图像信息进行分析,以提取该图像信息中的主特征;An analysis module, configured to analyze the image information to extract a main feature in the image information;
建立模块,用于在该取景框中建立斐波那契螺旋线;Establishing a module for establishing a Fibonacci spiral in the finder frame;
确定模块,用于根据该主特征确定斐波那契螺旋线中的目标区域,并在该取景框中提示该目标区域。A determining module is configured to determine a target area in the Fibonacci spiral according to the main feature, and prompt the target area in the finder frame.
第三方面,本发明实施例提供一种电子设备,包括:In a third aspect, an embodiment of the present invention provides an electronic device, including:
摄像头,用于采集图像信息;a camera for collecting image information;
与该摄像头连接的取景框,用于显示该图像信息;a finder frame connected to the camera for displaying the image information;
存储有可执行程序代码的存储器;a memory storing executable program code;
与该存储器耦合的处理器;a processor coupled to the memory;
该处理器调用该存储器中存储的该可执行程序代码,执行以下步骤:The processor calls the executable program code stored in the memory, and performs the following steps:
获取该取景框中的图像信息;Obtaining image information in the frame;
对该图像信息进行分析,以提取该图像信息中的主特征;And analyzing the image information to extract main features in the image information;
在该取景框中建立斐波那契螺旋线;Create a Fibonacci spiral in the view frame;
根据该主特征确定斐波那契螺旋线中的目标区域,并在该取景框中提示该目标区域。A target area in the Fibonacci spiral is determined based on the main feature, and the target area is prompted in the finder frame.
有益效果 Beneficial effect
本发明实施例提供一种拍照构图方法、装置以及电子设备,能够提高照片的质量。 Embodiments of the present invention provide a photographing composition method, device, and electronic device, which can improve the quality of a photo.
附图说明DRAWINGS
图1是本发明实施例提供的拍照构图方法的第一种流程示意图。FIG. 1 is a schematic diagram of a first flow chart of a photographing composition method according to an embodiment of the present invention.
图2是本发明实施例提供的拍照构图方法的第二种流程示意图。FIG. 2 is a second schematic flowchart of a photo composition method according to an embodiment of the present invention.
图3是本发明实施例提供的拍照构图方法的第三种流程示意图。FIG. 3 is a third schematic flowchart of a photo composition method according to an embodiment of the present invention.
图4是本发明实施例提供的拍照构图方法的第四种流程示意图。FIG. 4 is a fourth schematic flowchart of a photo composition method according to an embodiment of the present invention.
图5是本发明实施例提供的拍照构图方法中图像信息的第一种示意图。FIG. 5 is a first schematic diagram of image information in a photo composition method according to an embodiment of the present invention.
图6是本发明实施例提供的拍照构图方法中建立参考线的第一种示意图。FIG. 6 is a first schematic diagram of establishing a reference line in a photo composition method according to an embodiment of the present invention.
图7是本发明实施例提供的拍照构图方法中建立斐波那契螺旋线的第一种示意图。FIG. 7 is a first schematic diagram of establishing a Fibonacci spiral in a photographing composition method according to an embodiment of the present invention.
图8是本发明实施例提供的拍照构图方法中建立参考线的第二种示意图。FIG. 8 is a second schematic diagram of establishing a reference line in a photo composition method according to an embodiment of the present invention.
图9是本发明实施例提供的拍照构图方法中建立斐波那契螺旋线的第二种示意图。FIG. 9 is a second schematic diagram of establishing a Fibonacci spiral in a photographing composition method according to an embodiment of the present invention.
图10是本发明实施例提供的拍照构图方法中建立斐波那契螺旋线的第三种示意图。FIG. 10 is a third schematic diagram of establishing a Fibonacci spiral in a photographing composition method according to an embodiment of the present invention.
图11是本发明实施例提供的拍照构图方法中建立斐波那契螺旋线的第四种示意图。FIG. 11 is a fourth schematic diagram of establishing a Fibonacci spiral in a photographing composition method according to an embodiment of the present invention.
图12是本发明实施例提供的拍照构图方法中确定目标区域的示意图。FIG. 12 is a schematic diagram of determining a target area in a photographing composition method according to an embodiment of the present invention.
图13是本发明实施例提供的拍照构图方法中提示目标区域的第一种示意图。FIG. 13 is a first schematic diagram showing a target area in a photographing composition method according to an embodiment of the present invention.
图14是本发明实施例提供的拍照构图方法中提示目标区域的第二种示意图。FIG. 14 is a second schematic diagram showing a target area in a photographing composition method according to an embodiment of the present invention.
图15是本发明实施例提供的拍照构图方法中图像信息的第二种示意图。FIG. 15 is a second schematic diagram of image information in a photo composition method according to an embodiment of the present invention.
图16是本发明实施例提供的拍照构图装置的第一种结构示意图。FIG. 16 is a schematic diagram of a first structure of a photographing composition device according to an embodiment of the present invention.
图17是本发明实施例提供的拍照构图装置的第二种结构示意图。FIG. 17 is a schematic diagram of a second structure of a photographing composition device according to an embodiment of the present invention.
图18是本发明实施例提供的拍照构图装置的第三种结构示意图。FIG. 18 is a third schematic structural diagram of a photographing composition device according to an embodiment of the present invention.
图19是本发明实施例提供的拍照构图装置的第四种结构示意图。FIG. 19 is a fourth structural diagram of a photographing composition device according to an embodiment of the present invention.
图20是本发明实施例提供的拍照构图装置的第五种结构示意图。FIG. 20 is a fifth structural diagram of a photographing composition device according to an embodiment of the present invention.
图21是本发明实施例提供的电子设备的结构示意图。FIG. 21 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
本发明的最佳实施方式BEST MODE FOR CARRYING OUT THE INVENTION
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in the following with reference to the accompanying drawings. It is apparent that the described embodiments are only a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明的说明书和权利要求书以及上述附图中的术语“第一”、“第二”、“第三”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应当理解,这样描述的对象在适当情况下可以互换。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含。例如,包含了一系列步骤的过程、方法或包含了一系列模块或单元的装置、终端、系统不必限于清楚地列出的那些步骤或模块或单元,还可以包括没有清楚地列出的步骤或模块或单元,也可以包括对于这些过程、方法、装置、终端或系统固有的其它步骤或模块或单元。The terms "first", "second", "third", etc. (if present) in the specification and claims of the present invention and the above figures are used to distinguish similar objects and are not necessarily used to describe a particular order. Or prioritization. It should be understood that the objects so described are interchangeable where appropriate. Moreover, the terms "comprising" and "having" and "the" are intended For example, a process, method, or a device, terminal, or system comprising a series of modules or units is not necessarily limited to those steps or modules or units that are clearly listed, and may include steps that are not explicitly listed or Modules or units may also include other steps or modules or units inherent to such processes, methods, apparatus, terminals or systems.
本发明实施例提供一种拍照构图方法、装置及电子设备,以下将分别进行详细说明。The embodiment of the invention provides a photographing composition method, device and electronic device, which will be respectively described in detail below.
如图1所示,拍照构图方法,可以包括以下步骤:As shown in FIG. 1 , the photo composition method may include the following steps:
S110,获取取景框中的图像信息。S110. Acquire image information in the frame.
其中,拍照构图方法可以应用于数码相机、智能手机等电子设备中。该电子设备具有摄像头和取景框。摄像头用于采集外部环境中的图像信息。摄像头采集到的图像信息可以显示在取景框中。智能手机在实现拍照功能时,摄像头采集到的图像信息可以显示在显示屏上。此时,智能手机的显示屏作为取景框。Among them, the photo composition method can be applied to electronic devices such as digital cameras and smart phones. The electronic device has a camera and a framing frame. The camera is used to capture image information in the external environment. The image information captured by the camera can be displayed in the viewfinder. When the smartphone implements the camera function, the image information collected by the camera can be displayed on the display screen. At this point, the display of the smartphone acts as a framing frame.
在拍照过程中,用户可以通过取景框实时观察摄像头采集到的图像信息,从而对摄像头的位置、角度等进行调整,以获取更好的拍照效果。During the photographing process, the user can observe the image information collected by the camera in real time through the framing frame, thereby adjusting the position and angle of the camera to obtain a better photographing effect.
在拍照过程中,电子设备可以获取取景框中显示的图像信息,并对该图像信息进行分析处理。During the photographing process, the electronic device can acquire image information displayed in the finder frame and analyze and process the image information.
实际应用中,电子设备可以每间隔一段时间即获取一次取景框中的图像信息。例如,可以每秒获取一次图像信息。In an actual application, the electronic device can obtain image information of the framing frame once every interval. For example, image information can be acquired once per second.
S120,对该图像信息进行分析,以提取该图像信息中的主特征。S120. Analyze the image information to extract main features in the image information.
其中,电子设备获取到取景框中的图像信息后,对该图像信息进行分析,以提取该图像信息中的主特征。图像信息通常包括主特征和背景。其中,主特征即为用户拍照过程中想要凸显的特征,例如人物、建筑物、动物等。背景即为主特征周围的环境信息。参考图5,取景框中显示的图像信息包括主特征和背景,主特征为人物。After the electronic device acquires the image information in the finder frame, the image information is analyzed to extract the main features in the image information. Image information typically includes a main feature and a background. Among them, the main feature is the feature that the user wants to highlight during the photographing process, such as characters, buildings, animals, and the like. The background is the environmental information around the main feature. Referring to FIG. 5, the image information displayed in the finder frame includes a main feature and a background, and the main feature is a character.
在一些实施例中,如图2所示,获取取景框中的图像信息前,拍照构图方法还可以包括步骤:In some embodiments, as shown in FIG. 2, before acquiring the image information in the finder frame, the photo composition method may further include the following steps:
S150,应用卷积神经网络训练图像信息分析模型;S150, applying a convolutional neural network to train an image information analysis model;
对该图像信息进行分析,以提取该图像信息中的主特征包括:The image information is analyzed to extract main features in the image information, including:
S121,通过该图像信息分析模型对该图像信息进行分析,以提取该图像信息中的主特征。S121. Analyze the image information by using the image information analysis model to extract main features in the image information.
其中,卷积神经网络(Convolutional Neural Network,CNN)是一种前馈神经网络,可用于对图像进行处理。使用卷积神经网络对图像进行处理已经是成熟技术。Among them, Convolutional Neural Network (Convolutional Neural Network) Network, CNN) is a feedforward neural network that can be used to process images. Processing images using convolutional neural networks is a mature technology.
本发明实施例中,可以应用卷积神经网络训练图像信息分析模型,并将图像信息分析模型存储到电子设备中。图像信息分析模型用于对图像进行分析和识别。电子设备获取到图像信息后,调用存储在该电子设备中的图像信息分析模型对该图像信息进行分析,以提取该图像信息中的主特征。In the embodiment of the present invention, the convolutional neural network may be applied to train the image information analysis model, and the image information analysis model is stored in the electronic device. The image information analysis model is used to analyze and identify images. After acquiring the image information, the electronic device calls the image information analysis model stored in the electronic device to analyze the image information to extract the main features in the image information.
S130,在该取景框中建立斐波那契螺旋线。S130, a Fibonacci spiral is established in the framing frame.
其中,斐波那契螺旋线也称为“黄金螺旋”,是根据斐波那契数列画出来的螺旋曲线,沿着该螺旋曲线分布有多个矩形。Among them, the Fibonacci spiral is also called the "golden spiral", which is a spiral curve drawn according to the Fibonacci sequence, along which a plurality of rectangles are distributed.
电子设备提取到图像信息中的主特征后,随后可以在取景框中建立斐波那契螺旋线。After the electronic device extracts the main features in the image information, a Fibonacci spiral can then be created in the framing frame.
在一些实施例中,如图2所示,在该取景框中建立斐波那契螺旋线前,拍照构图方法还可以包括:In some embodiments, as shown in FIG. 2, before the Fibonacci spiral is established in the finder frame, the photo composition method may further include:
S160,判断主特征提取是否成功。S160. Determine whether the main feature extraction is successful.
其中,电子设备可以将一段时间内提取到的多个主特征进行对比,以判断该一段时间内的多个主特征之间的相似度。当每两个相邻主特征之间的相似度均大于预设值时,即认为主特征提取成功,否则即认为主特征提取不成功。其中,预设值可以为预先设置的一个数值,例如70%。主特征提取成功时,执行步骤S130;主特征提取不成功时,执行步骤S161。The electronic device may compare the plurality of main features extracted in a period of time to determine the similarity between the plurality of main features in the time period. When the similarity between each two adjacent main features is greater than the preset value, the main feature extraction is considered to be successful, otherwise the main feature extraction is considered unsuccessful. The preset value may be a preset value, for example, 70%. When the main feature extraction is successful, step S130 is performed; when the main feature extraction is unsuccessful, step S161 is performed.
例如,电子设备每秒提取一次主特征时,可以将连续5秒内提取到的5个主特征进行对比,以判断该5个主特征之间的相似度。当该5个主特征中每两个相邻主特征之间的相似度都大于70%时,即认为主特征提取成功。For example, when the electronic device extracts the main feature once per second, the five main features extracted within 5 seconds may be compared to determine the similarity between the five main features. When the similarity between each two adjacent main features of the five main features is greater than 70%, the main feature extraction is considered to be successful.
S161,若主特征提取不成功,则接收用户对取景框的触摸操作;S161, if the main feature extraction is unsuccessful, receiving a touch operation of the user on the finder frame;
S162,将该图像信息中与该触摸操作对应的区域确定为主特征。S162. Determine an area corresponding to the touch operation in the image information as a main feature.
其中,电子设备的取景框可以集成触摸感应功能,也即该取景框可以为触摸屏。当电子设备判断出主特征提取不成功时,可以在取景框中提示用户指定主特征。例如,可以在取景框中显示文本信息“请在图像信息中指定主特征”,以对用户进行提示。The viewfinder frame of the electronic device can integrate the touch sensing function, that is, the viewfinder frame can be a touch screen. When the electronic device determines that the main feature extraction is unsuccessful, the user may be prompted to specify the main feature in the finder frame. For example, the text message "Please specify the main feature in the image information" can be displayed in the finder frame to prompt the user.
随后,电子设备接收用户对取景框的触摸操作,并将图像信息中与该触摸操作对应的区域确定为主特征。其中,用户的触摸操作可以是点击操作,也可以是滑动操作。电子设备确定主特征后,随后执行步骤S130。Subsequently, the electronic device receives a touch operation of the user on the finder frame, and determines an area of the image information corresponding to the touch operation as a main feature. The user's touch operation may be a click operation or a sliding operation. After the electronic device determines the main feature, step S130 is subsequently performed.
在一些实施例中,如图3所示,在该取景框中建立斐波那契螺旋线包括以下步骤:In some embodiments, as shown in FIG. 3, establishing a Fibonacci spiral in the finder frame includes the following steps:
S131,分别沿取景框的横向和纵向以预设比例建立横向参考线和纵向参考线;S131, respectively establishing a horizontal reference line and a vertical reference line in a horizontal direction and a longitudinal direction of the finder frame;
S132,将横向参考线和纵向参考线的交点确定为原点;S132, determining an intersection of the horizontal reference line and the vertical reference line as an origin;
S133,以该原点为起始点在取景框内建立斐波那契螺旋线。S133, the Fibonacci spiral is established in the framing frame starting from the origin.
参考图6,可以理解的,取景框的横向和纵向分别为取景框的水平边和竖直边。预设比例可以为预先设置的一个数值。预设比例大于0并且小于1。Referring to FIG. 6, it can be understood that the horizontal and vertical directions of the finder frame are the horizontal side and the vertical side of the finder frame, respectively. The preset ratio can be a preset value. The preset ratio is greater than 0 and less than 1.
对于人的视觉而言,将一个物体以黄金分割比分为两个部分时,这两个部分具有很强的美感。因此,实际应用中,上述预设比例可以为黄金分割比(黄金分割比约为0.618)。For human vision, when an object is divided into two parts in a golden section, these two parts have a strong aesthetic. Therefore, in practical applications, the above preset ratio may be a golden ratio (the golden ratio is about 0.618).
电子设备可以分别以黄金分割比沿取景框的横向和纵向建立横向参考线和纵向参考线。其中,横向参考线将取景框分为上下两部分,下半部分与上半部分的比例为黄金分割比。纵向参考线将取景框分为左右两部分,左半部分与右半部分的比例为黄金分割比。The electronic device can establish lateral reference lines and longitudinal reference lines in the horizontal and vertical directions of the framing frame, respectively, in a golden section. Among them, the horizontal reference line divides the framing frame into upper and lower parts, and the ratio of the lower part to the upper part is the golden ratio. The vertical reference line divides the framing frame into two parts, and the ratio of the left half to the right half is the golden ratio.
随后,将横向参考线和纵向参考线的交点O确定为原点,以该原点为起始点在取景框内建立斐波那契螺旋线。Subsequently, the intersection O of the lateral reference line and the longitudinal reference line is determined as the origin, and the Fibonacci spiral is established in the finder frame starting from the origin.
建立斐波那契螺旋线的过程中,可以首先以O为原点、横向参考线为X轴、纵向参考线为Y轴,建立直角坐标系。随后,按照-Y、-X、+Y、+X的方向依次以斐波那契数列中的数值为长度作直线,来建立斐波那契螺旋线。最终建立的斐波那契螺旋线如图7所示。In the process of establishing the Fibonacci spiral, you can first establish a Cartesian coordinate system with O as the origin, the horizontal reference line as the X axis, and the vertical reference line as the Y axis. Then, the Fibonacci spiral is established by taking the values in the Fibonacci sequence as the straight line in the direction of -Y, -X, +Y, and +X. The final Fibonacci spiral is shown in Figure 7.
在一些实施例中,如图4所示,将横向参考线和纵向参考线的交点确定为原点包括以下步骤:In some embodiments, as shown in FIG. 4, determining the intersection of the lateral reference line and the longitudinal reference line as the origin includes the following steps:
S1321,分别沿取景框的横向和纵向建立横向中线和纵向中线,该横向中线和纵向中线将该取景框划分为四个区域;S1321, respectively, establishing a horizontal center line and a longitudinal center line along a lateral direction and a longitudinal direction of the finder frame, wherein the horizontal center line and the longitudinal center line divide the finder frame into four areas;
S1322,将该主特征所处的区域确定为起始区域;S1322, determining an area where the main feature is located as a starting area;
S1323,将该起始区域中横向参考线和纵向参考线的交点确定为原点。S1323, determining an intersection of the horizontal reference line and the vertical reference line in the starting area as an origin.
参考图8,其中,电子设备建立的横向参考线的数量为两条,纵向参考线的数量也为两条。横向参考线1的下部区域与上部区域的比例为黄金分割比,横向参考线2的上部区域与下部区域的比例为黄金分割比。纵向参考线1的左部区域与右部区域的比例为黄金分割比,纵向参考线2的右部区域与左部区域的比例为黄金分割比。两条横向参考线和两条纵向参考线形成四个交点A、B、C、D。Referring to FIG. 8, the number of horizontal reference lines established by the electronic device is two, and the number of vertical reference lines is also two. The ratio of the lower region to the upper region of the lateral reference line 1 is a golden ratio, and the ratio of the upper region to the lower region of the lateral reference line 2 is a golden ratio. The ratio of the left region to the right region of the longitudinal reference line 1 is a golden ratio, and the ratio of the right region to the left region of the longitudinal reference line 2 is a golden ratio. The two lateral reference lines and the two longitudinal reference lines form four intersections A, B, C, D.
本实施例中,电子设备分别沿取景框的横向和纵向建立横向中线和纵向中线。横向中线将取景框分为上下两半,纵向中线将取景框分为左右两半,横向中线和纵向中线将取景框分为四个区域:左下区域、左上区域、右上区域、右下区域。其中,交点A位于左下区域,交点B位于左上区域,交点C位于右上区域,交点D位于右下区域。In this embodiment, the electronic device establishes a horizontal center line and a longitudinal center line along the lateral direction and the longitudinal direction of the finder frame, respectively. The horizontal center line divides the framing frame into upper and lower halves. The vertical center line divides the framing frame into left and right halves. The horizontal center line and the vertical center line divide the framing frame into four areas: the lower left area, the upper left area, the upper right area, and the lower right area. Among them, the intersection point A is located in the lower left area, the intersection point B is located in the upper left area, the intersection point C is located in the upper right area, and the intersection point D is located in the lower right area.
电子设备可以判断步骤S120中提取到的主特征处于哪个区域,并将该区域确定为起始区域。当主特征跨越多个区域时,例如,主特征跨越左下区域和左上区域,则将主特征的大部分所处的区域确定为起始区域。The electronic device can determine which region the main feature extracted in step S120 is in and determine the region as the starting region. When the main feature spans a plurality of regions, for example, the main feature spans the lower left region and the upper left region, the region in which most of the main feature is located is determined as the start region.
随后,将起始区域中横向参考线和纵向参考线的交点确定为原点。Subsequently, the intersection of the lateral reference line and the longitudinal reference line in the starting area is determined as the origin.
建立斐波那契螺旋线的过程中,电子设备可以以起始区域中的横向参考线为X轴、纵向参考线为Y轴、以确定的原点建立直角坐标系。In the process of establishing the Fibonacci spiral, the electronic device can establish a Cartesian coordinate system with the horizontal reference line in the starting area as the X axis and the vertical reference line as the Y axis, and the determined origin.
当交点A为原点时,按照-Y、-X、+Y、+X的方向依次以斐波那契数列中的数值为长度作直线,来建立斐波那契螺旋线。最终建立的斐波那契螺旋线如图7所示。When the intersection A is the origin, the Fibonacci spiral is established by sequentially taking the values in the Fibonacci sequence as the straight line in the direction of -Y, -X, +Y, and +X. The final Fibonacci spiral is shown in Figure 7.
当交点B为原点时,按照+Y、-X、-Y、+X的方向依次以斐波那契数列中的数值为长度作直线,来建立斐波那契螺旋线。最终建立的斐波那契螺旋线如图9所示。When the intersection point B is the origin, the Fibonacci spiral is established by sequentially taking the values in the Fibonacci sequence as the straight line in the directions of +Y, -X, -Y, and +X. The final Fibonacci spiral is shown in Figure 9.
当交点C为原点时,按照+Y、+X、-Y、-X的方向依次以斐波那契数列中的数值为长度作直线,来建立斐波那契螺旋线。最终建立的斐波那契螺旋线如图10所示。When the intersection point C is the origin, the Fibonacci spiral is established by sequentially taking the values in the Fibonacci sequence as the straight line in the direction of +Y, +X, -Y, and -X. The final Fibonacci spiral is shown in Figure 10.
当交点D为原点时,按照-Y、+X、+Y、-X的方向依次以斐波那契数列中的数值为长度作直线,来建立斐波那契螺旋线。最终建立的斐波那契螺旋线如图11所示。When the intersection D is the origin, the Fibonacci spiral is established by sequentially taking the values in the Fibonacci sequence as the straight line in the direction of -Y, +X, +Y, and -X. The final Fibonacci spiral is shown in Figure 11.
需要说明的是,此处仅以取景框的横向长度大于纵向长度为例,对本发明实施例进行阐述。当取景框的横向长度小于纵向长度时,将横向数据与纵向数据进行互换即可。It should be noted that the embodiment of the present invention is described herein only by taking the lateral length of the finder frame as being larger than the longitudinal length. When the lateral length of the finder frame is smaller than the longitudinal length, the horizontal data and the vertical data may be interchanged.
继续参考图1。Continue to refer to Figure 1.
S140,根据该主特征确定斐波那契螺旋线中的目标区域,并在该取景框中提示该目标区域。S140. Determine a target area in the Fibonacci spiral according to the main feature, and prompt the target area in the finder frame.
其中,斐波那契螺旋线包括螺旋曲线和沿着该螺旋曲线分布的多个矩形。目标区域可以是斐波那契螺旋线上的一个点,也可以是斐波那契螺旋线上的一个矩形。电子设备根据主特征在斐波那契螺旋线中确定一个目标区域。例如,确定的目标区域为斐波那契螺旋线中的一个矩形,如图12所示。Wherein, the Fibonacci spiral comprises a spiral curve and a plurality of rectangles distributed along the spiral curve. The target area can be a point on the Fibonacci spiral or a rectangle on the Fibonacci spiral. The electronic device determines a target area in the Fibonacci spiral according to the main feature. For example, the determined target area is a rectangle in the Fibonacci spiral, as shown in FIG.
电子设备确定出斐波那契螺旋线中的目标区域后,在取景框中提示该目标区域。提示目标区域后,用户可以移动镜头以快速将主特征置于目标区域。从而可以使得用户快速取得最佳拍照效果。After the electronic device determines the target area in the Fibonacci spiral, the target area is prompted in the finder frame. After prompting the target area, the user can move the lens to quickly place the main feature in the target area. Thereby, the user can quickly obtain the best photographing effect.
需要注意的是,在取景框中建立的斐波那契螺旋线只是电子设备通过数据计算得出来的,对用户而言是不可见的。提示目标区域的方法可以有多种。It should be noted that the Fibonacci spiral created in the framing frame is only calculated by the electronic device and is invisible to the user. There are several ways to prompt the target area.
例如,如图13所示,可以在取景框中显示该目标区域。显示的方式可以是将目标区域边缘亮显,也可以通过目标区域闪烁的方式显示,还可以通过渐变等其他方式来显示。提示目标区域的方式包括但不限于上述列举的方式。For example, as shown in FIG. 13, the target area can be displayed in the finder frame. The display may be performed by highlighting the edge of the target area, by blinking the target area, or by other means such as gradation. The manner in which the target area is prompted includes, but is not limited to, the manner enumerated above.
在一些实施例中,如图14所示,提示目标区域的同时,还可以在取景框内显示文本提示,以增强提示效果。例如,文本提示可以是“将主特征置于提示框内”等信息。In some embodiments, as shown in FIG. 14, while the target area is presented, a text prompt may also be displayed in the finder frame to enhance the prompting effect. For example, the text prompt can be information such as "put the main feature in the prompt box".
用户将主特征置于目标区域后,拍照效果如图15所示。从而,用户能够快速达到最佳拍照效果。After the user places the main feature in the target area, the photographing effect is as shown in FIG. Thus, the user can quickly achieve the best photo effect.
在一些实施例中,如图3所示,根据该主特征确定斐波那契螺旋线中的目标区域,并在该取景框中提示该目标区域,包括以下步骤:In some embodiments, as shown in FIG. 3, determining a target area in the Fibonacci spiral according to the main feature, and prompting the target area in the finder frame, includes the following steps:
S141,获取该主特征的面积以及斐波那契螺旋线中每个矩形的面积;S141, obtaining an area of the main feature and an area of each rectangle in the Fibonacci spiral;
S142,分别将主特征的面积与斐波那契螺旋线中每个矩形的面积进行适配,以得到适配结果;S142, respectively, adapting an area of the main feature to an area of each rectangle in the Fibonacci spiral to obtain an adaptation result;
S143,根据该适配结果确定斐波那契螺旋线中的目标区域,并在取景框中提示该目标区域。S143. Determine a target area in the Fibonacci spiral according to the adaptation result, and prompt the target area in the finder frame.
其中,电子设备可以根据提取到的主特征来计算主特征的面积。同时,电子设备可以计算斐波那契螺旋线中每个矩形的面积。随后,将主特征的面积与每个矩形的面积进行适配,以确定与主特征的面积适配度最高的矩形。Wherein, the electronic device can calculate the area of the main feature according to the extracted main features. At the same time, the electronic device can calculate the area of each rectangle in the Fibonacci spiral. Subsequently, the area of the main feature is adapted to the area of each rectangle to determine the rectangle with the highest degree of area fit to the main feature.
随后,电子设备可以根据适配结果确定斐波那契螺旋线中的目标区域,并在取景框中提示该目标区域。Subsequently, the electronic device can determine the target area in the Fibonacci spiral according to the adaptation result, and prompt the target area in the finder frame.
在一些实施例中,如图4所示,分别将主特征的面积与斐波那契螺旋线中每个矩形的面积进行适配,以得到适配结果,包括以下步骤:In some embodiments, as shown in FIG. 4, the area of the main feature is respectively adapted to the area of each rectangle in the Fibonacci spiral to obtain an adaptation result, including the following steps:
S1421,分别计算主特征的面积与该每个矩形的面积的差值的绝对值;S1421, respectively calculating an absolute value of a difference between an area of the main feature and an area of each of the rectangles;
S1422,从计算得到的多个绝对值中确定出最小的绝对值;S1422: determining a minimum absolute value from the plurality of calculated absolute values;
根据该适配结果确定斐波那契螺旋线中的目标区域,并在取景框中提示该目标区域,包括:Determining the target area in the Fibonacci spiral according to the adaptation result, and prompting the target area in the finder frame, including:
S1431,将与最小的绝对值对应的矩形确定为目标区域,并在取景框中提示该目标区域。S1431: Determine a rectangle corresponding to the smallest absolute value as a target area, and prompt the target area in the finder frame.
其中,电子设备可以分别计算主特征的面积S0与斐波那契螺旋线中每个矩形的面积Sn(n为矩形面积由小到大排列时矩形的序号)的差值的绝对值|S0-Sn|,并将与最小的绝对值对应的矩形确定为目标区域。Wherein, the electronic device can separately calculate the absolute value of the difference between the area S0 of the main feature and the area Sn of each rectangle in the Fibonacci spiral (n is the number of the rectangle when the rectangular area is arranged from small to large)|S0- Sn|, and the rectangle corresponding to the smallest absolute value is determined as the target area.
例如,主特征的面积S0=5(其中,面积的单位可以为cm2),第一个矩形的面积S1=1,第二个矩形的面积S2=2,第三个矩形的面积S3=6,第四个矩形的面积S4=15,则|S0-S1|=4,|S0-S2|=3,|S0-S3|=1,|S0-S4|=10。此时,|S0-S3|的值最小,则可以将第三个矩形确定为目标区域。随后,在取景框中提示该目标区域。For example, the area of the main feature S0=5 (where the unit of the area may be cm2), the area of the first rectangle S1=1, the area of the second rectangle S2=2, and the area of the third rectangle S3=6, The area of the fourth rectangle S4=15, then |S0-S1|=4, |S0-S2|=3, |S0-S3|=1, |S0-S4|=10. At this time, the value of |S0-S3| is the smallest, and the third rectangle can be determined as the target area. Then, the target area is prompted in the finder frame.
具体实施时,本发明不受所描述的各个步骤的执行顺序的限制,在不产生冲突的情况下,某些步骤还可以采用其它顺序进行或者同时进行。In the specific implementation, the present invention is not limited by the order of execution of the various steps described. In the case where no conflict occurs, some steps may be performed in other orders or simultaneously.
由上可知,本发明实施例提供的拍照构图方法,获取取景框中的图像信息;对该图像信息进行分析,以提取该图像信息中的主特征;在该取景框中建立斐波那契螺旋线;根据该主特征确定斐波那契螺旋线中的目标区域,并在该取景框中提示该目标区域。该方案在取景框中建立斐波那契螺旋线,通过图像信息中的主特征确定斐波那契螺旋线中的目标区域,并提示该目标区域,以提醒用户将主特征置于目标区域从而快速达到最佳拍照效果。It can be seen that the photographing composition method provided by the embodiment of the present invention acquires image information in the framing frame; analyzes the image information to extract main features in the image information; and establishes a Fibonacci spiral in the framing frame. a line; determining a target area in the Fibonacci spiral according to the main feature, and prompting the target area in the finder frame. The scheme establishes a Fibonacci spiral in the framing frame, determines the target area in the Fibonacci spiral by the main features in the image information, and prompts the target area to remind the user to place the main feature in the target area. Quickly achieve the best photo results.
本发明实施例还提供一种拍照构图装置,该装置可以集成在电子设备中,该电子设备可以是数码相机、智能手机等电子设备。The embodiment of the present invention further provides a photo composition device, which can be integrated into an electronic device, and the electronic device can be an electronic device such as a digital camera or a smart phone.
如图16所示,拍照构图装置200包括:获取模块201、分析模块202、建立模块203、确定模块204。As shown in FIG. 16 , the photo composition device 200 includes an acquisition module 201 , an analysis module 202 , an establishment module 203 , and a determination module 204 .
获取模块201,用于获取取景框中的图像信息。The obtaining module 201 is configured to acquire image information in the finder frame.
其中,拍照构图装置可以集成在数码相机、智能手机等电子设备中。该电子设备具有摄像头和取景框。摄像头用于采集外部环境中的图像信息。摄像头采集到的图像信息可以显示在取景框中。智能手机在实现拍照功能时,摄像头采集到的图像信息可以显示在显示屏上。此时,智能手机的显示屏作为取景框。Among them, the photo composition device can be integrated in electronic devices such as digital cameras and smart phones. The electronic device has a camera and a framing frame. The camera is used to capture image information in the external environment. The image information captured by the camera can be displayed in the viewfinder. When the smartphone implements the camera function, the image information collected by the camera can be displayed on the display screen. At this point, the display of the smartphone acts as a framing frame.
在拍照过程中,用户可以通过取景框实时观察摄像头采集到的图像信息,从而对摄像头的位置、角度等进行调整,以获取更好的拍照效果。During the photographing process, the user can observe the image information collected by the camera in real time through the framing frame, thereby adjusting the position and angle of the camera to obtain a better photographing effect.
在拍照过程中,拍照构图装置中的获取模块201可以获取取景框中显示的图像信息,并对该图像信息进行分析处理。During the photographing process, the acquiring module 201 in the photographing composition device can acquire the image information displayed in the finder frame, and analyze and process the image information.
实际应用中,获取模块201可以每间隔一段时间即获取一次取景框中的图像信息。例如,可以每秒获取一次图像信息。In an actual application, the obtaining module 201 may acquire image information of the framing frame once every interval. For example, image information can be acquired once per second.
分析模块202,用于对该图像信息进行分析,以提取该图像信息中的主特征。The analyzing module 202 is configured to analyze the image information to extract a main feature in the image information.
其中,获取模块201获取到取景框中的图像信息后,分析模块202对该图像信息进行分析,以提取该图像信息中的主特征。图像信息通常包括主特征和背景。其中,主特征即为用户拍照过程中想要凸显的特征,例如人物、建筑物、动物等。背景即为主特征周围的环境信息。After the obtaining module 201 obtains the image information in the framing frame, the analyzing module 202 analyzes the image information to extract the main features in the image information. Image information typically includes a main feature and a background. Among them, the main feature is the feature that the user wants to highlight during the photographing process, such as characters, buildings, animals, and the like. The background is the environmental information around the main feature.
在一些实施例中,如图17所示,拍照构图装置200还包括:训练模块205。In some embodiments, as shown in FIG. 17, the photo composition device 200 further includes a training module 205.
训练模块205,用于应用卷积神经网络训练图像信息分析模型;a training module 205, configured to apply a convolutional neural network training image information analysis model;
分析模块202,用于通过该图像信息分析模型对该图像信息进行分析,以提取该图像信息中的主特征。The analyzing module 202 is configured to analyze the image information by using the image information analysis model to extract a main feature in the image information.
其中,卷积神经网络(Convolutional Neural Network,CNN)是一种前馈神经网络,可用于对图像进行处理。使用卷积神经网络对图像进行处理已经是成熟技术。Among them, Convolutional Neural Network (Convolutional Neural Network) Network, CNN) is a feedforward neural network that can be used to process images. Processing images using convolutional neural networks is a mature technology.
本发明实施例中,训练模块205可以应用卷积神经网络训练图像信息分析模型,并将图像信息分析模型存储到电子设备中。图像信息分析模型用于对图像进行分析和识别。获取模块201获取到图像信息后,分析模块202调用存储在该电子设备中的图像信息分析模型对该图像信息进行分析,以提取该图像信息中的主特征。In the embodiment of the present invention, the training module 205 may apply the convolutional neural network to train the image information analysis model, and store the image information analysis model in the electronic device. The image information analysis model is used to analyze and identify images. After the obtaining module 201 obtains the image information, the analyzing module 202 calls the image information analysis model stored in the electronic device to analyze the image information to extract the main features in the image information.
建立模块203,用于在该取景框中建立斐波那契螺旋线。A module 203 is created for establishing a Fibonacci spiral in the framing frame.
其中,斐波那契螺旋线也称为“黄金螺旋”,是根据斐波那契数列画出来的螺旋曲线,沿着该螺旋曲线分布有多个矩形。Among them, the Fibonacci spiral is also called the "golden spiral", which is a spiral curve drawn according to the Fibonacci sequence, along which a plurality of rectangles are distributed.
分析模块202提取到图像信息中的主特征后,建立模块203可以在取景框中建立斐波那契螺旋线。After the analysis module 202 extracts the main features in the image information, the building module 203 can establish a Fibonacci spiral in the framing frame.
在一些实施例中,如图18所示,拍照构图装置200还包括:判断模块206。In some embodiments, as shown in FIG. 18, the photo composition device 200 further includes a determination module 206.
判断模块206,用于判断主特征提取是否成功;The determining module 206 is configured to determine whether the main feature extraction is successful;
该建立模块203,用于在判断模块206判断为是时,在该取景框中建立斐波那契螺旋线。The establishing module 203 is configured to establish a Fibonacci spiral in the finder frame when the determining module 206 determines YES.
其中,判断模块206可以将一段时间内提取到的多个主特征进行对比,以判断该一段时间内的多个主特征之间的相似度。当每两个相邻主特征之间的相似度均大于预设值时,即认为主特征提取成功,否则即认为主特征提取不成功。其中,预设值可以为预先设置的一个数值,例如70%。主特征提取成功时,建立模块203在该取景框中建立斐波那契螺旋线。The judging module 206 may compare the plurality of main features extracted within a period of time to determine the similarity between the plurality of main features in the period of time. When the similarity between each two adjacent main features is greater than the preset value, the main feature extraction is considered to be successful, otherwise the main feature extraction is considered unsuccessful. The preset value may be a preset value, for example, 70%. When the main feature extraction is successful, the building module 203 creates a Fibonacci spiral in the framing frame.
例如,分析模块202每秒提取一次主特征时,判断模块206可以将连续5秒内提取到的5个主特征进行对比,以判断该5个主特征之间的相似度。当该5个主特征中每两个相邻主特征之间的相似度都大于70%时,即认为主特征提取成功。For example, when the analysis module 202 extracts the main feature once per second, the judging module 206 can compare the five main features extracted within 5 seconds to determine the similarity between the five main features. When the similarity between each two adjacent main features of the five main features is greater than 70%, the main feature extraction is considered to be successful.
在一些实施例中,判断模块206还用于:In some embodiments, the determining module 206 is further configured to:
若主特征提取不成功,则接收用户对取景框的触摸操作;Receiving a user touch operation on the finder frame if the main feature extraction is unsuccessful;
将该图像信息中与该触摸操作对应的区域确定为主特征。An area of the image information corresponding to the touch operation is determined as a main feature.
其中,电子设备的取景框可以集成触摸感应功能,也即该取景框可以为触摸屏。当判断模块206判断出主特征提取不成功时,可以在取景框中提示用户指定主特征。例如,可以在取景框中显示文本信息“请在图像信息中指定主特征”,以对用户进行提示。The viewfinder frame of the electronic device can integrate the touch sensing function, that is, the viewfinder frame can be a touch screen. When the judging module 206 judges that the main feature extraction is unsuccessful, the user may be prompted to specify the main feature in the framing frame. For example, the text message "Please specify the main feature in the image information" can be displayed in the finder frame to prompt the user.
随后,判断模块206接收用户对取景框的触摸操作,并将图像信息中与该触摸操作对应的区域确定为主特征。其中,用户的触摸操作可以是点击操作,也可以是滑动操作。确定主特征后,建立模块203在取景框中建立斐波那契螺旋线。Subsequently, the judging module 206 receives the touch operation of the user on the finder frame, and determines an area corresponding to the touch operation in the image information as the main feature. The user's touch operation may be a click operation or a sliding operation. After determining the primary feature, the setup module 203 creates a Fibonacci spiral in the framing frame.
在一些实施例中,如图19所示,建立模块203包括:第一建立子模块2031、第二确定子模块2032、第二建立子模块2033。In some embodiments, as shown in FIG. 19, the establishing module 203 includes: a first establishing submodule 2031, a second determining submodule 2032, and a second establishing submodule 2033.
第一建立子模块2031,用于分别沿取景框的横向和纵向以预设比例建立横向参考线和纵向参考线;a first establishing sub-module 2031, configured to respectively establish a horizontal reference line and a vertical reference line in a horizontal direction and a longitudinal direction of the finder frame;
第二确定子模块2032,用于将横向参考线和纵向参考线的交点确定为原点;a second determining sub-module 2032, configured to determine an intersection of the horizontal reference line and the vertical reference line as an origin;
第二建立子模块2033,用于以该原点为起始点在取景框内建立斐波那契螺旋线。The second establishing sub-module 2033 is configured to establish a Fibonacci spiral in the finder frame starting from the origin.
可以理解的,取景框的横向和纵向分别为取景框的水平边和竖直边。预设比例可以为预先设置的一个数值。预设比例大于0并且小于1。It can be understood that the horizontal and vertical directions of the finder frame are the horizontal edge and the vertical edge of the finder frame, respectively. The preset ratio can be a preset value. The preset ratio is greater than 0 and less than 1.
对于人的视觉而言,将一个物体以黄金分割比分为两个部分时,这两个部分具有很强的美感。因此,实际应用中,上述预设比例可以为黄金分割比(黄金分割比约为0.618)。For human vision, when an object is divided into two parts in a golden section, these two parts have a strong aesthetic. Therefore, in practical applications, the above preset ratio may be a golden ratio (the golden ratio is about 0.618).
第一建立子模块2031可以分别以黄金分割比沿取景框的横向和纵向建立横向参考线和纵向参考线。其中,横向参考线将取景框分为上下两部分,下半部分与上半部分的比例为黄金分割比。纵向参考线将取景框分为左右两部分,左半部分与右半部分的比例为黄金分割比。The first establishing sub-module 2031 may respectively establish a lateral reference line and a longitudinal reference line in a lateral direction and a longitudinal direction of the finder frame in a golden section ratio. Among them, the horizontal reference line divides the framing frame into upper and lower parts, and the ratio of the lower part to the upper part is the golden ratio. The vertical reference line divides the framing frame into two parts, and the ratio of the left half to the right half is the golden ratio.
随后,第二确定子模块2032将横向参考线和纵向参考线的交点O确定为原点,第二建立子模块2033以该原点为起始点在取景框内建立斐波那契螺旋线。Subsequently, the second determining sub-module 2032 determines the intersection O of the lateral reference line and the longitudinal reference line as the origin, and the second establishing sub-module 2033 establishes a Fibonacci spiral in the finder frame starting from the origin.
建立斐波那契螺旋线的过程中,可以首先以O为原点、横向参考线为X轴、纵向参考线为Y轴,建立直角坐标系。随后,按照-Y、-X、+Y、+X的方向依次以斐波那契数列中的数值为长度作直线,来建立斐波那契螺旋线。In the process of establishing the Fibonacci spiral, you can first establish a Cartesian coordinate system with O as the origin, the horizontal reference line as the X axis, and the vertical reference line as the Y axis. Then, the Fibonacci spiral is established by taking the values in the Fibonacci sequence as the straight line in the direction of -Y, -X, +Y, and +X.
在一些实施例中,第二确定子模块2032用于执行以下步骤:In some embodiments, the second determining sub-module 2032 is configured to perform the following steps:
分别沿取景框的横向和纵向建立横向中线和纵向中线,该横向中线和纵向中线将该取景框划分为四个区域;Forming a horizontal center line and a longitudinal center line along the lateral direction and the longitudinal direction of the finder frame, respectively, the horizontal center line and the longitudinal center line dividing the finder frame into four areas;
将该主特征所处的区域确定为起始区域;Determining the area in which the main feature is located as the starting area;
将该起始区域中横向参考线和纵向参考线的交点确定为原点。The intersection of the lateral reference line and the longitudinal reference line in the starting area is determined as the origin.
参考图8,其中,第一建立子模块2031建立的横向参考线的数量为两条,纵向参考线的数量也为两条。横向参考线1的下部区域与上部区域的比例为黄金分割比,横向参考线2的上部区域与下部区域的比例为黄金分割比。纵向参考线1的左部区域与右部区域的比例为黄金分割比,纵向参考线2的右部区域与左部区域的比例为黄金分割比。两条横向参考线和两条纵向参考线形成四个交点A、B、C、D。Referring to FIG. 8 , the number of horizontal reference lines established by the first establishing submodule 2031 is two, and the number of vertical reference lines is also two. The ratio of the lower region to the upper region of the lateral reference line 1 is a golden ratio, and the ratio of the upper region to the lower region of the lateral reference line 2 is a golden ratio. The ratio of the left region to the right region of the longitudinal reference line 1 is a golden ratio, and the ratio of the right region to the left region of the longitudinal reference line 2 is a golden ratio. The two lateral reference lines and the two longitudinal reference lines form four intersections A, B, C, D.
本实施例中,第二确定子模块2032分别沿取景框的横向和纵向建立横向中线和纵向中线。横向中线将取景框分为上下两半,纵向中线将取景框分为左右两半,横向中线和纵向中线将取景框分为四个区域:左下区域、左上区域、右上区域、右下区域。其中,交点A位于左下区域,交点B位于左上区域,交点C位于右上区域,交点D位于右下区域。In this embodiment, the second determining sub-module 2032 establishes a horizontal center line and a longitudinal center line respectively in the lateral direction and the longitudinal direction of the finder frame. The horizontal center line divides the framing frame into upper and lower halves. The vertical center line divides the framing frame into left and right halves. The horizontal center line and the vertical center line divide the framing frame into four areas: the lower left area, the upper left area, the upper right area, and the lower right area. Among them, the intersection point A is located in the lower left area, the intersection point B is located in the upper left area, the intersection point C is located in the upper right area, and the intersection point D is located in the lower right area.
第二确定子模块2032可以判断分析模块202提取到的主特征处于哪个区域,并将该区域确定为起始区域。当主特征跨越多个区域时,例如,主特征跨越左下区域和左上区域,则将主特征的大部分所处的区域确定为起始区域。The second determining sub-module 2032 can determine which region the main feature extracted by the analyzing module 202 is in, and determine the region as the starting region. When the main feature spans a plurality of regions, for example, the main feature spans the lower left region and the upper left region, the region in which most of the main feature is located is determined as the start region.
随后,将起始区域中横向参考线和纵向参考线的交点确定为原点。Subsequently, the intersection of the lateral reference line and the longitudinal reference line in the starting area is determined as the origin.
确定模块204,用于根据该主特征确定斐波那契螺旋线中的目标区域,并在该取景框中提示该目标区域。The determining module 204 is configured to determine a target area in the Fibonacci spiral according to the main feature, and prompt the target area in the finder frame.
其中,斐波那契螺旋线包括螺旋曲线和沿着该螺旋曲线分布的多个矩形。目标区域可以是斐波那契螺旋线上的一个点,也可以是斐波那契螺旋线上的一个矩形。确定模块204根据主特征在斐波那契螺旋线中确定一个目标区域,并在取景框中提示该目标区域。提示目标区域后,用户可以移动镜头以快速将主特征置于目标区域。从而可以使得用户快速取得最佳拍照效果。Wherein, the Fibonacci spiral comprises a spiral curve and a plurality of rectangles distributed along the spiral curve. The target area can be a point on the Fibonacci spiral or a rectangle on the Fibonacci spiral. The determination module 204 determines a target area in the Fibonacci spiral according to the main feature and prompts the target area in the finder frame. After prompting the target area, the user can move the lens to quickly place the main feature in the target area. Thereby, the user can quickly obtain the best photographing effect.
需要注意的是,在取景框中建立的斐波那契螺旋线只是电子设备通过数据计算得出来的,对用户而言是不可见的。提示目标区域的方法可以有多种。It should be noted that the Fibonacci spiral created in the framing frame is only calculated by the electronic device and is invisible to the user. There are several ways to prompt the target area.
例如,可以在取景框中显示该目标区域。显示的方式可以是将目标区域边缘亮显,也可以通过目标区域闪烁的方式显示,还可以通过渐变等其他方式来显示。提示目标区域的方式包括但不限于上述列举的方式。For example, the target area can be displayed in the finder frame. The display may be performed by highlighting the edge of the target area, by blinking the target area, or by other means such as gradation. The manner in which the target area is prompted includes, but is not limited to, the manner enumerated above.
在一些实施例中,提示目标区域的同时,还可以在取景框内显示文本提示,以增强提示效果。例如,文本提示可以是“将主特征置于提示框内”等信息。In some embodiments, while prompting the target area, a text prompt may also be displayed in the finder frame to enhance the prompting effect. For example, the text prompt can be information such as "put the main feature in the prompt box".
在一些实施例中,如图20所示,确定模块204包括:获取子模块2041、适配子模块2042、第一确定子模块2043。In some embodiments, as shown in FIG. 20, the determining module 204 includes: an obtaining submodule 2041, an adapting submodule 2042, and a first determining submodule 2043.
获取子模块2041,用于获取该主特征的面积以及斐波那契螺旋线中每个矩形的面积;Obtaining a sub-module 2041, configured to obtain an area of the main feature and an area of each rectangle in the Fibonacci spiral;
适配子模块2042,用于分别将主特征的面积与斐波那契螺旋线中每个矩形的面积进行适配,以得到适配结果;The adaptation sub-module 2042 is configured to respectively adapt an area of the main feature to an area of each rectangle in the Fibonacci spiral to obtain an adaptation result;
第一确定子模块2043,用于根据该适配结果确定斐波那契螺旋线中的目标区域,并在取景框中提示该目标区域。The first determining sub-module 2043 is configured to determine a target area in the Fibonacci spiral according to the adaptation result, and prompt the target area in the finder frame.
其中,获取子模块2041可以根据提取到的主特征来计算主特征的面积。同时,获取子模块2041可以计算斐波那契螺旋线中每个矩形的面积。随后,适配子模块2042将主特征的面积与每个矩形的面积进行适配,以确定与主特征的面积适配度最高的矩形。The obtaining sub-module 2041 may calculate the area of the main feature according to the extracted main features. At the same time, the acquisition sub-module 2041 can calculate the area of each rectangle in the Fibonacci spiral. The adaptor sub-module 2042 then adapts the area of the main feature to the area of each rectangle to determine the rectangle with the highest degree of area fit to the main feature.
随后,第一确定子模块2043可以根据适配结果确定斐波那契螺旋线中的目标区域,并在取景框中提示该目标区域。Subsequently, the first determining sub-module 2043 may determine a target area in the Fibonacci spiral according to the fitting result, and prompt the target area in the finder frame.
在一些实施例中,适配子模块2042用于执行以下步骤:In some embodiments, the adaptation sub-module 2042 is configured to perform the following steps:
分别计算主特征的面积与该每个矩形的面积的差值的绝对值;Calculating an absolute value of a difference between an area of the main feature and an area of each of the rectangles, respectively;
从计算得到的多个绝对值中确定出最小的绝对值;Determining a minimum absolute value from the plurality of calculated absolute values;
第一确定子模块2043用于执行以下步骤:The first determining submodule 2043 is configured to perform the following steps:
将与最小的绝对值对应的矩形确定为目标区域,并在取景框中提示该目标区域。A rectangle corresponding to the smallest absolute value is determined as the target area, and the target area is prompted in the finder frame.
其中,适配子模块2042可以分别计算主特征的面积S0与斐波那契螺旋线中每个矩形的面积Sn(n为矩形面积由小到大排列时矩形的序号)的差值的绝对值|S0-Sn|。随后,第一确定子模块2043将与最小的绝对值对应的矩形确定为目标区域。The adapting sub-module 2042 can calculate the absolute value of the difference between the area S0 of the main feature and the area Sn of each rectangle in the Fibonacci spiral (n is the number of the rectangle when the rectangular area is arranged from small to large). |S0-Sn|. Subsequently, the first determination sub-module 2043 determines a rectangle corresponding to the smallest absolute value as the target area.
例如,主特征的面积S0=5(其中,面积的单位可以为cm2),第一个矩形的面积S1=1,第二个矩形的面积S2=2,第三个矩形的面积S3=6,第四个矩形的面积S4=15,则|S0-S1|=4,|S0-S2|=3,|S0-S3|=1,|S0-S4|=10。此时,|S0-S3|的值最小,则第一确定子模块2043可以将第三个矩形确定为目标区域,并在取景框中提示该目标区域。For example, the area of the main feature S0=5 (where the unit of the area may be cm2), the area of the first rectangle S1=1, the area of the second rectangle S2=2, and the area of the third rectangle S3=6, The area of the fourth rectangle S4=15, then |S0-S1|=4, |S0-S2|=3, |S0-S3|=1, |S0-S4|=10. At this time, the value of |S0-S3| is the smallest, the first determining sub-module 2043 may determine the third rectangle as the target area, and present the target area in the finder frame.
具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现。In the specific implementation, each of the above modules may be implemented as a separate entity, or may be implemented in any combination as one or several entities.
由上可知,本发明实施例提供的拍照构图装置200,通过获取模块201获取取景框中的图像信息;分析模块202对该图像信息进行分析,以提取该图像信息中的主特征;建立模块203在该取景框中建立斐波那契螺旋线;确定模块204根据该主特征确定斐波那契螺旋线中的目标区域,并在该取景框中提示该目标区域。该方案在取景框中建立斐波那契螺旋线,通过图像信息中的主特征确定斐波那契螺旋线中的目标区域,并提示该目标区域,以提醒用户将主特征置于目标区域从而快速达到最佳拍照效果。It can be seen that the photographing composition device 200 provided by the embodiment of the present invention acquires the image information in the framing frame by the obtaining module 201; the analyzing module 202 analyzes the image information to extract the main features in the image information; and the establishing module 203 A Fibonacci spiral is established in the framing frame; the determination module 204 determines a target area in the Fibonacci spiral according to the main feature, and prompts the target area in the finder frame. The scheme establishes a Fibonacci spiral in the framing frame, determines the target area in the Fibonacci spiral by the main features in the image information, and prompts the target area to remind the user to place the main feature in the target area. Quickly achieve the best photo results.
本发明实施例还提供一种电子设备,用于执行上述拍照构图方法。该电子设备可以是数码相机、智能手机等设备,还可以是其他设备。以下仅以该电子设备为智能手机进行举例说明。The embodiment of the invention further provides an electronic device for performing the above photo composition method. The electronic device may be a device such as a digital camera or a smart phone, or may be another device. The following only illustrates the electronic device as a smart phone.
如图21所示,电子设备300包括摄像头301、触摸屏302、存储器303、处理器304以及电源305。As shown in FIG. 21, the electronic device 300 includes a camera 301, a touch screen 302, a memory 303, a processor 304, and a power source 305.
其中,摄像头301用于采集外部图像信息。摄像头301可以包括前置摄像头和后置摄像头。摄像头301的数量可以为一个或多个。The camera 301 is used to collect external image information. The camera 301 can include a front camera and a rear camera. The number of cameras 301 can be one or more.
触摸屏302与摄像头301和处理器303电连接。触摸屏302用于接收用户的触摸操作,并将该触摸操作的触摸信息传输到处理器303,以使得电子设备300对用户的触摸操作进行响应。触摸屏302还可以作为电子设备300的显示屏,用于向用户显示图像、文本等信息。其中,触摸屏302可以显示摄像头301采集到的图像信息。The touch screen 302 is electrically connected to the camera 301 and the processor 303. The touch screen 302 is configured to receive a touch operation of the user and transmit the touch information of the touch operation to the processor 303 to cause the electronic device 300 to respond to the touch operation of the user. The touch screen 302 can also serve as a display screen of the electronic device 300 for displaying information such as images, texts, and the like to the user. The touch screen 302 can display image information collected by the camera 301.
存储器303可用于存储应用程序和数据。存储器303存储的应用程序中包含有可执行程序代码。应用程序可以组成各种功能模块。处理器304通过运行存储在存储器303的应用程序,从而执行各种功能应用以及数据处理。Memory 303 can be used to store applications and data. The application stored in the memory 303 contains executable program code. Applications can form various functional modules. The processor 304 executes various functional applications and data processing by running an application stored in the memory 303.
处理器304是电子设备300的控制中心,利用各种接口和线路连接电子设备300的各个部分,通过运行或执行存储在存储器303内的应用程序,以及调用存储在存储器303内的数据,执行电子设备300的各种功能和处理数据。The processor 304 is a control center of the electronic device 300, and connects various parts of the electronic device 300 using various interfaces and lines, executes the electronic by running or executing an application stored in the memory 303, and calling data stored in the memory 303. Various functions and processing data of device 300.
电源305可以通过电源管理系统与处理器304逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The power supply 305 can be logically coupled to the processor 304 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
在本实施例中,电子设备300中的处理器304会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行程序代码加载到存储器303中,并由处理器304来运行存储在存储器303中的应用程序,从而实现各种功能:In this embodiment, the processor 304 in the electronic device 300 loads the executable program code corresponding to the process of one or more applications into the memory 303 according to the following instructions, and the processor 304 runs the storage. The application in memory 303 thus implements various functions:
获取取景框中的图像信息;Get image information in the frame;
对该图像信息进行分析,以提取该图像信息中的主特征;And analyzing the image information to extract main features in the image information;
在该取景框中建立斐波那契螺旋线;Create a Fibonacci spiral in the view frame;
根据该主特征确定斐波那契螺旋线中的目标区域,并在该取景框中提示该目标区域。A target area in the Fibonacci spiral is determined based on the main feature, and the target area is prompted in the finder frame.
在一些实施例中,获取取景框中的图像信息前,处理器304还用于:应用卷积神经网络训练图像信息分析模型;对该图像信息进行分析,以提取该图像信息中的主特征时,处理器304用于:通过该图像信息分析模型对该图像信息进行分析,以提取该图像信息中的主特征。In some embodiments, before acquiring the image information in the finder frame, the processor 304 is further configured to: apply the convolutional neural network training image information analysis model; and analyze the image information to extract the main features in the image information. The processor 304 is configured to: analyze the image information by using the image information analysis model to extract a main feature in the image information.
在一些实施例中,在该取景框中建立斐波那契螺旋线前,处理器304还用于:判断主特征提取是否成功;若主特征提取成功,则在该取景框中建立斐波那契螺旋线。In some embodiments, before the Fibonacci spiral is established in the finder frame, the processor 304 is further configured to: determine whether the main feature extraction is successful; if the main feature extraction is successful, establish a Fibonacci in the finder frame. The spiral line.
在一些实施例中,在该取景框中建立斐波那契螺旋线前,处理器304还用于:若主特征提取不成功,则接收用户对该取景框的触摸操作;将该图像信息中与该触摸操作对应的区域确定为主特征。In some embodiments, before the Fibonacci spiral is established in the finder frame, the processor 304 is further configured to: if the main feature extraction is unsuccessful, receive a touch operation of the user on the finder frame; The area corresponding to the touch operation is determined to be the main feature.
在一些实施例中,斐波那契螺旋线包括螺旋曲线以及沿该螺旋曲线分布的多个矩形,根据该主特征确定斐波那契螺旋线中的目标区域,并在该取景框中提示该目标区域时,处理器304用于:获取该主特征的面积以及每个矩形的面积;分别将主特征的面积与每个矩形的面积进行适配,以得到适配结果;根据该适配结果确定斐波那契螺旋线中的目标区域,并在该取景框中提示该目标区域。In some embodiments, the Fibonacci spiral includes a spiral curve and a plurality of rectangles distributed along the spiral curve, determining a target area in the Fibonacci spiral according to the main feature, and prompting the frame in the finder frame When the target area is used, the processor 304 is configured to: acquire an area of the main feature and an area of each rectangle; and respectively adapt an area of the main feature to an area of each rectangle to obtain an adaptation result; according to the adaptation result Determine the target area in the Fibonacci spiral and prompt the target area in the frame.
在一些实施例中,分别将主特征的面积与每个矩形的面积进行适配,以得到适配结果时,处理器304用于:分别计算主特征的面积与每个矩形的面积的差值的绝对值;从计算得到的多个绝对值中确定出最小的绝对值;根据该适配结果确定斐波那契螺旋线中的目标区域,并在该取景框中提示该目标区域时,处理器304用于:将与最小的绝对值对应的矩形确定为目标区域,并在该取景框中提示该目标区域。In some embodiments, the area of the main feature is respectively adapted to the area of each rectangle to obtain an adaptation result, and the processor 304 is configured to separately calculate the difference between the area of the main feature and the area of each rectangle. Absolute value; determining a minimum absolute value from the calculated plurality of absolute values; determining a target area in the Fibonacci spiral according to the fitting result, and processing the target area when the target frame is processed The device 304 is configured to: determine a rectangle corresponding to the smallest absolute value as the target area, and prompt the target area in the finder frame.
在一些实施例中,在该取景框中建立斐波那契螺旋线时,处理器304用于:分别沿该取景框的横向和纵向以预设比例建立横向参考线和纵向参考线;将横向参考线和纵向参考线的交点确定为原点;以该原点为起始点在该取景框中建立斐波那契螺旋线。In some embodiments, when the Fibonacci spiral is established in the finder frame, the processor 304 is configured to: establish horizontal reference lines and longitudinal reference lines at a preset ratio along the lateral and longitudinal directions of the finder frame; The intersection of the reference line and the longitudinal reference line is determined as the origin; the Fibonacci spiral is established in the finder frame starting from the origin.
在一些实施例中,该横向参考线为两条,纵向参考线也为两条,将横向参考线和纵向参考线的交点确定为原点时,处理器304用于:分别沿该取景框的横向和纵向建立横向中线和纵向中线,该横向中线和纵向中线将该取景框划分为四个区域;将该主特征所处的区域确定为起始区域;将该起始区域中横向参考线和纵向参考线的交点确定为原点。In some embodiments, the transverse reference line is two, and the longitudinal reference line is also two. When the intersection of the horizontal reference line and the longitudinal reference line is determined as the origin, the processor 304 is configured to: respectively follow the transverse direction of the finder frame. And a longitudinal center line and a longitudinal center line, wherein the horizontal center line and the longitudinal center line divide the finder frame into four areas; the area where the main feature is located is determined as a start area; the horizontal reference line and the vertical direction in the start area The intersection of the reference lines is determined as the origin.
上述实施例中,对各个实施例的描述都各有侧重,某些实施例中没有详细描述的部分,可以参见前面对拍照构图方法的详细描述,在此不再赘述。In the foregoing embodiments, the descriptions of the various embodiments are different, and the detailed description of the method for photographing the composition is not described in detail.
由上可知,本发明实施例提供了一种电子设备,该电子设备获取取景框中的图像信息;对该图像信息进行分析,以提取该图像信息中的主特征;在该取景框中建立斐波那契螺旋线;根据该主特征确定斐波那契螺旋线中的目标区域,并在该取景框中提示该目标区域。该方案在取景框中建立斐波那契螺旋线,通过图像信息中的主特征确定斐波那契螺旋线中的目标区域,并提示该目标区域,以提醒用户将主特征置于目标区域从而快速达到最佳拍照效果。As can be seen from the above, an embodiment of the present invention provides an electronic device that acquires image information in a framing frame, analyzes the image information to extract a main feature in the image information, and establishes a Philip in the framing frame. a Bonachet spiral; the target area in the Fibonacci spiral is determined based on the main feature, and the target area is prompted in the finder frame. The scheme establishes a Fibonacci spiral in the framing frame, determines the target area in the Fibonacci spiral by the main features in the image information, and prompts the target area to remind the user to place the main feature in the target area. Quickly achieve the best photo results.
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。It should be noted that those skilled in the art can understand that all or part of the steps of the foregoing embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium and stored. Media can include: read only memory (ROM, Read Only Memory), Random Access Memory (RAM), disk or optical disk.
以上对本发明实施例提供的拍照构图方法、装置及电子设备进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The photographing method, device and electronic device provided by the embodiments of the present invention are described in detail above. The principles and embodiments of the present invention are described in the following. The description of the above embodiments is only for helping to understand the present invention. The method and its core idea; at the same time, those skilled in the art, according to the idea of the present invention, there will be changes in the specific embodiments and application scope. In summary, the content of this specification should not be construed as Limitations of the invention.

Claims (20)

  1. 一种拍照构图方法,应用于电子设备中,所述电子设备包括取景框,其中,所述拍照构图方法包括:A photographing composition method is applied to an electronic device, where the electronic device includes a framing frame, wherein the photo composition method includes:
    获取所述取景框中的图像信息;Obtaining image information in the finder frame;
    对所述图像信息进行分析,以提取所述图像信息中的主特征;Performing analysis on the image information to extract main features in the image information;
    在所述取景框中建立斐波那契螺旋线;Establishing a Fibonacci spiral in the framing frame;
    根据所述主特征确定斐波那契螺旋线中的目标区域,并在所述取景框中提示所述目标区域。Determining a target area in the Fibonacci spiral according to the main feature and presenting the target area in the finder frame.
  2. 根据权利要求1所述的拍照构图方法,其中,获取所述取景框中的图像信息的步骤前,所述拍照构图方法还包括:The photographing composition method according to claim 1, wherein the photographing composition method further comprises: before the step of acquiring the image information in the framing frame:
    应用卷积神经网络训练图像信息分析模型;Applying a convolutional neural network to train an image information analysis model;
    对所述图像信息进行分析,以提取所述图像信息中的主特征的步骤包括:The step of analyzing the image information to extract the main features in the image information comprises:
    通过所述图像信息分析模型对所述图像信息进行分析,以提取所述图像信息中的主特征。The image information is analyzed by the image information analysis model to extract a main feature in the image information.
  3. 根据权利要求1所述的拍照构图方法,其中,在所述取景框中建立斐波那契螺旋线的步骤前,所述拍照构图方法还包括:The photographing composition method according to claim 1, wherein before the step of establishing a Fibonacci spiral in the framing frame, the photographing composition method further comprises:
    判断主特征提取是否成功;Determine whether the main feature extraction is successful;
    若主特征提取成功,则在所述取景框中建立斐波那契螺旋线。If the main feature extraction is successful, a Fibonacci spiral is created in the framing frame.
  4. 根据权利要求3所述的拍照构图方法,其中,在所述取景框中建立斐波那契螺旋线的步骤前,所述拍照构图方法还包括:The photographing composition method according to claim 3, wherein before the step of establishing a Fibonacci spiral in the framing frame, the photographing composition method further comprises:
    若主特征提取不成功,则接收用户对所述取景框的触摸操作;Receiving, by the user, a touch operation on the finder frame if the main feature extraction is unsuccessful;
    将所述图像信息中与所述触摸操作对应的区域确定为主特征。An area of the image information corresponding to the touch operation is determined as a main feature.
  5. 根据权利要求1所述的拍照构图方法,其中,斐波那契螺旋线包括螺旋曲线以及沿所述螺旋曲线分布的多个矩形,根据所述主特征确定斐波那契螺旋线中的目标区域,并在所述取景框中提示所述目标区域的步骤包括:The photographing patterning method according to claim 1, wherein the Fibonacci spiral includes a spiral curve and a plurality of rectangles distributed along the spiral curve, and the target region in the Fibonacci spiral is determined according to the main feature And prompting the target area in the finder frame includes:
    获取所述主特征的面积以及每个所述矩形的面积;Obtaining an area of the main feature and an area of each of the rectangles;
    分别将主特征的面积与每个矩形的面积进行适配,以得到适配结果;Adapting the area of the main feature to the area of each rectangle to obtain an adaptation result;
    根据所述适配结果确定斐波那契螺旋线中的目标区域,并在所述取景框中提示所述目标区域。Determining a target area in the Fibonacci spiral according to the adaptation result, and prompting the target area in the finder frame.
  6. 根据权利要求5所述的拍照构图方法,其中,分别将主特征的面积与每个矩形的面积进行适配,以得到适配结果的步骤包括:The photographing composition method according to claim 5, wherein the step of respectively adapting the area of the main feature to the area of each rectangle to obtain an adaptation result comprises:
    分别计算主特征的面积与每个矩形的面积的差值的绝对值;Calculating the absolute values of the difference between the area of the main feature and the area of each rectangle, respectively;
    从计算得到的多个绝对值中确定出最小的绝对值;Determining a minimum absolute value from the plurality of calculated absolute values;
    根据所述适配结果确定斐波那契螺旋线中的目标区域,并在所述取景框中提示所述目标区域的步骤包括:Determining a target area in the Fibonacci spiral according to the adaptation result, and prompting the target area in the finder frame comprises:
    将与最小的绝对值对应的矩形确定为目标区域,并在所述取景框中提示所述目标区域。A rectangle corresponding to the smallest absolute value is determined as the target area, and the target area is presented in the finder frame.
  7. 根据权利要求1所述的拍照构图方法,其中,在所述取景框中建立斐波那契螺旋线的步骤包括:The photographing composition method according to claim 1, wherein the step of establishing a Fibonacci spiral in the framing frame comprises:
    分别沿所述取景框的横向和纵向以预设比例建立横向参考线和纵向参考线;Establishing horizontal reference lines and longitudinal reference lines at a preset ratio along the lateral and longitudinal directions of the finder frame;
    将横向参考线和纵向参考线的交点确定为原点;Determining the intersection of the lateral reference line and the longitudinal reference line as the origin;
    以所述原点为起始点在所述取景框中建立斐波那契螺旋线。A Fibonacci spiral is established in the finder frame starting from the origin.
  8. 根据权利要求7所述的拍照构图方法,其中,所述横向参考线为两条,所述纵向参考线也为两条,将横向参考线和纵向参考线的交点确定为原点的步骤包括:The photographing patterning method according to claim 7, wherein the horizontal reference line is two, the longitudinal reference line is also two, and the step of determining the intersection of the horizontal reference line and the longitudinal reference line as the origin includes:
    分别沿所述取景框的横向和纵向建立横向中线和纵向中线,所述横向中线和纵向中线将所述取景框划分为四个区域;Forming a transverse center line and a longitudinal center line along a lateral direction and a longitudinal direction of the finder frame, respectively, the horizontal center line and the longitudinal center line dividing the finder frame into four areas;
    将所述主特征所处的区域确定为起始区域;Determining an area in which the main feature is located as a start area;
    将所述起始区域中横向参考线和纵向参考线的交点确定为原点。The intersection of the lateral reference line and the longitudinal reference line in the starting area is determined as the origin.
  9. 一种拍照构图装置,应用于电子设备中,所述电子设备包括取景框,其中,所述拍照构图装置包括:A photographing composition device is applied to an electronic device, the electronic device comprising a framing frame, wherein the photo composition device comprises:
    获取模块,用于获取所述取景框中的图像信息;An acquiring module, configured to acquire image information in the finder frame;
    分析模块,用于对所述图像信息进行分析,以提取所述图像信息中的主特征;An analysis module, configured to analyze the image information to extract a main feature in the image information;
    建立模块,用于在所述取景框中建立斐波那契螺旋线;Establishing a module for establishing a Fibonacci spiral in the finder frame;
    确定模块,用于根据所述主特征确定斐波那契螺旋线中的目标区域,并在所述取景框中提示所述目标区域。And a determining module, configured to determine a target area in the Fibonacci spiral according to the main feature, and prompt the target area in the finder frame.
  10. 根据权利要求9所述的拍照构图装置,其中,还包括:The photographing composition device according to claim 9, further comprising:
    训练模块,用于应用卷积神经网络训练图像信息分析模型;a training module for applying a convolutional neural network training image information analysis model;
    所述分析模块用于:The analysis module is used to:
    通过所述图像信息分析模型对所述图像信息进行分析,以提取所述图像信息中的主特征。The image information is analyzed by the image information analysis model to extract a main feature in the image information.
  11. 根据权利要求9所述的拍照构图装置,其中,还包括:The photographing composition device according to claim 9, further comprising:
    判断模块,用于判断主特征提取是否成功;a determining module, configured to determine whether the main feature extraction is successful;
    所述建立模块,用于在所述判断模块判断为是时,在所述取景框中建立斐波那契螺旋线。The establishing module is configured to establish a Fibonacci spiral in the finder frame when the determining module determines to be YES.
  12. 根据权利要求11所述的拍照构图装置,其中,所述判断模块还用于:The photographing composition device of claim 11, wherein the determining module is further configured to:
    若主特征提取不成功,则接收用户对所述取景框的触摸操作;Receiving, by the user, a touch operation on the finder frame if the main feature extraction is unsuccessful;
    将所述图像信息中与所述触摸操作对应的区域确定为主特征。An area of the image information corresponding to the touch operation is determined as a main feature.
  13. 根据权利要求9所述的拍照构图装置,其中,斐波那契螺旋线包括螺旋曲线以及沿所述螺旋曲线分布的多个矩形,所述确定模块包括:The photographing patterning device according to claim 9, wherein the Fibonacci spiral comprises a spiral curve and a plurality of rectangles distributed along the spiral curve, and the determining module comprises:
    获取子模块,用于获取所述主特征的面积以及每个所述矩形的面积;Obtaining a sub-module for acquiring an area of the main feature and an area of each of the rectangles;
    适配子模块,用于分别将主特征的面积与每个矩形的面积进行适配,以得到适配结果;Adapter submodule for respectively adapting the area of the main feature to the area of each rectangle to obtain an adaptation result;
    第一确定子模块,用于根据所述适配结果确定斐波那契螺旋线中的目标区域,并在所述取景框中提示所述目标区域。And a first determining submodule, configured to determine a target area in the Fibonacci spiral according to the adaptation result, and prompt the target area in the finder frame.
  14. 根据权利要求13所述的拍照构图装置,其中,所述适配子模块用于:The photographing composition device according to claim 13, wherein the adapting sub-module is used to:
    分别计算主特征的面积与每个矩形的面积的差值的绝对值;Calculating the absolute values of the difference between the area of the main feature and the area of each rectangle, respectively;
    从计算得到的多个绝对值中确定出最小的绝对值;Determining a minimum absolute value from the plurality of calculated absolute values;
    所述第一确定子模块用于:The first determining submodule is used to:
    将与最小的绝对值对应的矩形确定为目标区域,并在所述取景框中提示所述目标区域。A rectangle corresponding to the smallest absolute value is determined as the target area, and the target area is presented in the finder frame.
  15. 根据权利要求9所述的拍照构图装置,其中,所述建立模块包括:The photographing composition device according to claim 9, wherein the establishing module comprises:
    第一建立子模块,用于分别沿所述取景框的横向和纵向以预设比例建立横向参考线和纵向参考线;a first establishing submodule, configured to respectively establish a horizontal reference line and a vertical reference line in a horizontal direction and a longitudinal direction of the finder frame;
    第二确定子模块,用于将横向参考线和纵向参考线的交点确定为原点;a second determining submodule, configured to determine an intersection of the horizontal reference line and the vertical reference line as an origin;
    第二建立子模块,用于以所述原点为起始点在所述取景框中建立斐波那契螺旋线。And a second establishing submodule, configured to establish a Fibonacci spiral in the finder frame starting from the origin.
  16. 根据权利要求15所述的拍照构图装置,其中,所述横向参考线为两条,所述纵向参考线也为两条,所述第二确定子模块用于:The photographing patterning device according to claim 15, wherein the horizontal reference lines are two, and the vertical reference lines are also two, and the second determining sub-module is used for:
    分别沿所述取景框的横向和纵向建立横向中线和纵向中线,所述横向中线和纵向中线将所述取景框划分为四个区域;Forming a transverse center line and a longitudinal center line along a lateral direction and a longitudinal direction of the finder frame, respectively, the horizontal center line and the longitudinal center line dividing the finder frame into four areas;
    将所述主特征所处的区域确定为起始区域;Determining an area in which the main feature is located as a start area;
    将所述起始区域中横向参考线和纵向参考线的交点确定为原点。The intersection of the lateral reference line and the longitudinal reference line in the starting area is determined as the origin.
  17. 一种电子设备,其中,包括:An electronic device, comprising:
    摄像头,用于采集图像信息;a camera for collecting image information;
    与所述摄像头连接的取景框,用于显示所述图像信息;a finder frame connected to the camera for displaying the image information;
    存储有可执行程序代码的存储器;a memory storing executable program code;
    与所述存储器耦合的处理器;a processor coupled to the memory;
    所述处理器调用所述存储器中存储的所述可执行程序代码,执行以下步骤:The processor calls the executable program code stored in the memory, and performs the following steps:
    获取所述取景框中的图像信息;Obtaining image information in the finder frame;
    对所述图像信息进行分析,以提取所述图像信息中的主特征;Performing analysis on the image information to extract main features in the image information;
    在所述取景框中建立斐波那契螺旋线;Establishing a Fibonacci spiral in the framing frame;
    根据所述主特征确定斐波那契螺旋线中的目标区域,并在所述取景框中提示所述目标区域。Determining a target area in the Fibonacci spiral according to the main feature and presenting the target area in the finder frame.
  18. 根据权利要求17所述的电子设备,其中,斐波那契螺旋线包括螺旋曲线以及沿所述螺旋曲线分布的多个矩形,根据所述主特征确定斐波那契螺旋线中的目标区域,并在所述取景框中提示所述目标区域时,处理器用于执行以下步骤:The electronic device according to claim 17, wherein the Fibonacci spiral comprises a spiral curve and a plurality of rectangles distributed along the spiral curve, and the target region in the Fibonacci spiral is determined according to the main feature, And when the target area is prompted in the finder frame, the processor is configured to perform the following steps:
    获取所述主特征的面积以及每个所述矩形的面积;Obtaining an area of the main feature and an area of each of the rectangles;
    分别将主特征的面积与每个矩形的面积进行适配,以得到适配结果;Adapting the area of the main feature to the area of each rectangle to obtain an adaptation result;
    根据所述适配结果确定斐波那契螺旋线中的目标区域,并在所述取景框中提示所述目标区域。Determining a target area in the Fibonacci spiral according to the adaptation result, and prompting the target area in the finder frame.
  19. 根据权利要求18所述的电子设备,其中,分别将主特征的面积与每个矩形的面积进行适配,以得到适配结果时,处理器用于执行以下步骤:The electronic device according to claim 18, wherein the processor is configured to perform the following steps when the area of the main feature is respectively adapted to the area of each rectangle to obtain an adaptation result:
    分别计算主特征的面积与每个矩形的面积的差值的绝对值;Calculating the absolute values of the difference between the area of the main feature and the area of each rectangle, respectively;
    从计算得到的多个绝对值中确定出最小的绝对值;Determining a minimum absolute value from the plurality of calculated absolute values;
    根据所述适配结果确定斐波那契螺旋线中的目标区域,并在所述取景框中提示所述目标区域时,处理器用于执行以下步骤:Determining a target area in the Fibonacci spiral according to the adaptation result, and when the target area is prompted in the finder frame, the processor is configured to perform the following steps:
    将与最小的绝对值对应的矩形确定为目标区域,并在所述取景框中提示所述目标区域。A rectangle corresponding to the smallest absolute value is determined as the target area, and the target area is presented in the finder frame.
  20. 根据权利要求17所述的电子设备,其中,在所述取景框中建立斐波那契螺旋线时,处理器用于执行以下步骤:The electronic device of claim 17, wherein the processor is configured to perform the following steps when the Fibonacci spiral is established in the framing frame:
    分别沿所述取景框的横向和纵向以预设比例建立横向参考线和纵向参考线;Establishing horizontal reference lines and longitudinal reference lines at a preset ratio along the lateral and longitudinal directions of the finder frame;
    将横向参考线和纵向参考线的交点确定为原点;Determining the intersection of the lateral reference line and the longitudinal reference line as the origin;
    以所述原点为起始点在所述取景框中建立斐波那契螺旋线。A Fibonacci spiral is established in the finder frame starting from the origin.
PCT/CN2017/081092 2017-04-19 2017-04-19 Photographing and patterning method and apparatus, and electronic device WO2018191887A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/081092 WO2018191887A1 (en) 2017-04-19 2017-04-19 Photographing and patterning method and apparatus, and electronic device
CN201780089416.7A CN110622498B (en) 2017-04-19 2017-04-19 Photographing composition method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/081092 WO2018191887A1 (en) 2017-04-19 2017-04-19 Photographing and patterning method and apparatus, and electronic device

Publications (1)

Publication Number Publication Date
WO2018191887A1 true WO2018191887A1 (en) 2018-10-25

Family

ID=63855614

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/081092 WO2018191887A1 (en) 2017-04-19 2017-04-19 Photographing and patterning method and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN110622498B (en)
WO (1) WO2018191887A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130155293A1 (en) * 2011-12-16 2013-06-20 Samsung Electronics Co., Ltd. Image pickup apparatus, method of providing composition of image pickup and computer-readable recording medium
CN103955718A (en) * 2014-05-15 2014-07-30 厦门美图之家科技有限公司 Image subject recognition method
CN104243787A (en) * 2013-06-06 2014-12-24 华为技术有限公司 Photographing method and equipment, and photo management method
CN104601890A (en) * 2015-01-20 2015-05-06 广东欧珀移动通信有限公司 Method and device utilizing mobile terminal to shoot figure
CN105578043A (en) * 2015-12-18 2016-05-11 Tcl集团股份有限公司 Picture composition method and device for photographing of camera

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104917951A (en) * 2014-03-14 2015-09-16 宏碁股份有限公司 Camera device and auxiliary human image shooting method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130155293A1 (en) * 2011-12-16 2013-06-20 Samsung Electronics Co., Ltd. Image pickup apparatus, method of providing composition of image pickup and computer-readable recording medium
CN104243787A (en) * 2013-06-06 2014-12-24 华为技术有限公司 Photographing method and equipment, and photo management method
CN103955718A (en) * 2014-05-15 2014-07-30 厦门美图之家科技有限公司 Image subject recognition method
CN104601890A (en) * 2015-01-20 2015-05-06 广东欧珀移动通信有限公司 Method and device utilizing mobile terminal to shoot figure
CN105578043A (en) * 2015-12-18 2016-05-11 Tcl集团股份有限公司 Picture composition method and device for photographing of camera

Also Published As

Publication number Publication date
CN110622498A (en) 2019-12-27
CN110622498B (en) 2022-02-01

Similar Documents

Publication Publication Date Title
WO2019000462A1 (en) Face image processing method and apparatus, storage medium, and electronic device
WO2019103484A1 (en) Multi-modal emotion recognition device, method and storage medium using artificial intelligence
WO2018223857A1 (en) Text line recognition method and system
WO2016117836A1 (en) Apparatus and method for editing content
WO2017185316A1 (en) First-person-view flight control method and system for unmanned aerial vehicle, and smart glasses
WO2015149588A1 (en) Method for recognizing operation mode of user on handheld device, and handheld device
WO2018090455A1 (en) Method and device for processing panoramic image of terminal, and terminal
WO2015170832A1 (en) Display device and video call performing method therefor
WO2015137666A1 (en) Object recognition apparatus and control method therefor
WO2019045521A1 (en) Electronic device and control method therefor
EP3360322A1 (en) Electronic apparatus and controlling method thereof
WO2012002742A2 (en) Camera module and method for driving the same
WO2018076811A1 (en) Data sharing method, device, system, storage medium and electronic device
WO2017148035A1 (en) Image processing method and apparatus
WO2017206865A1 (en) Application program shutdown method and apparatus, storage medium, and electronic device
WO2021025509A1 (en) Apparatus and method for displaying graphic elements according to object
WO2017206892A1 (en) Sensor processing method and apparatus of mobile terminal, storage medium, and electronic device
WO2015064935A1 (en) Electronic device and control method thereof
WO2019208915A1 (en) Electronic device for acquiring image using plurality of cameras through position adjustment of external device, and method therefor
WO2017206873A1 (en) Application program shutdown method and apparatus, storage medium, and electronic device
WO2019190142A1 (en) Method and device for processing image
WO2020206885A1 (en) Unlocking method and apparatus
WO2016041225A1 (en) Video processing method and apparatus
WO2019088481A1 (en) Electronic device and image correction method thereof
EP3707678A1 (en) Method and device for processing image

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: 17906313

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: 17906313

Country of ref document: EP

Kind code of ref document: A1