Method for automatically tracking shooting falling day, automatic tracking shooting device and electronic equipment

By combining computer vision technology with intelligent connected vehicles, the sunset position and shooting angle are automatically adjusted, solving the problem of fully automatic sunset shooting that is difficult to achieve through manual operation in existing technologies, and realizing efficient photographic aesthetic tracking and composition optimization.

CN120676254APending Publication Date: 2025-09-19SUZHOU DEEPSIGHT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511014916.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Existing sunset photography technology relies on manual operation, making it difficult to achieve fully automated photographic aesthetic tracking. General sun tracking technology is not suitable for photography needs and lacks a linkage solution between computer vision algorithms and photographic composition.

Method used

Computer vision technology is used to identify the sunset, and the sunset position is automatically adjusted by adjusting the shooting angle and rotation module to achieve fully automatic photographic-level composition. The target detection algorithm is used to obtain the sunset detection frame and adjust the angle of view to optimize the composition. The yaw angle data of the intelligent connected vehicle is combined to optimize shooting.

Benefits of technology

It realizes fully automatic sunset tracking and shooting, improves the professionalism and robustness of shooting effects, adapts to changes in light, and ensures the realization of the best composition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120676254A_ABST
    Figure CN120676254A_ABST
Patent Text Reader

Abstract

The invention discloses a method for automatically tracking a shooting falling day, an automatic tracking shooting device and electronic equipment. The method comprises the following steps: S1, acquiring a falling day detection frame in a real-time video frame; s2, adjusting a shooting visual angle, and moving the center of a sun falling detection frame to the center of a real-time picture; s3, detecting a preset color area of a left upper area of the first position as a first area; detecting a preset color area of an upper right area of the first position as a second area; s4, if the first area is larger than the second area and the first area is larger than a threshold value, adjusting a shooting visual angle to enable the second position to move to the first area; and vice versa; and S5, when the second position is located in the first area or the second area, storing the current frame. According to the shooting method, the falling day is identified through a computer vision technology, and the shooting-level composition of the falling day is automatically realized through an adjustment and control algorithm, so that a full-automatic falling day tracking and shooting scheme is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the fields of computer vision technology and motion tracking photography, and more particularly to a method and device for automatically tracking and photographing a sunset. Background Art

[0002] In photography, sunsets are highly valuable subject matter due to their unique light color temperature (approximately 2000K to 3500K) and rich gradations of sky color (gradients from orange to pink and purple). However, existing photography techniques have the following limitations: First, they rely on manual operation, requiring photographers to manually adjust camera parameters and track the changes in the sunset's azimuth and altitude in real time. Sunset periods ("golden hour" and "blue hour") last only about 45 minutes, with dramatic light fluctuations (altitude angle drops by approximately 0.5° per minute). The lag in manual response can easily lead to missed optimal compositions. Second, general sun tracking technology is unsuitable: Solar trackers in the energy sector (such as tower-mounted solar thermal power generation systems) rely on reflector position adjustment to focus the light spot onto a fixed receiver. The precision requirement is energy concentration, not compositional aesthetics. While astronomical tracking methods (such as the apparent solar motion trajectory method) can predict the sun's position, they are not optimized for photography.

[0003] Currently, sunset photography is highly dependent on manual experience and lacks fully automatic tracking methods optimized for photographic aesthetics and low-light environments. There is an urgent need for a solution that integrates computer vision algorithms and photographic composition. Summary of the Invention

[0004] In order to solve the above technical problems, this application adopts the following technical solutions to solve the above problems that would arise if the existing technology is directly used.

[0005] In a first aspect of the present application, a method for automatically tracking and photographing a sunset is provided, comprising:

[0006] S1: Get the sunset detection frame in the real-time video frame;

[0007] S2: Adjust the shooting angle and move the center of the sunset detection frame to the center of the real-time image;

[0008] S3: Detecting an area of ​​a preset color in the upper left region of the first position as a first area; detecting an area of ​​the preset color in the upper right region of the first position as a second area;

