Picture collection guiding method, electronic equipment, storage medium and program product
By displaying guide lines and area text on the camera viewing interface, and adjusting the area proportion and angle using slidable controls, the problem of photo acquisition not meeting the requirements is solved, and an efficient and accurate photo acquisition process is achieved.
Patent Information
- Application Number
- CN202510387643.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-29
AI Technical Summary
In the prior art, photo collection does not meet the requirements, resulting in inefficient review. The photographer needs to adjust multiple times to meet the specifications, and cannot obtain the reasons for the failure in real time.
The guide line and area text are displayed on the camera viewing interface, the guide line position is adjusted through slidable controls, the area proportion is monitored in real time, and prompt information is generated on the interface to guide the photographer to adjust, ensuring that the area proportion and angle meet the requirements.
It improves the efficiency and accuracy of photo collection, reduces the number of unqualified photos, and reduces the review burden, so that photographers can instantly understand the adjustment direction.
Smart Images

Figure CN120390138A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and particularly to a method for guiding photo acquisition, an electronic device, a storage medium, and a program product. Background Art
[0002] In some application scenarios, staff are required to collect and upload photos according to certain requirements. For example, after an offline store is opened, the broker of the store needs to take a photo of the store, and it is required that the photo includes the storefront of the store and the shops adjacent to the store, and upload it to the server as the real location information of the store. When the auditor checks that the proportion of the storefront area and the shop area in the photo is within a reasonable range, the collected photo can be considered to meet the requirements and be saved as the real scene information of the store.
[0003] However, limited by the complexity of the shooting site and the shooting level of the staff responsible for taking photos, the taken photos may not meet the requirements, which will not only increase the review work, but also the staff often only know the reason why the photo does not meet the requirements after receiving the review opinion, and then re - shoot and upload the photo, resulting in low efficiency. Summary of the Invention
[0004] The present disclosure provides a method for guiding photo acquisition, an electronic device, a storage medium, and a program product.
[0005] Display guiding lines and area texts in the viewfinder interface of the camera. The guiding lines divide the viewfinder interface of the camera into multiple areas, and each area corresponds to one of the area texts. The area text includes the name of the corresponding area and the area proportion of the area in the viewfinder interface. Generate a slidable control at the intersection of the guiding lines. The control restricts the position of the guiding line connected to it in the viewfinder interface. In response to the displacement of the control, adjust the position of the guiding line restricted by the control according to the displacement amount of the control to change the area proportion of the area. Obtain the changed area proportion of each area, and update the changed area proportion to the area text corresponding to the area. In response to the area proportion of each area being greater than or equal to the area proportion threshold corresponding to each area, generate a first prompt message in the viewfinder interface. The first prompt message indicates that the area proportion of each area is qualified.
[0006] According to the method for guiding photo acquisition of at least one embodiment of the present disclosure, it further includes: In response to the area proportion of any one area being less than the area proportion threshold corresponding to the area, generate a second prompt message including the name of the area in the viewfinder interface. In response to the ratio of the area of a region changing from being less than the area ratio threshold corresponding to the region to being greater than or equal to the area ratio threshold corresponding to the region, hide the second prompt information of this region, where the second prompt information indicates that the ratio of the area of the region is too small.
[0007] According to the method for guiding photo capture according to at least one embodiment of the present disclosure, in response to the ratio of the area of any region being less than the area ratio threshold corresponding to the region, generate second prompt information including the name of the region in the viewfinder interface, including: Display the second prompt information including the name of the region in the viewfinder interface and lock the capture button of the camera.
[0008] According to the method for guiding photo capture according to at least one embodiment of the present disclosure, further include: In response to the ratio of the area of a region changing from being greater than or equal to the area ratio threshold corresponding to the region to being less than the area ratio threshold corresponding to the region, change the guiding line surrounding the region from a first color to a second color; In response to the ratio of the area of a region changing from being less than the area ratio threshold corresponding to the region to being greater than or equal to the area ratio threshold corresponding to the region, change the guiding line surrounding the region from the second color to the first color.
[0009] According to the method for guiding photo capture according to at least one embodiment of the present disclosure, further include: Monitor the rotation angle of the viewfinder interface; Compare the absolute value of the rotation angle with the angle threshold to obtain an angle comparison result; In response to the angle comparison result indicating that the absolute value of the rotation angle is greater than the angle threshold, generate third prompt information in the viewfinder interface, where the third prompt information indicates that the shooting angle is unqualified.
[0010] According to the method for guiding photo capture according to at least one embodiment of the present disclosure, in response to the angle comparison result indicating that the absolute value of the rotation angle is greater than the angle threshold, generate third prompt information, including: In response to at least two consecutive angle comparison results both indicating that the absolute value of the rotation angle is greater than the angle threshold, generate third prompt information.
[0011] According to the method for guiding photo capture according to at least one embodiment of the present disclosure, in response to the angle comparison result indicating that the absolute value of the rotation angle is greater than the angle threshold, generate third prompt information in the viewfinder interface, including: Display the third prompt information in the viewfinder interface and lock the capture button of the camera.
[0012] A method for guiding the acquisition of a photo according to at least one embodiment of the present disclosure, which adjusts the position of the guiding line constrained by the control according to the displacement amount of the control to change the area ratio of the area, includes: Obtain the displacement amount of the control; Convert the displacement amount of the control into a percentage offset of the guiding line constrained by the control relative to the boundary of the viewfinder interface; Calculate the absolute position of the guiding line based on the percentage offset of the guiding line to obtain the position of the adjusted guiding line.
[0013] A method for guiding the acquisition of a photo according to at least one embodiment of the present disclosure, which displays a guiding line and area text in the viewfinder interface of a camera, includes: Generate the guiding line and the area text preset by the photo template based on the selected photo template.
[0014] According to another aspect of the present disclosure, there is provided an electronic device, including: a memory storing execution instructions; and a processor that executes the execution instructions stored in the memory, so that the processor executes the method for guiding the acquisition of a photo according to any one of the embodiments of the present disclosure.
[0015] According to still another aspect of the present disclosure, there is provided a readable storage medium storing execution instructions, and when the execution instructions are executed by a processor, they are used to implement the method for guiding the acquisition of a photo according to any one of the embodiments of the present disclosure.
[0016] According to yet another aspect of the present disclosure, there is provided a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the method for guiding the acquisition of a photo according to any one of the embodiments of the present disclosure. Description of the Drawings
[0017] The drawings illustrate exemplary embodiments of the present disclosure and, together with the description thereof, are used to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are included in this specification and form a part of this specification.
[0018] Figure 1 It is a flowchart showing a method for guiding the acquisition of a photo according to an embodiment of the present disclosure.
[0019] Figure 2 It is a schematic diagram of a requirements analysis template according to an embodiment of the present disclosure.
[0020] Figure 3 It is a schematic diagram of requirements analysis information according to an embodiment of the present disclosure.
[0021] Figure 4Schematic flowchart of a method for guiding photo acquisition according to an embodiment of the present disclosure.
[0022] Figure 5 Schematic flowchart of a method for guiding photo acquisition according to an embodiment of the present disclosure.
[0023] Figure 6 Schematic flowchart of a method for guiding photo acquisition according to an embodiment of the present disclosure.
[0024] Figure 7 Schematic flowchart of a method for guiding photo acquisition according to an embodiment of the present disclosure.
[0025] Figure 8 Schematic flowchart of a method for guiding photo acquisition according to an embodiment of the present disclosure.
[0026] Figure 9 Schematic flowchart of a method for guiding photo acquisition according to an embodiment of the present disclosure.
[0027] Figure 10 Schematic flowchart of a method for guiding photo acquisition according to an embodiment of the present disclosure.
[0028] Figure 11 Schematic flowchart of a method for guiding photo acquisition according to an embodiment of the present disclosure.
[0029] Figure 12 Schematic flowchart of a method for guiding photo acquisition according to an embodiment of the present disclosure.
[0030] Figure 13 Schematic flowchart of a method for guiding photo acquisition according to an embodiment of the present disclosure.
[0031] Figure 14 Schematic flowchart of a method for guiding photo acquisition according to an embodiment of the present disclosure.
[0032] Figure 15 Schematic block diagram of the structure of a photo acquisition guiding device according to an embodiment of the present disclosure.
[0033] Figure 16 Schematic block diagram of the structure of an electronic device according to an embodiment of the present disclosure. Detailed implementation manners
[0034] The present disclosure will be further described in detail below with reference to the accompanying drawings and examples. It can be understood that the specific examples described herein are only used to explain the relevant content and do not limit the present disclosure. Additionally, it should be noted that only the parts related to the present disclosure are shown in the drawings for the convenience of description.
[0035] It should be noted that, without conflict, the embodiments in the present disclosure and the features in the embodiments may be combined with each other. The technical solutions of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0036] Some application scenarios require collecting photos that meet certain requirements, and the content included in the photos is required to conform to certain specifications. However, some of these normative requirements are difficult to accurately measure visually. For example, it is required that a certain part of a specific object be included in the photo. The photographer can only rely on experience to take the photo, and whether the proportion of the specific object captured is too large or too small can only be determined by the reviewer after the photo is uploaded. As a result, the photographer often needs to obtain feedback from the reviewer before proceeding with subsequent shootings in order to collect photos that meet the requirements, resulting in relatively low efficiency.
[0037] An embodiment of the present disclosure provides a method for guiding the collection of photos, which can be executed by electronic devices such as computers, mobile phones, and cameras. The method for guiding the collection of photos in the embodiment of the present disclosure is mainly used to provide a collection guiding method when there are normative requirements for the content of the photo, so as to guide the photographer to collect qualified photos that meet the normative requirements.
[0038] Figure 1 Fig. 10 shows a schematic diagram of the overall process of the photo collection guiding method M10 according to an embodiment of the present disclosure. As Figure 1 shown, the method includes steps S11 to S19.
[0039] Specifically, Figure 1 the method shown includes: S11. Display guiding lines and area texts on the viewfinder interface of the camera. The guiding lines divide the viewfinder interface of the camera into multiple areas, and each area corresponds to an area text.
[0040] Specifically, there are multiple guiding lines. The areas divided by the guiding lines include the areas formed by the ranges enclosed between the guiding lines and the areas formed by the ranges enclosed between the guiding lines and the boundaries of the viewfinder interface.
[0041] Among them, the area text includes the name of the corresponding area and the area proportion of the area in the viewfinder interface. The name of the area can usually be set as the content required to be collected by the photo collection specification, so that the photographer can determine the content that should appear in the position of this area of the viewfinder interface according to the name of the area. The area proportion of the area refers to the area proportion of the area in the entire viewfinder interface. Usually, the range of the photo is the same as the range of the viewfinder interface. Based on this, the area proportion of the area is usually also the proportion of the range of this area in the photo.
[0042] Please refer to Figure 2 , Figure 2Schematic diagram of the camera viewfinder interface according to one embodiment of the present disclosure. The blue lines represent guide lines, and the guide lines and the boundaries of the viewfinder interface divide the viewfinder interface into four areas, with the corresponding area text displayed within the scope of each area. Figure 2 The four areas shown include "shops on the left", "doorfront area", "gate area" and "shops on the right".
[0043] Figure 2 The schematic diagram is only one feasible implementation of the acquisition guidance method M10 disclosed herein. The acquisition guidance method M10 disclosed herein can also configure the position, number, color of the generated guide lines, as well as the position, number, name and other parameters of the regional text according to the specific business scenario, which are not limited here. For example, when the acquisition guidance method M10 is used to guide the acquisition of photos of an indoor rough house, it can be configured to divide the framing interface into three areas through guide lines, and the three areas represent the ceiling, wall and floor respectively.
[0044] In the embodiment of the present disclosure, the steps in the acquisition guidance method M10 may be executed by an application of the electronic device. For ease of description, the following takes the execution of the steps in the acquisition guidance method M10 by a photo taking guidance program as an example.
[0045] In one implementation, the camera navigation program uses a TextureView control to display the camera's capture image (the viewfinder) in real time. The ConstraintLayout class is overlaid on top of the TextureView control to constrain the viewfinder's layout. The TextureView control allows other view components to be overlaid on top of it, facilitating the display of guide lines and region text within the viewfinder. The ConstraintLayout class utilizes a flat layout structure and implements a single measurement-layout calculation via ConstraintSet, reducing performance losses in scenarios where guide lines are frequently adjusted.
[0046] S12. Generate a slidable control at the intersection of the guide lines, and constrain the position of the guide lines connected to it on the viewfinder interface.
[0047] The slidable control can be moved on the viewfinder interface in response to a user's gesture. In a specific example, the slidable control can be a button control, and the user's gesture operation includes pressing the button, dragging the button, and releasing the button. The user can touch and drag the control to slide on the viewfinder interface to cause the control to move. In other embodiments, the slidable control can also be a slider control, a scroll bar control, etc., which are not limited here.
[0048] The control restricts the position of the guiding line connected thereto in the viewfinder interface. When the control is displaced in the viewfinder interface, due to its restrictive relationship with the guiding line, the control can drive the guiding line to be displaced in the viewfinder interface to change the position of the guiding line in the viewfinder interface. The change in the position of the guiding line in the viewfinder interface will cause the area ratio of the area related to the guiding line to change accordingly. Thus, the control that can be slid and has a restrictive relationship with the guiding line allows the photographer to manipulate the movement of the guiding line by sliding the position of the control, thereby adjusting the area ratio of the area.
[0049] S14. In response to the displacement of the control, adjust the position of the guiding line restricted by the control according to the displacement amount of the control to change the area ratio of the area.
[0050] Since the position of the guiding line in the viewfinder interface is restricted by the control connected thereto. Therefore, when the control drives the guiding line restricted by it to move in the viewfinder interface, the movement amount of the guiding line in the viewfinder interface is related to the displacement amount of the control, so that the movement amount of the guiding line restricted by the control can be calculated according to the displacement amount of the control, and then the position of the guiding line after the movement ends can be obtained.
[0051] S15. Obtain the area ratio of each area after the change, and update the area ratio after the change to the area text corresponding to the area.
[0052] When the position of the guiding line in the viewfinder interface changes, the area ratio of the area divided by the guiding line also changes accordingly. In one embodiment, the photographing guiding program monitors the area ratio of each area in real time and dynamically displays the latest area ratio of each area in the area text corresponding to the area, so that the photographer can grasp the area ratio of each area in real time and help the photographer adjust shooting parameters such as the shooting angle or distance.
[0053] S19. In response to the area ratio of each area being greater than or equal to the area ratio threshold corresponding to each area, generate a first prompt message in the viewfinder interface.
[0054] Among them, the first prompt message indicates that the area ratio of each area is qualified. If the specification requirement of the photo is that the area ratio of each area is higher than the preset area ratio threshold, when the photographer sees the first prompt message, taking a photo based on the current viewfinder interface can capture a photo that meets the specification.
[0055] The area ratio threshold is a preset ratio threshold, and the corresponding area ratio threshold can be set for each area according to business requirements. When the area ratio of an area is greater than or equal to its corresponding area ratio threshold, it indicates that the ratio of the area in the photo meets the requirements. Based on this, when the area ratios of all areas are greater than or equal to the corresponding area ratio thresholds of all areas, it can be determined that a qualified photo can be captured based on the current viewfinder interface, and thus a first prompt message is generated in the viewfinder interface to prompt the photographer.
[0056] As Figure 2 shown, in the Figure 2 illustrated embodiment, the first prompt message is a circular logo in the upper left corner of the viewfinder interface. In other embodiments, other forms can also be used to give a qualified prompt in the viewfinder interface. For example, the first prompt message can be displayed in the viewfinder interface in the form of a pop-up text.
[0057] Please refer to Figures 2 to 4 , Figure 3 which is a schematic diagram of the viewfinder interface of a camera according to an embodiment of the present disclosure. Compared with the Figure 2 schematic diagram of the viewfinder interface, Figure 2 is a scenario where the area ratios of all areas are qualified, Figure 3 is a scenario where there is an area with a non-compliant area ratio. When the photographer sees the viewfinder interface in the Figure 3 scenario, they can step back a certain distance to expose more of the right-side store, so that the viewfinder interface changes from the Figure 3 illustrated interface to the Figure 4 illustrated interface. Then, based on the illustrated viewfinder interface, drag the control on the right to drive the guiding line on the right to move to the position in Figure 4 so that the guiding line on the right can correctly divide the right-side store. At this time, due to the change in the position of the guiding line, the photo-taking guiding program calculates the area ratios of all areas after the change in the background and updates them to the area text of all areas, obtaining the Figure 2 illustrated viewfinder interface. At this time, taking a photo can capture a qualified photo. Thus, the process of the content in the viewfinder interface changing from unqualified to qualified is shown in the order of Figure 2 , Figure 3 , Figure 4 .
[0058] Please refer to Figure 2 , Figure 2 and Figure 3 . Or, in another adjustment order, assume that the current viewfinder interface of the photographer is the Figure 5 illustrated interface. The photographer, based on the Figure 3 illustrated viewfinder interface, drags the control on the right to drive the guiding line on the right to move to Figure 3In the position in [description], due to the change in the position of the guiding line, the photographing guiding program calculates the area ratio of each area after the change in the background and updates it to the area text of each area, obtaining Figure 5 The schematic viewfinder interface shown. At this time, the viewfinder interface generates a first prompt message, but the areas divided by the guiding line do not match the actual areas. Then, after seeing the first prompt message, the photographer takes a step back a certain distance to expose more of the right-side store, presenting as Figure 5 The schematic view shown, so that the areas divided by the guiding line match the actual areas, obtaining Figure 2 The schematic viewfinder interface shown. At this time, taking a photo can capture a qualified photo. Thus, in the order of Figure 2 , Figure 3 , Figure 5 Another process of the content in the viewfinder interface changing from unqualified to qualified is shown.
[0059] In summary, for the photo acquisition guiding method of the embodiments of the present disclosure, by generating a guiding line and area text in the viewfinder interface of the camera, the photographer can adjust relevant shooting parameters such as the shooting angle and shooting distance of the camera based on the guiding line and area text, so that the object to be photographed is located in the correct area in the viewfinder interface. During this period, the photographer can adjust the position of the guiding line in the viewfinder interface by sliding the control to change the area ratio of the area, and observe the first prompt message to determine whether the area ratio of the area is reasonable. In this way, guided by the guiding line and area text, when the object to be photographed is located in the correct area in the viewfinder interface by the photographer, taking a photo can capture a qualified photo.
[0060] In some embodiments of the present disclosure, the acquisition guiding method M10 may further include steps S13 and S17 as shown in Figure 2 .
[0061] S13. In response to the area ratio of any area being less than the area ratio threshold corresponding to the area, generate a second prompt message containing the name of the area in the viewfinder interface.
[0062] Among them, the second prompt message indicates that the area ratio of the area is too small.
[0063] As shown in Figure 6 , assume that the area ratio threshold corresponding to the area of the right-side store is 25%. In the scenario of Figure 3 , the current area ratio of the area of the right-side store is 10%, which is less than the area ratio threshold 25% corresponding to the area. Then the viewfinder interface generates a second prompt message for prompting, indicating that the area ratio of the right-side store is too small. Among them, the second prompt message contains the name of the specific area with too small an area ratio to help the photographer determine the area that needs to be adjusted. When there are multiple areas with too small area ratios, the second prompt message contains the name of each area with too small an area ratio.
[0064] In one example, the position where the second prompt information appears in the viewfinder interface can be within the range of an area with an overly small proportion. When there are multiple areas with overly small proportions, the second prompt information for each area is displayed within the range of each area. In this way, the photographer can be more intuitively prompted about the areas where the area proportion needs to be adjusted.
[0065] S17. In response to the area proportion of an area changing from being less than the area proportion threshold corresponding to the area to being greater than or equal to the area proportion threshold corresponding to the area, hide the second prompt information for this area.
[0066] Please combine Figure 3 and Figure 2 , when the area proportion of the area of the right-side store is adjusted from 10% to 25%, trigger the execution of step S18, so that the second prompt information for the area of the right-side store is hidden, so that the photographer can determine that there is no need to further increase the area proportion of the area of the right-side store.
[0067] Among them, hiding the second prompt information for the area means not displaying the second prompt information for this area in the viewfinder interface. If a second prompt information includes multiple areas with overly small proportions, and the area proportion of one of the areas with overly small proportions is adjusted to be qualified, then the name of the qualified area is separately hidden in the second prompt information, which is regarded as hiding the second prompt information for the qualified area. For example, if the second prompt information includes two names, "Area A" and "Area B", and the area proportion of Area B is adjusted to be qualified, then the name "Area B" is hidden in the second prompt information, and only the name "Area A" is displayed. When the area proportions of all the areas included in the second prompt information are adjusted to be qualified, the complete second prompt information is hidden.
[0068] Regarding step S13, in some embodiments of the present disclosure, it may include step S131 as Figure 3 shown.
[0069] S131. Display the second prompt information including the name of the area in the viewfinder interface and lock the shooting button of the camera.
[0070] That is to say, in response to the area proportion of any area being less than the area proportion threshold corresponding to the area, in addition to generating the second prompt information including the name of the area in the viewfinder interface, the camera shooting guide program also locks the shooting button of the camera. Among them, locking the shooting button of the camera means that the shooting button cannot be used to trigger the shooting operation. In this way, it is possible to prevent the photographer from taking unqualified photos.
[0071] In some application programs or software with a photo-taking function, the photo-taking function is configured to immediately upload the photo when the photo is taken. For example, when using the photo-taking function in the chat interface of WeChat, the photo will be immediately sent to the chat interface when the photo-taking is completed. Based on this, step S141 can prevent the photographer from taking unqualified photos, prevent unqualified photos from being immediately uploaded, and thus reduce the number of unqualified photos received by the reviewers.
[0072] In some embodiments of the present disclosure, the acquisition guidance method M10 may further include step S16 as Figure 7 shown.
[0073] S16. Update the color of the guidance line based on the changed area ratio.
[0074] Specifically, regarding step S16, in some embodiments of the present disclosure, it may include steps S161 to S163 as Figure 8 shown.
[0075] S161. In response to the area ratio of the area changing from being greater than or equal to the area ratio threshold corresponding to the area to being less than the area ratio threshold corresponding to the area, change the guidance line surrounding the area from the first color to the second color.
[0076] Wherein, the first color indicates that there is an area with an overly small ratio in the area surrounded by the guidance line; the second color indicates that there is no area with an overly small ratio in the area surrounded by the guidance line.
[0077] Please refer to Figure 9 and Figure 2 , wherein, blue is the first color and red is the second color. When the viewfinder interface of the camera changes from the interface Figure 3 schematically shown to the interface Figure 2 schematically shown, the guidance line surrounding the right-side store area changes from blue to red.
[0078] When the guidance line changes from the first color to the second color, it can facilitate the photographer to determine the guidance line that needs to be moved in order to adjust the area ratio of the area to be qualified.
[0079] S163. In response to the area ratio of the area changing from being less than the area ratio threshold corresponding to the area to being greater than or equal to the area ratio threshold corresponding to the area, change the guidance line surrounding the area from the second color to the first color.
[0080] Please refer to Figure 3 and Figure 2 , when the viewfinder interface of the camera changes from the interface Figure 3 schematically shown to the interface Figure 3When the schematic interface is displayed, the area ratio of the right-side store area is qualified, causing the guiding line surrounding the right-side store area to change from red to blue. In this way, the photographer can intuitively see that this guiding line no longer needs to be moved.
[0081] In some embodiments of the present disclosure, the acquisition guiding method M10 may further include steps S18 as Figure 2 shown.
[0082] S18. Generate third prompt information on the viewfinder interface based on the rotation angle of the viewfinder interface.
[0083] The specifications of some photos impose restrictions on the shooting angle of the camera. Based on this, third prompt information can be generated on the viewfinder interface to prompt the photographer with relevant information about the rotation angle of the camera's viewfinder interface. Among them, the third prompt information can be used to represent the specific rotation angle of the viewfinder interface, represent that the rotation angle of the viewfinder interface is qualified, represent that the rotation angle of the viewfinder interface is unqualified, etc., and there is no limitation here.
[0084] Regarding step S18, in some embodiments of the present disclosure, it may include steps S181 to S185 as Figure 10 shown.
[0085] S181. Monitor the rotation angle of the viewfinder interface.
[0086] In one embodiment, the camera guiding program may call a low-pass filter to process the original gyroscope data of the electronic device to continuously monitor the pose of the electronic device, and obtain the rotation angle of the viewfinder interface based on the change in the pose of the electronic device.
[0087] S183. Compare the absolute value of the rotation angle with the angle threshold to obtain an angle comparison result.
[0088] Among them, the angle threshold is a preset threshold for measuring whether the rotation angle of the viewfinder interface is qualified. The angle threshold can be set to 1°, 2°, 3°, 4°, 5°, etc., and there is no limitation here.
[0089] S185. In response to the angle comparison result indicating that the absolute value of the rotation angle is greater than the angle threshold, generate third prompt information on the viewfinder interface, and the third prompt information represents that the shooting angle is unqualified.
[0090] In the embodiments applying step S185, the third prompt information is only used to represent that the shooting angle is unqualified.
[0091] Regarding step S185, in some embodiments of the present disclosure, it may include steps S1851 and S1853 as Figure 11 shown.
[0092] S1851. Generate a third prompt message in response to at least two consecutive angle comparison results both indicating that the absolute value of the rotation angle is greater than the angle threshold.
[0093] Each angle comparison result represents an angle detection. When the angle comparison results both indicate that the absolute value of the rotation angle is greater than the angle threshold, it indicates that the angle detection is unqualified. Among them, at least two consecutive angle comparison results both indicating that the absolute value of the rotation angle is greater than the angle threshold can be 2 consecutive times, 3 consecutive times, 4 consecutive times or more of unqualified angle detections, which are not listed one by one here. For example, after k angle detections, and among them, n (n≥2, an integer) consecutive angle detections are all unqualified, then the third prompt message is generated. In this way, it is possible to avoid the task of generating the third prompt message being too frequent due to overly sensitive detection, thereby reducing performance loss.
[0094] S1853. Display the third prompt message on the viewfinder interface and lock the shooting button of the camera.
[0095] The purpose of step S1853 is similar to that of step S131 above, which is to prevent taking photos with unqualified angles, and further avoid uploading photos with unqualified angles, thereby reducing the number of unqualified photos received by the reviewers.
[0096] Regarding step S14, in some embodiments of the present disclosure, it may include steps S141 to S145 as Figure 12 shown.
[0097] S141. Obtain the displacement of the control.
[0098] In one embodiment, the control is bound to a touch event listener, so that the ΔX and ΔY displacements of the finger movement can be obtained in the onTouch event of the touch event listener as the displacement of the control.
[0099] S143. Convert the displacement of the control into the percentage offset of the guiding line constrained by the control relative to the boundary of the viewfinder interface.
[0100] As an example, the value range of the percentage offset of the guiding line relative to the boundary of the viewfinder interface is [0,1], which represents the offset degree of the position of the guiding line relative to the boundary of the viewfinder interface. The larger the value, the higher the offset degree. For example, the percentage offset may include the percentage offset of the x-axis of the guiding line relative to the left boundary of the viewfinder interface and the percentage offset of the y-axis of the guiding line relative to the upper boundary of the viewfinder interface. Taking the percentage offset of the x-axis as an example, when the percentage offset of the x-axis is 0.5, it indicates that the x-axis position of the guiding line is exactly in the middle between the left boundary and the right boundary of the viewfinder interface; when the percentage offset of the x-axis is 1, it indicates that the x-axis position of the guiding line coincides with the right boundary of the viewfinder interface.
[0101] Compared with controls, the position of a control can be represented by dot coordinates, while representing the position of a guiding line using the coordinate method is relatively complex and consumes relatively more computing resources. Using percentage offsets can more simply describe the position of the guiding line, facilitate calculating the proportion of the area enclosed by the guiding line, and can also adapt to different screen sizes. For example, on 720p and 1080p electronic devices, percentage offsets of 0.3 on the x-axis of the guiding line correspond to 216px and 324px on the x-axis respectively. For another example, a vertical guiding line can control the width of the left-side store. When this guiding line is adjusted from a percentage offset of 0.25 to 0.35, the area width of the left-side store expands from 25% to 35%.
[0102] S145. Calculate the absolute position of the guiding line based on the percentage offset of the guiding line to obtain the position of the adjusted guiding line.
[0103] Among them, the absolute position of the guiding line refers to the coordinates of the pixels where the guiding line is displayed on the display screen of the electronic device. Thus, based on the absolute position of the guiding line, the pixels at the corresponding coordinates on the display screen can be controlled to display the guiding line.
[0104] Regarding step S11, in some embodiments of the present disclosure, it may include step S111 as Figure 13 shown.
[0105] S111. Generate the guiding line and area text preset for the photo template based on the selected photo template.
[0106] Among them, the photo template is used to limit the initial generation positions of the guiding line and area text in the viewfinder interface. In different application scenarios, the required number of areas may be different, and the passing criteria may also be different. Based on this, the photographer can select a suitable photo template according to the needs to apply the settings of the guiding line and area text preset for the photo template.
[0107] For example, if there is no store on the left side of the store to be photographed, a qualified photo cannot be obtained when applying the guiding line layout as Figure 14 shown. Therefore, the photographer can select a photo template that does not include the left-side store area and apply it to the current settings of the guiding line and area text, so that the number of areas and the passing criteria conform to the actual situation.
[0108] Based on any of the above embodiments, the present disclosure also provides a photo acquisition guiding device. Figure 2 It is a structural schematic block diagram of a photo acquisition guiding device according to an embodiment of the present disclosure.
[0109] As Figure 15 shown, the photo acquisition guiding device includes: A layout generation module 110 is configured to generate guiding lines and area texts in the viewfinder interface of a camera. The guiding lines divide the viewfinder interface of the camera into multiple areas, and each area corresponds to an area text. The area text is used to display the name and area ratio of the corresponding area.
[0110] A control generation module 120 is configured to generate a slidable control at the intersection of the guiding lines. The control restricts the position of the guiding lines connected thereto in the viewfinder interface.
[0111] A guiding line movement module 130 is configured to, in response to the displacement of the control, adjust the position of the guiding lines restricted by the control according to the displacement amount of the control, so as to change the area ratio of the areas.
[0112] An area ratio update module 140 is configured to obtain the changed area ratios of the respective areas and update the changed area ratios to the area texts of the corresponding areas.
[0113] A qualified prompt module 150 is configured to, in response to the area ratio of each area being greater than or equal to the area ratio threshold corresponding to each area, generate a first prompt message in the viewfinder interface.
[0114] The above-mentioned photo acquisition guiding device may be computer software, and its respective modules may be computer software modules. The implementation processes of the functions and roles of the respective modules in the above-mentioned photo acquisition guiding device are specifically detailed in the implementation processes of the corresponding steps in the above-mentioned method, and will not be elaborated herein.
[0115] The execution subject of the photo acquisition guiding method in the specific implementation manner of the present disclosure may be an electronic device such as a server.
[0116] Based on any of the above embodiments, the present disclosure further provides an electronic device, which may execute the photo acquisition guiding method of any of the above embodiments described in the present disclosure.
[0117] Figure 15 It is a structural schematic block diagram of an electronic device 1000 according to an embodiment of the present disclosure.
[0118] The hardware structure of the electronic device 1000 may be implemented by using a bus architecture. The bus architecture may include any number of interconnected buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, a memory 1300, and / or hardware modules together. The bus 1100 may also connect various other circuits 1400 such as peripheral devices, voltage regulators, power management circuits, external antennas, etc.
[0119] The bus 1100 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one connection line is used in this figure, but it does not mean that there is only one bus or one type of bus.
[0120] The present disclosure also provides a readable storage medium having a computer program stored therein, and the computer program, when executed by a processor, is used to implement the above method. The "readable storage medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples of the readable storage medium include the following: an electrical connection portion (electronic device) having one or more wirings, a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.
[0121] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed, the processes or functions of the present disclosure are executed in whole or in part.
[0122] The computer program or instructions can be stored in a readable storage medium, or transmitted from one readable storage medium to another. For example, the computer program or instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired or wireless manner. The readable storage medium can be any available medium that can be accessed, or a data storage device such as a server or data center integrating one or more available mediums. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it can also be an optical medium, such as a digital video disc; or it can be a semiconductor medium, such as a solid state drive. The computer-readable storage medium can be a volatile or non-volatile storage medium, or can include both volatile and non-volatile types of storage media.
[0123] Those skilled in the art should understand that the embodiments of the present disclosure may be provided as a method, a system, or a computer program product. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0124] The present disclosure is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the present disclosure. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable photo acquisition guiding devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable photo acquisition guiding devices generate means for realizing the functions specified in Figure 16 one or more of the processes and / or blocks Figure 1 one or more of the blocks.
[0125] These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable photo acquisition guiding device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means realizes the functions specified in Figure 1 one or more of the processes and / or blocks Figure 1 one or more of the blocks.
[0126] These computer program instructions can also be loaded onto a computer or other programmable photo acquisition guiding device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for realizing the functions specified in Figure 1 one or more of the processes and / or blocks Figure 1 Figure 1 one or more of the blocks.
[0127] In the description of this specification, the description with reference to terms such as "one embodiment / way", "some embodiments / ways", "example", "specific example", or "some examples" means that the specific features, structures, or characteristics described in connection with the embodiment / way or example are included in at least one embodiment / way or example of the present disclosure. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment / way or example. Moreover, the specific features, structures, or characteristics described can be combined in a suitable manner in any one or more embodiments / ways or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments / ways or examples described in this specification and the features of different embodiments / ways or examples.
[0128] In addition, the terms "first" and "second" are used only for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.
[0129] Those skilled in the art should understand that the above embodiments are only for clearly explaining the present disclosure and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications can be made on the basis of the above disclosure, and these changes or modifications are still within the scope of the present disclosure.
Claims
1. A method for guiding the acquisition of photos, characterized in that, Including: Displaying guiding lines and region texts on the viewfinder interface of the camera, where the guiding lines divide the viewfinder interface of the camera into multiple regions, each region corresponding to one of the region texts, and the region texts include the name of the corresponding region and the region proportion of the region in the viewfinder interface; Generating a slidable control at the intersection of the guiding lines, and the control constrains the position of the guiding lines connected to it in the viewfinder interface; In response to the displacement of the control, adjusting the position of the guiding lines constrained by the control according to the displacement amount of the control to change the region proportion of the region; Obtaining the changed region proportions of each region and updating the changed region proportions to the region texts corresponding to the regions; And In response to the region proportion of each region being greater than or equal to the region proportion threshold corresponding to each region, generating a first prompt message on the viewfinder interface, where the first prompt message indicates that the region proportions of each region are qualified.
2. The method for guiding photo acquisition according to claim 1, wherein It further includes: In response to the region proportion of any one region being less than the region proportion threshold corresponding to that region, generating a second prompt message on the viewfinder interface that includes the name of that region, where the second prompt message indicates that the region proportion of the region is too small; And In response to the region proportion of the region changing from being less than the region proportion threshold corresponding to that region to being greater than or equal to the region proportion threshold corresponding to that region, hiding the second prompt message of this region; Optionally, in response to the region proportion of any one region being less than the region proportion threshold corresponding to that region, generating a second prompt message on the viewfinder interface that includes the name of that region, including: Displaying a second prompt message that includes the name of that region on the viewfinder interface and locking the shooting button of the camera.
3. The method for guiding the acquisition of a photo according to claim 1, wherein It further includes: In response to the region proportion of the region changing from being greater than or equal to the region proportion threshold corresponding to that region to being less than the region proportion threshold corresponding to that region, changing the guiding line surrounding the region from a first color to a second color; And In response to the region proportion of the region changing from being less than the region proportion threshold corresponding to that region to being greater than or equal to the region proportion threshold corresponding to that region, changing the guiding line surrounding the region from the second color to the first color.
4. The method for guiding photo acquisition according to claim 1, wherein It further includes: Monitoring the rotation angle of the viewfinder interface; Comparing the absolute value of the rotation angle with the angle threshold to obtain an angle comparison result; And In response to the angle comparison result indicating that the absolute value of the rotation angle is greater than the angle threshold, generating a third prompt message on the viewfinder interface, where the third prompt message indicates that the shooting angle is unqualified.
5. The method for guiding the acquisition of a photograph according to claim 4, wherein In response to the angle comparison result indicating that the absolute value of the rotation angle is greater than the angle threshold, generating a third prompt message, including: In response to at least two consecutive angle comparison results both indicating that the absolute value of the rotation angle is greater than the angle threshold, generating a third prompt message; Optionally, in response to the angle comparison result indicating that the absolute value of the rotation angle is greater than the angle threshold, generating a third prompt message on the viewfinder interface, including: Displaying a third prompt message on the viewfinder interface and locking the shooting button of the camera.
6. The method for guiding the acquisition of a photo according to claim 1, characterized in that, Adjust the position of the guiding line constrained by the control according to the displacement amount of the control to change the area ratio of the area, including: Obtain the displacement amount of the control; Convert the displacement amount of the control into a percentage offset of the guiding line constrained by the control relative to the boundary of the viewfinder interface; and Calculate the absolute position of the guiding line based on the percentage offset of the guiding line to obtain the position of the adjusted guiding line.
7. The method for guiding the acquisition of a photo according to claim 1, characterized in that Display the guiding line and the area text on the viewfinder interface of the camera, including: Generate the guiding line and the area text preset by the photo template based on the selected photo template.
8. An electronic device, characterized in that, Include: A memory that stores execution instructions; And A processor that executes the execution instructions stored in the memory, so that the processor executes the photo acquisition guiding method according to any one of claims 1 to 7.
9. A readable storage medium, characterized in that, Execution instructions are stored in the readable storage medium, and when the execution instructions are executed by a processor, they are used to implement the photo acquisition guiding method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the photo acquisition guiding method according to any one of claims 1 to 7.