Shooting prompting method and device, equipment and storage medium
By displaying the object shape information of the target object in the shooting viewfinder, the problem in the existing technology that auxiliary lines cannot provide high-precision composition prompts is solved, and shooting prompts for highly symmetrical images are realized to ensure image symmetry.
Patent Information
- Application Number
- CN202510721475.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-09
AI Technical Summary
In the prior art, when photographing objects with symmetrical structures, auxiliary lines cannot provide high-precision composition prompts, making it difficult for users to capture the desired highly symmetrical images.
By displaying a preview image in the shooting viewfinder of the electronic device and displaying the object morphology information of the target object, including symmetry feature values and object morphology information, when symmetry detection and position information match, the shooting composition and angle are prompted in real time.
The accuracy and reliability of shooting prompts are improved to ensure that the final image is symmetrical and meet the user's high symmetry requirements.
Smart Images

Figure CN120614520A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of image acquisition, and relate to but are not limited to a shooting prompt method and apparatus, equipment, and storage medium. Background Art
[0002] Currently, when photographing certain symmetrical objects, users often need to capture symmetrical images. Related technologies typically display auxiliary lines to assist with composition, but these lines only provide a rough reference and lack precise compositional guidance, making it difficult for users to capture the desired highly symmetrical images. Summary of the Invention
[0003] In view of this, the shooting prompt method, device, equipment, and storage medium provided in the embodiments of the present application can improve the accuracy and reliability of the shooting prompt results of the smart wearable device. The shooting prompt method, device, equipment, and storage medium provided in the embodiments of the present application are implemented as follows:
[0004] In a first aspect of an embodiment of the present application, a shooting prompt method is provided, the method comprising:
[0005] Displaying a preview image in a shooting viewfinder of the electronic device, wherein the preview image includes a target object;
[0006] When the preview image passes the symmetry detection and the position information of the electronic device has object morphology information that matches the target object, the object morphology information of the target object is displayed in the shooting viewfinder to prompt the position of the target object in the shooting viewfinder during the image shooting process.
[0007] In one possible implementation, the method further includes:
[0008] determining position information of the electronic device when the preview image passes the symmetry detection;
[0009] The object morphology information that matches the target object is determined based on the position information.
[0010] In one possible implementation, the method further includes:
[0011] Determine the symmetric eigenvalue corresponding to the preview image;
[0012] When the symmetry eigenvalue is greater than the eigenvalue threshold, it is determined that the preview image passes the symmetry detection.
[0013] In a possible implementation, determining the symmetry feature value corresponding to the preview image includes:
[0014] dividing the preview image into a first image region and a second image region according to an image symmetry axis;
[0015] Mirror-flipping the first image region and the second image region respectively to obtain a first image and a second image;
[0016] The similarity between the first image and the second image is calculated to obtain a symmetric feature value corresponding to the preview image.
[0017] In a possible implementation, determining the symmetry feature value corresponding to the preview image further includes:
[0018] Perform straight line detection on the preview image;
[0019] The image symmetry axis of the preview image is identified based on the straight line detection result.
[0020] In one possible implementation, calculating the similarity between the first image and the second image to obtain a symmetric feature value corresponding to the preview image includes:
[0021] performing image similarity calculation on the first image and the second image to obtain a first similarity;
[0022] performing feature point matching on the first image and the second image to obtain a second similarity;
[0023] A symmetric feature value corresponding to the preview image is determined according to a weighted sum of the first similarity and the second similarity.
[0024] In one possible implementation, determining object morphology information matching the target object according to the position information includes:
[0025] In the case where the position information has at least one corresponding object morphology information, calculating a matching value between each object morphology information and the target object;
[0026] When the matching value is greater than the matching value threshold, it is determined that the object morphology information matches the target object.
[0027] In a possible implementation, the object morphological information is displayed in the form of an axisymmetric image, and the axisymmetric image includes a plurality of contour lines and / or a plurality of feature points.
[0028] According to a second aspect of the embodiments of the present application, a shooting prompt device is further provided, the device comprising:
[0029] An image preview module is used to display a preview image in a shooting viewfinder of the electronic device, where the preview image includes a target object;
[0030] An information prompt module is used to display the object morphology information of the target object in the shooting viewfinder when the preview image passes the symmetry detection and the position information of the electronic device has object morphology information that matches the target object, and is used to prompt the position of the target object in the shooting viewfinder during the image shooting process.
[0031] In a possible implementation, the apparatus further includes:
[0032] A position acquisition module, configured to determine the position information of the electronic device when the preview image passes the symmetry detection;
[0033] The information matching module is used to determine the object morphology information that matches the target object based on the position information.
[0034] In a possible implementation, the apparatus further includes:
[0035] A feature determination module, used to determine the symmetric feature value corresponding to the preview image;
[0036] The symmetry detection module is used to determine that the preview image passes the symmetry detection when the symmetry eigenvalue is greater than the eigenvalue threshold.
[0037] In a possible implementation, the feature determination module is further configured to:
[0038] dividing the preview image into a first image region and a second image region according to an image symmetry axis;
[0039] Mirror-flipping the first image region and the second image region respectively to obtain a first image and a second image;
[0040] The similarity between the first image and the second image is calculated to obtain a symmetric feature value corresponding to the preview image.
[0041] In a possible implementation, the feature determination module is further configured to:
[0042] Perform straight line detection on the preview image;
[0043] The image symmetry axis of the preview image is identified based on the straight line detection result.
[0044] In a possible implementation, the feature determination module is further configured to:
[0045] performing image similarity calculation on the first image and the second image to obtain a first similarity;
[0046] performing feature point matching on the first image and the second image to obtain a second similarity;
[0047] A symmetric feature value corresponding to the preview image is determined according to a weighted sum of the first similarity and the second similarity.
[0048] In a possible implementation, the information matching module is further configured to:
[0049] In the case where the position information has at least one corresponding object morphology information, calculating a matching value between each object morphology information and the target object;
[0050] When the matching value is greater than the matching value threshold, it is determined that the object morphology information matches the target object.
[0051] In a possible implementation, the object morphological information is displayed in the form of an axisymmetric image, and the axisymmetric image includes a plurality of contour lines and / or a plurality of feature points.
[0052] According to a third aspect of the embodiments of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the shooting prompt method provided in any embodiment of the present application are implemented.
[0053] In a fourth aspect of the embodiments of the present application, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the shooting prompt method provided in any embodiment of the present application are implemented.
[0054] The shooting prompt method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application display a preview image in the shooting viewfinder of the electronic device, and the preview image includes a target object. When the preview image passes the symmetry detection and the position information of the electronic device has object morphology information that matches the target object, the object morphology information of the target object is displayed in the shooting viewfinder to prompt the position of the target object in the shooting viewfinder during the image shooting process. This method can accurately identify scenes that require symmetrical image capture through symmetry detection and position detection during the image acquisition process of the target object, and prompt the shooting composition and shooting angle in real time through the object morphology information to ensure that the final image has symmetrical properties. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0056] Figure 1 A schematic diagram showing an application scenario of a shooting prompt method according to an embodiment of the present application is shown;
[0057] Figure 2 A flowchart of a shooting prompt method according to an embodiment of the present application is shown;
[0058] Figure 3 A flowchart of another shooting prompt method according to an embodiment of the present application is shown;
[0059] Figure 4 A schematic diagram showing a symmetry detection process according to an embodiment of the present application is shown;
[0060] Figure 5 A schematic diagram showing an image segmentation result according to an embodiment of the present application is shown;
[0061] Figure 6 A schematic diagram showing object morphology information according to an embodiment of the present application is shown;
[0062] Figure 7 A schematic diagram showing another object form information according to an embodiment of the present application is shown;
[0063] Figure 8 A schematic diagram of a shooting prompt device according to an embodiment of the present application is shown;
[0064] Figure 9 A schematic diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0065] To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the specific technical solutions of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application but are not intended to limit the scope of the present application.
[0066] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0067] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0068] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are used to distinguish similar or different objects, and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0069] The shooting prompt method of the embodiment of the present application can be executed by an electronic device, which may include but is not limited to a mobile phone, a wearable device (such as a smart watch, a smart bracelet, smart glasses, etc.), a tablet computer, a laptop computer, a vehicle terminal, a PC (Personal Computer), etc. The functions implemented by the method can be implemented by a processor in the electronic device calling program code. Of course, the program code can be stored in a computer storage medium. Therefore, the electronic device includes at least a processor and a storage medium.
[0070] The shooting prompt method of the embodiment of the present application can be used in application scenarios that require the capture of highly symmetrical structures. For example, the embodiment of the present application can be applied to application scenarios where symmetrical images of ancient or modern buildings with highly symmetrical structures are captured, or to application scenarios where symmetrical images of industrial structures that require highly symmetrical designs are captured, as well as application scenarios where symmetrical images of natural landscapes, street scenes, or cultural totems with highly symmetrical structures are captured.
[0071] Figure 1 FIG. 1 shows a schematic diagram of an application scenario of a shooting prompt method according to an embodiment of the present application. Figure 1 As shown, the shooting prompt method of the embodiment of the present application can be executed by an electronic device, and the electronic device may include a display device for displaying a viewfinder corresponding to the image acquisition device.
[0072] Optionally, the viewfinder in the embodiment of the present application is a page on the electronic device used to observe the image content and composition before image capture. For example, if the electronic device in the embodiment of the present application is a smartphone, the viewfinder can be an image preview page of the camera application of the electronic device. If the electronic device in the embodiment of the present application is a camera, the viewfinder can be an image preview page displayed on the display screen of the electronic device.
[0073] In some embodiments, the electronic device of the present application embodiment has a built-in image acquisition device, which is used to provide a shooting prompt for the image acquisition process of the electronic device itself in a scenario where a user uses the camera application of the electronic device to capture a highly symmetrical image. Alternatively, the electronic device of the present application embodiment is connected to other image acquisition devices that do not have processing capabilities, and is used to preview the captured image and provide a shooting prompt through the electronic device in a scenario where a user uses the other image acquisition device to capture a highly symmetrical image.
[0074] In order to assist users in image capture through shooting prompts in scenarios where users have high symmetry image capture requirements, the embodiments of the present application accurately identify scenarios where symmetrical images need to be captured through symmetry detection and position detection during image capture of the target object, and provide real-time prompts for shooting composition and shooting angles through object morphology information to ensure that the final image has symmetrical properties.
[0075] The following is a detailed description of the shooting prompt scheme of the embodiment of the present application with reference to the accompanying drawings.
[0076] Figure 2 FIG. 1 shows a flow chart of a shooting prompt method according to an embodiment of the present application. Figure 2 As shown, the shooting prompt method of the embodiment of the present application may include the following steps S20-S21.
[0077] For ease of description, the shooting prompt method of the embodiment of the present application is described with an electronic device as the execution subject. It should be understood that the execution subject of the embodiment of the present application can also be a processor or chip in the electronic device, and the embodiment of the present application does not impose any limitation.
[0078] Step S20: Display the preview image in the shooting viewfinder of the electronic device.
[0079] In one possible implementation, an electronic device may include a display device configured to display a preview image obtained by camera framing via a shooting viewfinder while a user is capturing an image using an image capture device of the electronic device or an image capture device connected to the electronic device. The shooting viewfinder in the embodiment of the present application is a page on the electronic device for viewing image content and composition before image capture.
[0080] Optionally, the preview image in the embodiment of the present application includes a target object, which can be a living object such as a person, cat, dog, plant, or the like in its entirety or in its part. Alternatively, it can be an inanimate object such as a building, natural environment, furniture, or road, or the like in its entirety or in its part.
[0081] In some embodiments, the target object may be an object with a symmetrical structure or an object without a symmetrical structure. Since a highly symmetrical structure requires that the entire image be highly symmetrical, only when the target object is an object with a symmetrical structure will the electronic device deem that the user in the embodiment of the present application needs to capture a highly symmetrical image, and further determine whether a shooting prompt is required. When the target object is an object with an asymmetrical structure, the electronic device deems that the user in the embodiment of the present application does not need to capture a highly symmetrical image, and therefore can directly determine that a shooting prompt is not required.
[0082] Based on the above background, the embodiments of the present application can first perform object symmetry detection on the target object after identifying it in the preview image. If the target object passes the object symmetry detection, the next step is executed to further determine whether a shooting prompt is required. If the target object in the preview image fails the object symmetry detection, the next step is not executed and the processing is terminated directly to save unnecessary computing power.
[0083] In some embodiments, the object symmetry detection method can be to identify the target object area in the preview image, mirror the target object area, and then calculate the image similarity before and after the mirroring. Optionally, if the image similarity is greater than a preset threshold, the object symmetry detection is determined to have passed, and the target object is determined to be a symmetrical object. Then, the next step is executed to further determine whether a shooting prompt is required. Optionally, if the image similarity is not greater than the preset threshold, the object symmetry detection is determined to have failed, and the target object is determined to be an asymmetrical object, and the shooting prompt process ends.
[0084] Step S21 : When the preview image passes the symmetry detection and the position information of the electronic device has object morphology information matching the target object, the object morphology information of the target object is displayed in the shooting viewfinder.
[0085] In one possible implementation, after acquiring and displaying a preview image including a target object, the electronic device may perform a symmetry check on the entire preview image. Alternatively, after acquiring and displaying a preview image including a target object, if the target object in the preview image is a symmetrical object, the electronic device may further perform a symmetry check on the entire preview image.
[0086] Optionally, the symmetry detection process is used to determine whether the preview image is highly symmetrical. If the preview image is highly symmetrical, the electronic device determines that the user needs to capture a highly symmetrical image and has a need for composition prompts, and further determines whether a shooting prompt is required. If the preview image is less symmetrical, the electronic device determines that the user does not need to capture a highly symmetrical image and does not have a need for composition prompts, and therefore can directly determine that a shooting prompt is not required.
[0087] In some embodiments, the electronic device further obtains the position information of the current image acquisition module to determine, based on the position information, whether the current position exists within the object morphology information that matches the target object. For example, the electronic device's memory or a connected database may pre-store a plurality of matching relationships between position coordinates and at least one type of object's object morphology information. After displaying the preview image, the electronic device obtains the position information of the current image acquisition module and, based on the position information, searches among the pre-stored matching relationships between position coordinates and at least one type of object's object morphology information to obtain corresponding search results.
[0088] Optionally, the location information in the embodiment of the present application may be obtained by a positioning device built into the electronic device or a connected image acquisition device, for example, it may be GPS positioning information obtained through a GPS (Global Positioning System).
[0089] In some embodiments, if the preview image passes symmetry detection and object morphology information matching the target object is found through the electronic device's location information search, the electronic device can display the target object's object morphology information in the shooting viewfinder for composition guidance. The object morphology information display layer can be located above the preview image display layer, allowing the user to intuitively use the object morphology information in the shooting viewfinder to assist in capturing the target object, resulting in a highly symmetrical image.
[0090] In other embodiments, the preview image may not be displayed in the shooting viewfinder after being captured by the image acquisition device. Instead, the shooting prompt algorithm of the embodiment of the present application may be executed to determine whether a corresponding shooting prompt is required. If a shooting prompt is required, the preview image and the corresponding object morphology information are displayed in the shooting viewfinder simultaneously. If a shooting prompt is not required, only the preview image is displayed in the shooting viewfinder.
[0091] Based on the above technical features, the embodiment of the present application can accurately identify scenes that require symmetrical images through symmetry detection and position detection during image acquisition of the target object, and provide real-time prompts for shooting composition and shooting angle through object morphology information to ensure that the final image has symmetrical properties.
[0092] In step S21, the electronic device can simultaneously detect the symmetry of the preview image and determine whether there is object morphology information matching the target object based on the position information. This approach improves the efficiency of the shooting prompt method of the embodiment of the present application by performing parallel task processing.
[0093] In other embodiments, the electronic device may further set the order of performing symmetry detection on the preview image and determining whether object morphology information matching the target object exists based on the position information. Alternatively, the electronic device may determine the electronic device's position information if the preview image passes the symmetry detection. The electronic device may then determine object morphology information matching the target object based on the position information.
[0094] For example, if the preview image passes the symmetry check, the electronic device determines that the user needs to capture a highly symmetrical image and needs to provide a composition prompt. Furthermore, the electronic device determines the position information and, based on the position information, determines object morphology information that matches the target object to provide a shooting prompt. If the preview image fails the symmetry check, the electronic device determines that the user does not need to capture a highly symmetrical image and does not need to provide a composition prompt. There is no need to obtain the position information and determine object morphology information that matches the target object based on the position information.
[0095] Figure 3 FIG. 1 shows a flow chart of another shooting prompt method according to an embodiment of the present application. Figure 3 As shown, after acquiring a preview image, the electronic device may execute step S30 to display the preview image in a shooting viewfinder. Before displaying the preview image, while displaying the preview image, or after displaying the preview image, the electronic device may execute step S31 to perform a symmetry check on the preview image. Optionally, after completing the symmetry check process, the electronic device executes step S32 to determine whether the preview image passes the symmetry check.
[0096] If the preview image fails the symmetry test, the electronic device determines that the user does not need to shoot a highly symmetric image. In this case, the user does not need to be prompted to shoot, and the electronic device can execute step S36 to display the preview image without a shooting prompt in a shooting viewfinder.
[0097] If the preview image passes the symmetry check, the electronic device preliminarily determines that the user desires to capture a highly symmetrical image and further executes step S33 to obtain location information of the electronic device or a connected image acquisition device. After obtaining the location information, the electronic device executes step S34 to determine whether there is object morphology information that matches the target object in the preview image.
[0098] If there is no object morphology information matching the target object in the preview image, the electronic device determines that the user does not need to capture a highly symmetric image. In this case, the user does not need to be prompted to capture the image, and the electronic device can execute step S36 to display the preview image without a capture prompt in a capture viewfinder.
[0099] If object morphology information matches the target object in the preview image, the electronic device determines that the user has a desire to capture a highly symmetrical image. In this case, if the user requires a capture prompt, the electronic device may execute step S35 to display the preview image and the object morphology information in a capture frame. The object morphology information is used to provide composition prompts during image capture.
[0100] Based on the above technical features, the embodiment of the present application can avoid performing subsequent unnecessary processing when the user does not need to provide composition prompts, thereby saving computing power of the electronic device.
[0101] In one possible implementation, step S21 of the embodiment of the present application may perform symmetry detection on the preview image in any manner. For example, the electronic device may determine a symmetry eigenvalue corresponding to the preview image, and determine that the preview image passes the symmetry detection if the symmetry eigenvalue is greater than a eigenvalue threshold. The symmetry eigenvalue is used to characterize the degree of symmetry of the preview image and is positively correlated with the degree of symmetry of the preview image. That is, the larger the symmetry eigenvalue, the more symmetrical the preview image; and the smaller the symmetry eigenvalue, the more asymmetric the preview image.
[0102] Based on the above-mentioned method of performing symmetry detection using symmetry eigenvalues, the embodiments of the present application can accurately characterize the degree of symmetry of the preview image through symmetry eigenvalues, thus achieving simple and reliable symmetry detection. Furthermore, symmetry eigenvalues can also explain the symmetry detection results, improving the interpretability of the symmetry detection process.
[0103] The embodiment of the present application can determine the symmetric eigenvalue of the preview image in any optional manner, for example, the corresponding symmetric eigenvalue can be calculated by image processing, or the symmetric eigenvalue of the preview image can be determined by a deep learning algorithm.
[0104] In some embodiments, the electronic device may pre-train a symmetry value determination model for determining the symmetry feature value of a preview image, input the preview image into the symmetry value determination model, analyze the degree of symmetry of the preview image through the symmetry value determination model, and output the corresponding symmetry feature value.
[0105] In other embodiments, the electronic device may determine the symmetry feature value of the preview image using a preset similarity calculation algorithm. For example, the electronic device may compare the preview image with a mirrored image obtained by mirroring the preview image, and use the resulting similarity comparison value as the symmetry feature value. Alternatively, the electronic device may segment the preview image into a first image region and a second image region based on an image symmetry axis. The first image region and the second image region are mirror-flipped to obtain a first image and a second image, respectively. The similarity between the first image and the second image is calculated to obtain the symmetry feature value corresponding to the preview image.
[0106] Optionally, the image axis of symmetry is a line set in the center of the preview image, and may include a horizontal axis of symmetry or a vertical axis of symmetry. Specifically, when determining whether the preview image is an image with a vertically symmetrical structure, the image axis of symmetry may be a horizontal axis of symmetry set in the center of the preview image, used to divide the preview image into upper and lower parts. When determining whether the preview image is an image with a bilaterally symmetrical structure, the image axis of symmetry may be a vertical axis of symmetry set in the center of the preview image, used to divide the preview image into left and right parts.
[0107] For example, when the image axis of symmetry is a horizontal axis of symmetry, the electronic device may horizontally divide the preview image into upper and lower parts, determining the upper part as the first image area and the lower part as the second image area. The first image area may be further mirrored downward to obtain the first image, and the second image area may be mirrored upward to obtain the second image. When the image axis of symmetry is a vertical axis of symmetry, the electronic device may vertically divide the preview image into left and right parts, determining the left part as the first image area and the right part as the second image area. The first image area may be further mirrored rightward to obtain the first image, and the second image area may be mirrored leftward to obtain the second image.
[0108] After determining the first image and the second image, the electronic device can calculate the similarity between the first image and the second image to obtain the corresponding symmetry feature value of the preview image. This method of calculating the symmetry feature value can segment the image region based on the image symmetry axis, and further improve the accuracy of the calculated symmetry feature value through image segmentation and mirror flipping.
[0109] In one possible implementation, the electronic device in the embodiment of the present application can respectively determine the horizontal symmetry axis and the vertical symmetry axis as the image symmetry axis, and determine that the preview image passes the symmetry detection when the symmetry eigenvalue calculated based on any symmetry axis is greater than the eigenvalue threshold.
[0110] In other embodiments, the electronic device may also first perform symmetry axis detection on the preview image, determine the image symmetry axis of the preview image, and then calculate the symmetry eigenvalue based on the image symmetry axis, so as to perform symmetry detection on the preview image based on the comparison between the calculated symmetry eigenvalue and the eigenvalue threshold.
[0111] For example, the electronic device may perform straight line detection on the preview image and then identify the image symmetry axis of the preview image based on the straight line detection results. Optionally, the straight line detection method of the embodiments of the present application may be a straight line detection method of any image processing algorithm. For example, Canny edge detection and Hough line transform may be used to detect straight lines in the preview image to determine whether a vertical or horizontal axis of symmetry exists based on the comparison of the detected straight lines. Among them, Canny edge detection is used to detect clear edges in the preview image, and Hough line transform is used to detect straight lines in the preview image.
[0112] In other embodiments, if the electronic device fails to identify the image symmetry axis of the preview image based on the line detection results after the above-mentioned line detection, it may default to using the important vertical and horizontal axes of the image as the image symmetry axis. Alternatively, the electronic device may randomly determine either the horizontal or vertical axis of symmetry as the image symmetry axis.
[0113] The above-mentioned straight line detection process can assist in identifying the image symmetry axis based on the straight line detection result, thereby improving the accuracy of the image symmetry axis identification result and improving the efficiency of the symmetry axis identification process.
[0114] In a possible implementation, after determining the first image and the second image, the electronic device may perform similarity calculation on the first image and the second image using any similarity calculation algorithm to determine the symmetry feature value of the preview image according to the similarity calculation result.
[0115] In some embodiments, the electronic device may directly calculate image similarity between the first image and the second image to obtain a first similarity. Feature point matching may then be performed on the first image and the second image to obtain a second similarity. A symmetric feature value corresponding to the preview image is determined based on a weighted sum of the first and second similarities. The first similarity represents the similarity of the overall image structure, while the second similarity represents the similarity of local feature information.
[0116] Exemplarily, the calculation process of the first similarity can be to calculate the overall structural similarity index (SSIM) of the first image and the second image, wherein the similarity index includes a brightness similarity comparison between the first image and the second image, a contrast similarity comparison between the first image and the second image, and a structural similarity comparison between the first image and the second image.
[0117] For example, the second similarity calculation process may include first extracting feature points included in the first image and the second image, then using a feature point matching algorithm (FLANN) to find the best matching feature point pair between the first image and the second image, and determining the similarity between the two images based on the number and position distribution of the matching feature point pairs. The more matching feature point pairs there are, the higher the similarity between the first image and the second image. The fewer matching feature point pairs there are, the lower the similarity between the first image and the second image.
[0118] In some embodiments, the electronic device of the present invention may extract feature points from the first and second images by first performing edge detection on the first and second images using operators such as Canny, Sobel, and Laplacian to emphasize structural information in the images. After edge detection, the device may then use algorithms such as Harris corner detection, FAST, SIFT, and SURF to find stable feature points in the first or second image. These feature points are typically located at key locations in the image and are used to characterize key feature information of the image.
[0119] Figure 4 FIG. 1 shows a schematic diagram of a symmetry detection process according to an embodiment of the present application. Figure 4 As shown, after obtaining the preview image, the electronic device can display the preview image by shooting the viewfinder. Before displaying the preview image, while displaying the preview image, or after displaying the preview image, the electronic device can perform symmetry detection on the preview image.
[0120] Optionally, in the embodiment of the present application, the symmetry detection process can be performed by the electronic device performing step S40 based on the preview image to perform line detection, thereby obtaining a line detection result. After completing the line detection, the electronic device performs step S41 to identify the image axis of symmetry based on the line detection result. Furthermore, the electronic device performs step S42 to segment the image based on the image axis of symmetry, thereby obtaining a segmentation result including a first image region and a second image region. Based on the segmentation result, the electronic device can mirror the first image region and the second image region to obtain corresponding first and second images.
[0121] After determining the first image and the second image, the electronic device executes step S43 to calculate similarity between the first image and the second image to obtain a symmetry feature value representing the degree of symmetry of the preview image. The electronic device may calculate image similarity between the first image and the second image to obtain a first similarity. Then, the electronic device may perform feature point matching on the first image and the second image to obtain a second similarity. The symmetry feature value corresponding to the preview image is determined based on a weighted sum of the first and second similarities.
[0122] After determining the symmetry eigenvalue, the electronic device executes step S44 to determine whether the symmetry eigenvalue is greater than the eigenvalue threshold. If the symmetry eigenvalue is greater than the eigenvalue threshold, the electronic device may further execute step S45 to determine that the preview image passes the symmetry test. If the symmetry eigenvalue is not greater than the eigenvalue threshold, the electronic device may further execute step S46 to determine that the preview image fails the symmetry test.
[0123] Figure 5 FIG. 1 shows a schematic diagram of an image segmentation result according to an embodiment of the present application. Figure 5 As shown, when the image axis of symmetry is a longitudinal axis of symmetry, the electronic device can vertically divide the preview image into left and right parts, determining the left part as the first image area and the right part as the second image area. The first image area is further mirrored rightward to obtain the first image, and the second image area is mirrored leftward to obtain the second image. Accordingly, when the image axis of symmetry is a transverse axis of symmetry, the electronic device can horizontally divide the preview image into upper and lower parts, determining the upper part as the first image area and the lower part as the second image area. The first image area is further mirrored downward to obtain the first image, and the second image area is mirrored upward to obtain the second image.
[0124] In a possible implementation, in step S21 of the embodiment of the present application, the electronic device may, when determining the object morphological information that matches the target object, first obtain at least one corresponding object morphological information based on the position information. When the position information has at least one corresponding object morphological information, the matching value between each object morphological information and the target object is calculated. When the matching value is greater than the matching value threshold, it is determined that the object morphological information matches the target object. The matching value can be determined by a deep neural network, that is, the preview image and the object morphological information are input into the trained deep neural network, and the corresponding matching value is output. Alternatively, a preset similarity measurement algorithm can be used to perform similarity measurement on the preview image and the object morphological information to obtain a corresponding matching value.
[0125] Optionally, when the target object has multiple object morphology information with matching values greater than a matching value threshold, the object morphology information with the largest matching value may be determined as the object morphology information matching the target object.
[0126] The above-mentioned object morphological information matching process can accurately determine the object morphological information that matches the target object, and increases the interpretability of the matching result by calculating the matching value.
[0127] In some embodiments, the object morphology information can be displayed in the form of an axisymmetric image, which includes multiple contour lines and / or multiple feature points. The axis of symmetry of the axisymmetric image is the same as the axis of symmetry of the preview image. That is, if the axis of symmetry of the preview image is a vertical axis of symmetry that divides the shooting frame into two equal parts, the axis of symmetry of the axisymmetric image is also the vertical axis of symmetry that divides the shooting frame into two equal parts. If the axis of symmetry of the preview image is a horizontal axis of symmetry that divides the shooting frame into two equal parts, the axis of symmetry of the axisymmetric image is also the horizontal axis of symmetry that divides the shooting frame into two equal parts.
[0128] Optionally, the object morphology information may also include text information to prompt the user to compose the image. The electronic device may also display the current electronic device's corresponding position information and the symmetry detection results of the preview image in the shooting viewfinder to increase the interpretability of the shooting prompts and optimize the user experience.
[0129] Figure 6 FIG. 1 shows a schematic diagram of object morphology information according to an embodiment of the present application. Figure 6 As shown, the object morphology information can be displayed above the preview image in the form of an axisymmetric image. The axisymmetric image includes multiple feature points for indicating the position of the target object in the shooting viewfinder.
[0130] Figure 7 FIG. 1 shows another schematic diagram of object morphology information according to an embodiment of the present application. Figure 7 As shown, the object morphology information can be displayed above the preview image in the form of an axisymmetric image, which includes multiple contour lines and feature points for indicating the position of the target object in the shooting viewfinder.
[0131] Based on the above object morphology information, high-precision prompts can be provided to users when taking images of highly symmetrical structures, assisting users in taking images that meet their needs.
[0132] It should be understood that, although the steps in the above-mentioned flowcharts are shown in sequence according to the instructions of the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the above-mentioned flowcharts may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0133] Based on the foregoing embodiments, an embodiment of the present application provides a shooting prompt device, which includes the modules included and the units included in each module, and can be implemented by a processor; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.
[0134] Figure 8 FIG. 8 is a schematic diagram showing a shooting prompt device 80 according to an embodiment of the present application. Figure 8 As shown, the shooting prompt device 80 of the embodiment of the present application may include:
[0135] An image preview module 81 is configured to display a preview image in a shooting viewfinder of the electronic device, wherein the preview image includes a target object;
[0136] The information prompt module 82 is used to display the object morphology information of the target object in the shooting viewfinder when the preview image passes the symmetry detection and the position information of the electronic device has object morphology information that matches the target object, and is used to prompt the position of the target object in the shooting viewfinder during the image shooting process.
[0137] In a possible implementation, the apparatus further includes:
[0138] A position acquisition module, configured to determine the position information of the electronic device when the preview image passes the symmetry detection;
[0139] The information matching module is used to determine the object morphology information that matches the target object based on the position information.
[0140] In a possible implementation, the apparatus further includes:
[0141] A feature determination module, used to determine the symmetric feature value corresponding to the preview image;
[0142] The symmetry detection module is used to determine that the preview image passes the symmetry detection when the symmetry eigenvalue is greater than the eigenvalue threshold.
[0143] In a possible implementation, the feature determination module is further configured to:
[0144] dividing the preview image into a first image region and a second image region according to an image symmetry axis;
[0145] Mirror-flipping the first image region and the second image region respectively to obtain a first image and a second image;
[0146] The similarity between the first image and the second image is calculated to obtain a symmetric feature value corresponding to the preview image.
[0147] In a possible implementation, the feature determination module is further configured to:
[0148] Perform straight line detection on the preview image;
[0149] The image symmetry axis of the preview image is identified based on the line detection result.
[0150] In a possible implementation, the feature determination module is further configured to:
[0151] performing image similarity calculation on the first image and the second image to obtain a first similarity;
[0152] performing feature point matching on the first image and the second image to obtain a second similarity;
[0153] A symmetric feature value corresponding to the preview image is determined according to a weighted sum of the first similarity and the second similarity.
[0154] In a possible implementation, the information matching module is further configured to:
[0155] In the case where the position information has at least one corresponding object morphology information, calculating a matching value between each object morphology information and the target object;
[0156] When the matching value is greater than the matching value threshold, it is determined that the object morphology information matches the target object.
[0157] In a possible implementation, the object morphological information is displayed in the form of an axisymmetric image, and the axisymmetric image includes a plurality of contour lines and / or a plurality of feature points.
[0158] The description of the above device embodiment is similar to the description of the above method embodiment and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of this application, please refer to the description of the method embodiment of this application for understanding.
[0159] It should be noted that in the embodiments of this application Figure 8 The division of modules in the shooting prompt device shown is schematic and is only a logical functional division. In actual implementation, there may be other division methods. In addition, the functional units in the various embodiments of the present application can be integrated into a processing unit, or they can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. It can also be implemented in the form of a combination of software and hardware.
[0160] It should be noted that, in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device to execute all or part of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0161] Figure 9 FIG1 shows a schematic diagram of an electronic device according to an embodiment of the present application. Figure 9 As shown, an embodiment of the present application provides an electronic device, which may be a server, and its internal structure diagram may be as shown in FIG. Figure 9 As shown. The electronic device includes a processor 920, a memory and a transceiver 940 connected via a system bus 910. The processor 920 of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium 931 and an internal memory 932. The non-volatile storage medium 931 stores an operating system, a computer program and a database. The internal memory 932 provides an environment for the operation of the operating system and computer program in the non-volatile storage medium 931. The database of the electronic device is used to store data. The transceiver 940 of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor 920, the above method is implemented.
[0162] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by the processor 920, the steps of the method provided in the above embodiment are implemented.
[0163] An embodiment of the present application provides a computer program product containing instructions, which, when executed on a computer, enables the computer to execute the steps of the method provided in the above method embodiment.
[0164] Those skilled in the art will understand that Figure 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0165] In a possible implementation, the shooting prompt device provided by the present application can be implemented in the form of a computer program. The computer program can be used in Figure 9 The electronic device is operated on the electronic device shown. The memory of the electronic device may store various program modules constituting the above-mentioned apparatus. The computer program composed of each program module enables the processor 920 to execute the steps of the method of each embodiment of the present application described in this specification.
[0166] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium, and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0167] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one possible implementation" or "in one embodiment" or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other. For the sake of brevity, they will not be repeated here.
[0168] The term "and / or" in this article is only a description of the association relationship between associated objects, indicating that there can be three relationships. For example, object A and / or object B can mean: object A exists alone, object A and object B exist at the same time, and object B exists alone.
[0169] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0170] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms.
[0171] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed across multiple network units; some or all of the modules may be selected according to actual needs to achieve the purpose of this embodiment.
[0172] In addition, all functional modules in the embodiments of the present application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the above-mentioned integrated modules can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0173] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, and other media that can store program codes.
[0174] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.
[0175] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0176] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0177] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0178] The above is merely an embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A shooting prompt method, characterized in that: The method comprises: Displaying a preview image in a shooting viewfinder of the electronic device, wherein the preview image includes a target object; When the preview image passes the symmetry detection and the position information of the electronic device has object morphology information that matches the target object, the object morphology information of the target object is displayed in the shooting viewfinder to prompt the position of the target object in the shooting viewfinder during the image shooting process.
2. The method according to claim 1, characterized in that The method further comprises: If the preview image passes the symmetry detection, determining the position information of the electronic device; Object morphology information matching the target object is determined according to the position information.
3. The method according to claim 1, characterized in that The method further comprises: Determining a symmetric eigenvalue corresponding to the preview image; When the symmetry eigenvalue is greater than the eigenvalue threshold, it is determined that the preview image passes the symmetry detection.
4. The method according to claim 3, characterized in that Determining the symmetric feature value corresponding to the preview image includes: dividing the preview image into a first image area and a second image area according to an image symmetry axis; performing mirror flipping on the first image region and the second image region respectively to obtain a first image and a second image; The similarity between the first image and the second image is calculated to obtain a symmetric feature value corresponding to the preview image.
5. The method according to claim 4, characterized in that The determining of the symmetric feature value corresponding to the preview image further includes: Performing straight line detection on the preview image; An image symmetry axis of the preview image is identified according to the straight line detection result.
6. The method according to claim 4, characterized in that The calculating the similarity between the first image and the second image to obtain the symmetric feature value corresponding to the preview image includes: performing image similarity calculation on the first image and the second image to obtain a first similarity; performing feature point matching on the first image and the second image to obtain a second similarity; A symmetric feature value corresponding to the preview image is determined according to a weighted sum of the first similarity and the second similarity.
7. The method according to claim 2, characterized in that The determining, based on the position information, object morphology information that matches the target object includes: In a case where the position information has at least one corresponding object form information, calculating a matching value between each piece of object form information and the target object; When the matching value is greater than the matching value threshold, it is determined that the object morphology information matches the target object.
8. The method according to any one of claims 1 to 7, characterized in that The object morphological information is displayed in the form of an axisymmetric image, and the axisymmetric image includes a plurality of contour lines and / or a plurality of feature points.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.