[0009] S4: If the first area is larger than the second area and the first area is larger than a threshold, adjusting the shooting angle so that the second position moves to the first area; if the second area is larger than the first area and the second area is larger than the threshold, adjusting the shooting angle so that the second position moves to the second area;

[0010] S5: When the second position is located in the first area or the second area, save the current frame; wherein, the first position and the second position are designated positions on or inside the sunset detection frame; the first area is located below and to the left of the real-time picture, and the second area is located below and to the right of the real-time shooting picture.

[0011] Preferably, the preset color is any color except blue.

[0012] In one possible implementation, the step of obtaining a sunset detection frame in the current picture frame includes: obtaining all detection frames in the current picture frame based on a target detection algorithm; and retaining a detection frame with the highest confidence after filtering through a confidence threshold.

[0013] Preferably, if there is no detection frame whose confidence exceeds the threshold, the step S1 is repeatedly performed on subsequent video frames.

[0014] Preferably, the method further includes S41: if both the first area and the second area are smaller than a threshold, saving the current frame.

[0015] In a possible implementation, the first position is the center point of the lower boundary of the sunset detection frame, and the second position is the center point of the upper boundary of the sunset detection frame.

[0016] In a possible implementation, when adjusting the shooting angle of view, the rotation angle of the shooting angle of view is determined based on the position coordinates before and after the adjustment, the resolution of the shooting device, and the field of view angle.

[0017] In another possible implementation, when the automatic tracking shooting device is installed on an intelligent connected vehicle, the shooting angle is adjusted based on the yaw angle of the intelligent connected vehicle.

[0018] In the second aspect of the present application, an automatic tracking shooting device is provided, including a shooting module, an analysis module, a rotation module and a storage module. The shooting module is physically connected to the rotation module, and the rotation module is suitable for horizontal rotation and pitch rotation. The shooting module is suitable for continuously acquiring real-time video frames and sending the real-time video frames to the analysis module; the analysis module is suitable for executing the method of the first aspect of the present application to determine the movement trend of the shooting angle of view, generating a rotation instruction according to the movement trend, and sending the rotation instruction to the rotation module; the rotation module is suitable for changing the angle of the shooting module according to the rotation instruction; and the storage module is suitable for saving video frames at appropriate angles.

[0019] Preferably, the automatic tracking shooting device further includes a timing module, which is adapted to count the number of saved video frames and turn off the shooting module when the number exceeds a threshold.

[0020] In one possible implementation, an automatic tracking shooting device is installed on an intelligent connected vehicle and is communicatively connected to the intelligent connected vehicle; the intelligent connected vehicle pushes a yaw angle to the automatic tracking shooting device, an analysis module generates a second rotation instruction based on the yaw angle, and sends the second rotation instruction to a rotation module, and the rotation module is adapted to change the angle of the shooting module according to the second rotation instruction.

[0021] The third aspect of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the method of the first aspect of the present application when executing the computer program.

[0022] The fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method of the first aspect of the present application when executed by a processor.

[0023] In a fifth aspect of the present application, a computer program product is provided, which includes a computer program, and when the computer program is executed by a processor, the method of the first aspect of the present application is implemented.

[0024] The technical solution of the present application uses computer vision technology to identify the sunset, and automatically achieves photographic-level composition of the sunset by adjusting and controlling algorithms, thereby realizing a fully automatic sunset tracking and shooting solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 This is a flow chart of a method for automatically tracking and photographing a sunset based on an embodiment of the present application;

[0026] Figure 2 This is a schematic diagram of a method for dividing a real-time shooting screen based on an embodiment of the present application;

[0027] Figure 3 This is a flowchart of another method for automatically tracking and photographing a sunset based on an embodiment of the present application;

[0028] Figure 4 This is a logic diagram of a method for automatically tracking and photographing a sunset based on an embodiment of the present application;

[0029] Figure 5 is a block diagram of an automatic tracking shooting device according to an embodiment of the present application;

[0030] Figure 6 It is a structural diagram of a terminal device or server suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION

[0031] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0032] In the field of computer vision analysis, it is generally assumed that the origin of the coordinate system is located in the upper left corner of the screen. In the various embodiments of the present application, unless otherwise stated, the upper left corner is used as the origin of the coordinate system of the screen. Those skilled in the art should know that such a coordinate system setting is not absolutely fixed. When the origin of the coordinate system is set at any position inside or outside the screen, the corresponding technical solutions that can be obtained by simple adjustments to this solution without creative labor are all within the scope of protection of this application.

[0033] In this document, the term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0034] Figure 1 This is a flow chart of a method for automatically tracking and photographing a sunset based on an embodiment of the present application. Figure 1 As shown, the method includes:

[0035] S1: Obtain the sunset detection frame in the real-time video frame.

[0036] Specifically, the sunset in the real-time video frame is detected by the target detection algorithm to obtain a sunset detection frame. The specific choice of the target detection algorithm is not limited in this application, and some open source algorithms commonly used by those skilled in the art can be used for implementation, such as the YOLOv8 model, or CNN (convolutional neural network), ViT (Vision Transformer) and other recognition algorithms. In order to make the recognition results more accurate, a large number of annotated pictures can be used to train the algorithm model. In addition, algorithms such as YOLO-World that can recognize objects across open vocabularies in a real-time environment without prior training also perform relatively well in this solution. The training of algorithms and models is a common technical means that those skilled in the art should be aware of, and does not belong to the content that needs to be protected in this application, and will not be repeated here.

[0037] The object detection algorithm represents each detected object using four parameters: the horizontal and vertical coordinates (x, y) of the target bounding box's center point, the width (W) and height (H) of the target bounding box, and provides a confidence score for each target bounding box. The confidence score indicates the algorithm's probability that the detection is correct.

[0038] Preferably, the processing results of the target detection algorithm can be optimized to retain at most one target frame. Specifically, the optimization includes:

[0039] Based on the target detection algorithm, all detection frames in the current frame are obtained; the target frame with the highest confidence after filtering by the confidence threshold is retained.

[0040] Specifically, the confidence of all detection boxes is obtained; the detection box with the highest confidence is found, and its confidence is determined to be greater than a threshold. If so, the detection box is retained.

[0041] In common target detection algorithms, if the confidence level exceeds 50%, the algorithm is considered to have a high probability of identifying the target as the correct one. Therefore, the confidence threshold can be set to 50%. For scenarios with higher accuracy requirements or when applying target detection algorithms with a higher false positive rate, the confidence threshold can be increased.

[0042] Since there is always only one sunset in the real-time picture, the detection frame that is most likely to be the sunset is retained through confidence sorting and threshold screening.

[0043] If there is no target detection frame with a confidence score exceeding the threshold, it means that there may be no sunset in the real-time image. This may be due to three reasons:

[0044] 1. The time is wrong. Therefore, preferably, the automatic tracking shooting device 400 can be connected to the Internet and synchronized with the current time. If the current time is obviously not dusk, the shooting is turned off.

[0045] 2. The weather is wrong. If it is dusk, synchronize the current weather with the Internet. If it is cloudy, rainy, or otherwise dark, stop shooting.

[0046] 3. Wrong angle: If the time and weather conditions allow for the viewing of sunset, the rotation module 403 is controlled to rotate the video horizontally by a predetermined angle, for example, 45° clockwise or counterclockwise, and then step S1 is repeated for subsequent video frames.

[0047] S2: Adjust the shooting angle and move the center of the sunset detection frame to the center of the real-time image;

[0048] Move the center of the sunset detection frame to the center of the live image, so that the sunset is in the center of the live image.

[0049] S3: Detecting an area of ​​a preset color in the upper left region of the first position as a first area; detecting an area of ​​the preset color in the upper right region of the first position as a second area.

[0050] The preset colors are colors other than blue that may appear in the sky at sunset. Under normal circumstances, the sky is blue or the color of clouds close to white. When the sun sets, the sky may appear with sunset glow, purple halos, fiery clouds, blue-gray arcs, green flashes, and other celestial phenomena. The sky may also appear with various special colors such as red, purple, golden yellow, or green that contrast sharply with the sky color.

[0051] In one possible implementation, considering that sunset glow and volcanic clouds are the most common astronomical phenomena, the preset color can be set to red. Expressed in RGB format, the first and second areas are calculated by calculating the number of pixels in the corresponding area whose three color channels satisfy the values ​​of R:180-255, G:60-180, and B:0-160.

[0052] In another possible implementation, all abnormal astronomical phenomena are considered, excluding the blue sky, the white normal cloud, and the gradient between blue and white. Expressed in RGB format, the first area and the second area are calculated by calculating the number of pixels in the corresponding area whose three color channels do not fall within the following three ranges:

[0053] (1) White: R ≥ 230, G ≥ 230, and B ≥ 230;

[0054] (2) Blue: B>max(R,G)+30;

[0055] (3) Blue-white gradient: |R−G|≤20 and B>max(R,G)

[0056] This step detects the distribution of abnormal astronomical phenomena near the sun. Therefore, the first position can be set to any position on or within the sunset detection frame without affecting the implementation of this solution. Preferably, the first position can be set to a position on the sun's central axis to facilitate equilibrium determination and optimize the calculation steps. For example, the first position can be set to the center point, upper boundary center point, or lower boundary center point of the sunset detection frame.

[0057] S4: If the first area is larger than the second area and the first area is larger than a threshold, adjust the shooting angle so that the second position moves to the first area; if the second area is larger than the first area and the second area is larger than a threshold, adjust the shooting angle so that the second position moves to the second area.

[0058] The aforementioned unusual celestial phenomena and the setting sun together create beautiful photographic works. Therefore, in this solution, unusual celestial phenomena are detected by detecting the color of the sky. When an unusual celestial phenomenon is detected, the shooting angle is controlled to create a special composition, placing the setting sun in the lower third of the foreground, off-center.

[0059] When the first area is larger than the second area, it means that the area of ​​the abnormal astronomical phenomenon in the upper left corner of the sunset is larger than the area of ​​the abnormal astronomical phenomenon in the upper right corner. In this case, it is considered that the main abnormal astronomical phenomenon is located above the left side of the sunset. Therefore, the composition position of the sunset in the picture is moved to the lower right, that is, to the first area, so that the abnormal astronomical phenomenon occupies the main position in the picture. Similarly, when the first area is smaller than the second area, it means that the area of ​​the abnormal astronomical phenomenon in the upper right corner of the sunset is larger than the area of ​​the abnormal astronomical phenomenon in the upper left corner. In this case, it is considered that the main abnormal astronomical phenomenon is located above the right side of the sunset. Therefore, the composition position of the sunset in the picture is moved to the lower left, that is, to the second area, so that the abnormal astronomical phenomenon occupies the main position in the picture.

[0060] In one possible implementation, the threshold for the preset color area can be set to 1 / 16-1 / 8 of the total number of screen pixels. In practice, the threshold setting can comprehensively consider the image resolution, lighting conditions, and the significance of the abnormal astronomical phenomenon. If the threshold is too high, some valuable abnormal astronomical phenomena may be overlooked; if the threshold is too low, noise interference may lead to unnecessary viewing angle adjustments. Therefore, a preferred implementation is to dynamically adjust the threshold, for example, by adaptively calculating it based on the brightness distribution or color saturation of the real-time image.

[0061] Furthermore, in some cases, unusual celestial phenomena may be distributed across multiple areas, rather than confined to the upper left or upper right corner. For these situations, the detection range can be expanded, dividing the image into more sub-areas and counting the number of pixels meeting pre-defined criteria within each area. By comparing the size and distribution characteristics of each area, the primary concentration of unusual celestial phenomena can be determined. The shooting perspective can then be adjusted accordingly, resulting in a final composition that better captures the overall beauty of the sunset and celestial phenomena.

[0062] At the hardware level, the camera module can be equipped with a high dynamic range (HDR) camera to cope with the dramatic changes in light intensity during dusk. Furthermore, the precision of the rotation module 403 must meet specific requirements. For example, the minimum rotation angle of the stepper motor must be controlled within 0.1° to ensure precise viewing angle adjustment. These optimization measures not only enhance system robustness but also provide users with a more professional shooting experience.

[0063] This step moves the sun to a designated location within the captured image. Therefore, the second position can be set to any location on or within the sunset detection frame without affecting the implementation of this solution. Preferably, similar to the selection of the first position, the second position can also be set to a position on the sun's central axis to facilitate balance determination and optimize calculation steps. For example, the second position can be set to the center point, upper boundary center point, or lower boundary center point of the sunset detection frame. The second position can be consistent with the first position or not.

[0064] The first area is located at the lower right of the real-time image, and the second area is located at the lower left of the real-time shooting image, so as to achieve a normal sunset composition. Preferably, the positions of the first area and the second area can be set modularly. In a possible implementation, as Figure 2 As shown, the lens window is divided into three layers, namely, upper, middle and lower layers, with a total of 15 areas. The first area can be determined as Figure 2 The second area is determined as Figure 2 Area A in .

[0065] Preferably, the specific angle to be rotated is calculated and sent to the rotation module 403. The rotation module 403 rotates in sequence according to the horizontal and pitch angles until the rotation is completed. Since the moving direction of the target in the picture is opposite to the moving direction of the shooting angle (for example, when the target in the real-time picture needs to be moved to the right side of the picture, the shooting angle should be moved to the left), the positive and negative angles should be taken into account in the calculation. The calculation formula of the rotation angle is: 、

[0066] Among them, θ x and θ y is the rotation angle of the shooting angle in the horizontal and pitch directions, (x1, y1) is the position coordinate before adjustment, (x2, y2) is the position coordinate to be adjusted, W and H are the horizontal resolution and vertical resolution of the shooting device respectively; FOV x FOV y They are the horizontal and vertical field of view angles of the shooting device respectively.

[0067] S5: When the second position is located in the first area or the second area, save the current frame.

[0068] Specifically, when the second position is located in the first area or the second area, the current composition is considered to be successful. The current frame is saved. At this time, the current frame is a photographic image with the setting sun located in the lower third of the picture and the abnormal astronomical phenomenon located in the main position of the picture.

[0069] Figure 3 FIG. 1 shows a flow chart of another method for automatically tracking and photographing the sunset based on an embodiment of the present application. Figure 3 As shown, the method further includes S41: if both the first area and the second area are smaller than a threshold, saving the current frame.

[0070] If both the first area and the second area are smaller than the threshold, in one embodiment of the present application, no operation may be performed, and the process returns to the initial step and restarts S1 for the next frame; preferably, the current frame may also be saved. In this case, the current frame is a standard center-composed photographic picture with the sunset at the center of the picture.

[0071] In another embodiment of the present application, after step S2, that is, when the center of the sunset detection frame moves to the center of the real-time picture, the current frame can be saved, that is, a standard center-composed photographic picture with the sunset in the center of the picture is saved.

[0072] Figure 4 FIG. 1 is a logic diagram of a method for automatically tracking and photographing a sunset according to an embodiment of the present application. Figure 4 As shown:

[0073] First, the video frame is read and an attempt is made to obtain a unique sunset detection frame. If this fails, the process returns to read the next video frame to be detected. If this succeeds, the center of the detection frame is adjusted to the center of the live image. This step is achieved by controlling the rotation module 403 to rotate, thereby rotating the shooting angle.

[0074] After the center of the detection frame is located at the center of the real-time image, calculate the first area, the second area, and their quantitative relationship with the threshold:

[0075] If both the first area and the second area are smaller than the threshold, the current frame is saved directly;

[0076] If the first area is larger than the second area, and the first area is larger than a threshold, adjusting the shooting angle so that the second position moves to the first area, and saving the current frame after the movement is completed;

[0077] If the second area is larger than the first area and the second area is larger than the threshold, the shooting angle is adjusted so that the second position is moved to the second area, and the current frame is saved after the movement is completed.

[0078] Figure 5 FIG is a block diagram of an automatic tracking shooting device 400 according to an embodiment of the present application. Figure 5 As shown, the automatic tracking shooting device 400 includes a shooting module 401, an analysis module 402, a rotation module 403, and a storage module 404. The automatic tracking shooting device 400 is used to implement the aforementioned automatic shooting and tracking method.

[0079] Optionally, the automatic tracking shooting device 400 can be a standalone device, a component included in a standalone device, or a combination of multiple different standalone devices. In one possible implementation, the shooting module 401 is implemented as an independent smart terminal or camera, the analysis module 402 is implemented as another independent smart terminal or smart hardware, and the rotation module 403 is implemented as a pan-tilt head or a rotatable bracket. In another possible implementation, the shooting module 401 is implemented as a camera module in a smart terminal, the analysis module 402 is implemented as a computing module in the same smart terminal, and the rotation module 403 is implemented as an intelligent pan-tilt head or a rotatable bracket. In yet another possible implementation, the shooting module 401 is implemented as a camera module in an integrated smart camera device, the analysis module 402 is implemented as a computing module in the same integrated smart camera device, and the rotation module 403 is implemented as a motion mechanism in the same integrated smart camera device. The storage module 404 can be implemented as a fixed storage device, such as a hard disk, or a mobile storage device, such as an SD card or USB flash drive.

[0080] Among them, the shooting module 401 is physically connected to the rotation module 403, and the physical connection can be a fixed connection or a detachable connection. All connection methods that can ensure that the rotation module 403 can directly or indirectly affect the movement of the shooting module 401 by physical means are within the protection scope of this application. The shooting module 401 is suitable for continuously acquiring real-time shooting images and sending the real-time shooting images to the analysis module 402. Optionally, the shooting module 401 may not have the active information sending function, but the analysis module 402 actively acquires the real-time shooting images from the shooting module 401. The analysis module 402 is suitable for executing the method in the embodiment of the present application based on the real-time shooting images, calculating the tracking point position in real time, and generating a rotation instruction based on the tracking point position, and sending it to the rotation module 403. The rotation module 403 is suitable for horizontal rotation, that is, rotation around the vertical axis (z-axis), and is suitable for changing the angle of the shooting module 401 according to the rotation instruction.

[0081] Furthermore, considering that prolonged exposure of photographic equipment to the sun may damage the sensor or lens assembly, in one possible embodiment, a timing module may be incorporated into the automatic tracking shooting device 400. The timing module counts successfully captured photos (i.e., successfully saved video frames) or records the power-on time. When the number of successfully captured photos exceeds a user-set threshold or the power-on time exceeds a user-set time threshold, the camera is automatically shut down and a downward pitch command is sent to the rotation module to move the camera lens out of the direct sunlight.

[0082] The automatic tracking camera device 400 can be fixedly installed horizontally in any outdoor location. In one possible embodiment, the automatic tracking camera device 400 is installed horizontally on a smart connected car and is connected to the smart connected car in communication. When the automatic tracking camera device 400 is installed on a smart connected car, considering that the movement of the car will have a significant impact on the shooting angle of view, the calculation of the rotation angle of the shooting angle of view should also be based on the car's movement data. The car movement data that can be obtained in real time in a smart connected car mainly includes speed and yaw angle; because the car speed is much lower than the linear speed of the earth's rotation, the interference of the vehicle's own displacement on the sun's angle of view is almost imperceptible. Therefore, the movement data only considers the car's yaw angle. Currently, mainstream smart connected cars all support the calculation and output of real-time yaw angles.

[0083] Specifically, when the intelligent connected vehicle detects a complete steering wheel turn (i.e., the driver rotates and resets the steering wheel), it sends the final yaw angle of that turn to analysis module 402. Analysis module 402 generates a rotation command based on the yaw angle data, instructing rotation module 403 to rotate the vehicle in the opposite direction by the corresponding angle. For example, if the vehicle's yaw angle is 15° to the left (i.e., 15° counterclockwise), rotation module 403 is instructed to rotate the vehicle 15° clockwise.

[0084] Figure 6 A schematic diagram of the structure of a terminal device or server suitable for implementing an embodiment of the present application is shown.

[0085] like Figure 6 As shown, the terminal device or server includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 into the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the terminal device or server are also stored. The CPU 501, ROM 502 and RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0086] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output section 507 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 508 including a hard disk; and a communication section 509 including a network interface card such as a LAN card or a modem. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 510 as needed, so that computer programs read therefrom can be installed into the storage section 508 as needed.

[0087] In particular, according to an embodiment of the present application, the above method flow steps can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a machine-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present application are executed.

[0088] It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.

[0089] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of the code, and the aforementioned module, program segment or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.

[0090] The units or modules described in the embodiments of the present application may be implemented in software or hardware. The units or modules described may also be provided in a processor. The names of these units or modules do not, in certain circumstances, limit the units or modules themselves.

[0091] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments, or may exist independently and not be incorporated into the electronic device. The computer-readable storage medium stores one or more programs, which, when used by one or more processors, execute the methods described in the present application.

[0092] As another aspect, an embodiment of the present application further provides a computer program product, which implements any of the above-mentioned embodiment methods when the computer program / instructions are executed by a processor.

[0093] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of application involved in this application is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the aforementioned application concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this application.

Claims

1. A method for automatically tracking and photographing a sunset, characterized in that: include: S1: Get the sunset detection frame in the real-time video frame; S2: Adjust the shooting angle and move the center of the sunset detection frame to the center of the real-time image; S3: Detecting an area of ​​a preset color in the upper left region of the first position as a first area; detecting an area of ​​the preset color in the upper right region of the first position as a second area; S4: If the first area is larger than the second area and the first area is larger than a threshold, adjusting the shooting angle so that the second position moves to the first area; if the second area is larger than the first area and the second area is larger than the threshold, adjusting the shooting angle so that the second position moves to the second area; S5: When the second position is located in the first area or the second area, save the current frame; The first position and the second position are designated positions on or inside the sunset detection frame; the first area is located at the lower right side of the real-time image, and the second area is located at the lower left side of the real-time shooting image.

2. The method according to claim 1, wherein The preset color is red.

3. The method according to claim 1, wherein The step of obtaining a sunset detection frame in the current picture frame includes: Based on the target detection algorithm, obtain all detection frames in the current frame; The detection box with the highest confidence after filtering by the confidence threshold is retained.

4. The method according to claim 3, wherein If there is no detection frame whose confidence exceeds the threshold, the step S1 is repeated for subsequent video frames.

5. The method according to claim 1, wherein Also includes: S41: If both the first area and the second area are smaller than a threshold, save the current frame.

6. The method according to claim 1, wherein The first position is the center point of the lower boundary of the sunset detection frame, and the second position is the center point of the upper boundary of the sunset detection frame.

7. The method according to any one of claims 1 to 5, wherein When adjusting the shooting angle of view, the rotation angle of the shooting angle of view is determined based on the position coordinates before and after the adjustment, the resolution of the shooting device, and the field of view angle.

8. An automatic tracking shooting device, characterized in that: The apparatus comprises a shooting module, an analysis module, a rotation module, and a storage module, wherein the shooting module is physically connected to the rotation module, the rotation module is adapted to rotate horizontally and tilting, the shooting module is adapted to continuously acquire real-time video frames and send the real-time video frames to the analysis module; the analysis module is adapted to execute the method of any one of claims 1 to 7 to determine a movement trend of a shooting angle of view, generate a rotation instruction based on the movement trend, and send the rotation instruction to the rotation module; The rotation module is adapted to change the angle of the camera module according to the rotation instruction; The storage module is suitable for storing video frames at a suitable angle.

9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is 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 method according to any one of claims 1 to 7 is implemented.