Photographing method and electronic equipment

By detecting and identifying the scan marks in the preview image, and automatically adjusting the shutter parameters to obtain images without scan marks, the scan mark problems caused by flickering devices in the shooting scene are solved, and a better photography effect is achieved.

CN120075598APending Publication Date: 2025-05-30HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311628562.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-29
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

When there is a flashing device in the shooting scene, the video or pictures captured by the electronic device are prone to scan marks (flashing stripes), and the prior art is difficult to effectively avoid this problem.

Method used

By detecting and identifying the scan marks in the preview image, the shutter parameters are automatically adjusted to obtain images without scan marks. The specific method includes receiving the operation of the user opening the camera, obtaining the first preview image, determining whether there is a scan mark, and if so, reducing the shutter parameters in turn until there is no scan mark.

Benefits of technology

It realizes that images without scanning patterns are captured in scenes where the flashing device exists, improving the photography effect and avoiding interference from scanning patterns.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075598A_ABST
    Figure CN120075598A_ABST
Patent Text Reader

Abstract

The invention provides a photographing method and electronic equipment, the electronic equipment comprises a camera, after the electronic equipment receives an opening operation of a user on the camera, a first preview image is acquired by using a first shutter parameter, whether a scanning stripe exists in the first preview image is determined, and when the scanning stripe exists in the preview image, the first preview image is photographed. The electronic equipment can automatically adjust the first shutter parameter to obtain a second preview image without scanning lines, the shutter parameter corresponding to the second preview image is the second shutter parameter, and after the electronic equipment receives photographing operation of a user, the electronic equipment obtains a target image through the second shutter parameter. Because the second preview image corresponding to the second shutter parameter does not have the scanning fringe, the target image obtained based on the second shutter parameter does not have the scanning fringe. According to the method, the problem that scanning stripes exist in the shot image when a flicker device exists in a shooting scene in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image technology, and more specifically, to a photographing method and an electronic device. Background Art

[0002] With the continuous development of photographing technology and the wide use of electronic devices, the photographing function of electronic devices is increasingly favored by people. When we use a mobile phone or a camera to take pictures or shoot videos, if there is a flashing device in the shooting scene, scanning lines (also called flashing stripes) will appear in the captured video or picture. This is mainly because the flashing frequency of the flashing device and the shutter parameters of the mobile phone or camera are not in a divisible relationship.

[0003] In Related Art One, without knowing the flashing frequency, the user manually adjusts the shutter parameters of the mobile phone or camera to be the same as the flashing frequency of the flashing device by a blind adjustment method, or adjusts the shutter parameters by a blind adjustment method so that the shutter parameters can divide the flashing frequency of the flashing device. However, the flashing frequency of the flashing device will change, so the manually set shutter parameters will become invalid, and flashing stripes will still appear after the flashing frequency changes.

[0004] In Related Art Two, the mobile phone or camera can also detect the width of the flashing stripes and then calculate the flashing frequency for shutter parameter setting. However, the forms of the flashing stripes are diverse, resulting in the calculation of the flashing frequency by detecting the width of the flashing stripes through an algorithm being not robust, and flashing stripes will still appear.

[0005] Therefore, if there is a flashing device in the shooting scene, avoiding scanning lines in the captured pictures or videos is a problem that needs to be solved currently. Summary of the Invention

[0006] This application provides a photographing method and an electronic device. The method automatically adjusts the shutter parameters by detecting and identifying the scanning lines in the preview image, so that the electronic device can capture an image without scanning lines using the adjusted shutter parameters.

[0007] In a first aspect, this application provides a photographing method. The method provided in the first aspect can be executed by an electronic device, which includes a camera, or can be executed by a module (such as a processor, a chip, or a chip system, etc.) applied in the electronic device, or can also be implemented by a logical node, a logical module, or software that can implement all or part of the functions of the electronic device. This application makes no limitation on this.

[0008] Specifically, the method includes: The electronic device receives a user's operation to turn on the camera. In response to this operation, it obtains a first preview image using a first shutter parameter, determines whether there are scanning lines in the first preview image. When there are scanning lines in the first preview image, it adjusts the first shutter parameter to obtain a second preview image without scanning lines. Herein, the shutter parameter corresponding to the second preview image is the second shutter parameter. It receives the user's photographing operation and obtains a target image using the second shutter parameter.

[0009] For the method provided in the first aspect, after the electronic device captures the first preview image, it can identify the scanning lines in the first preview image. When there are scanning lines in the first preview image, the electronic device can automatically adjust the shutter parameter (the first shutter parameter) so that the electronic device can capture an image without scanning lines using the adjusted shutter parameter (the second shutter parameter) in a scenario where a flashing device exists. Thus, it solves the problem that there are scanning lines in the captured image in the related art in a scenario where a flashing device exists, and further improves the photographing effect.

[0010] In a possible implementation manner of the first aspect, the second shutter parameter is less than the first shutter parameter. In this implementation manner, by reducing the value of the first shutter parameter, a second preview image without scanning lines can be quickly obtained.

[0011] In a possible implementation manner of the first aspect, starting from the first shutter parameter, the shutter parameter of the camera is sequentially reduced from a preset shutter parameter list until a second preview image without scanning lines is obtained. In this implementation manner, the electronic device can preset a shutter parameter list. When there are scanning lines in the first preview image obtained using the first shutter parameter, the electronic device, based on this preset shutter parameter list, starts from the first shutter parameter and sequentially reduces the shutter parameter of the camera, and then automatically captures a preview image until a second preview image without scanning lines is obtained. That is, based on this preset shutter parameter list, the electronic device can quickly obtain a second preview image without scanning lines.

[0012] In a possible implementation manner of the first aspect, the method further includes: determining the flashing frequency of the flashing device based on the second shutter parameter.

[0013] Optionally, determining the flashing frequency of the flashing device based on the second shutter parameter further includes: calculating the flashing frequency of the flashing device using the second shutter parameter and the shutter parameter without scanning lines.

[0014] Among them, the shutter parameter without scanning lines can be adjusted upward based on the value of the second shutter parameter until a preview image without scanning lines is obtained, or it can be adjusted downward based on the value of the second shutter parameter until a preview image without scanning lines is obtained. Finally, the flicker frequency of the flicker device is calculated using the second shutter parameter and the shutter parameter without scanning lines.

[0015] Furthermore, the electronic device can display the flicker frequency of the flicker device on the display screen, and the user can read the flicker frequency of the flicker device.

[0016] In a possible implementation manner of the first aspect, the first shutter parameter is any one of 1 / 100S, 1 / 90S, 1 / 72S, 1 / 60S, 1 / 50S, 1 / 40S, 1 / 30S.

[0017] In a possible implementation manner of the first aspect, the second shutter parameter is any one of 1 / 100S, 1 / 90S, 1 / 72S, 1 / 60S, 1 / 50S, 1 / 40S, 1 / 30S.

[0018] In a second aspect, the present application also provides a photographing method. The method provided in the second aspect can be executed by an electronic device including a camera, or can be executed by a module (such as a processor, a chip, or a chip system, etc.) applied to the electronic device, or can also be implemented by a logic node, a logic module, or software that can implement all or part of the functions of the electronic device. The present application does not make any limitations in this regard.

[0019] Specifically, the method includes: receiving an open operation of the user on the camera; in response to the open operation, establishing a connection with at least one flicker device to obtain the flicker frequency of at least one flicker device; determining a first shutter parameter based on the flicker frequency of at least one flicker device, where the first shutter parameter can divide the flicker frequency of each flicker device in at least one flicker device; receiving a first operation of the user on the first control; and in response to the first operation, taking a first target image using the first shutter parameter.

[0020] For the method provided in the second aspect, the electronic device can establish a communication connection with multiple flicker devices, and obtain the flicker frequency from each flicker device in the shooting scene, so as to determine the first shutter parameter based on the flicker frequency of each flicker device. The target image taken using this first shutter parameter is without scanning lines, thus solving the problem that scanning lines appear in the captured picture or video when there is a flicker device in the shooting scene in the related art, and further improving the effect of taking pictures or videos.

[0021] It should be understood that in some other implementations of the present application, the electronic device may not establish a communication connection with multiple flashing devices, and the electronic device may obtain the target flashing frequency of the flashing device based on NFC. The target flashing frequency may be the flashing frequency of the flashing device or the greatest common divisor of multiple flashing devices.

[0022] Specifically, the electronic device can automatically identify the card information of the flashing device in the shooting scene through NFC, and then read the label information on the card to obtain the target flashing frequency of the flashing device.

[0023] In a second aspect, in a possible implementation, the method further includes: when the flashing frequency of the first flashing device in at least one flashing device changes, receiving the flashing frequency of the first flashing device; determining a second shutter parameter based on the flashing frequencies of at least one flashing device, where the second shutter parameter can divide the flashing frequencies of at least one flashing device, and the flashing frequencies of at least one flashing device include the flashing frequency of the first flashing device; receiving a photographing operation of the user, and in response to the photographing operation, the electronic device obtains a second target image using the second shutter parameter. In this implementation, when the flashing frequency of a flashing device in the shooting scene changes, the electronic device can obtain the changed flashing frequency in real time, that is, the flashing frequencies of at least one flashing device include the unchanged flashing frequency and the changed flashing frequency, so as to recalculate the shutter parameter based on the changed flashing frequency and the unchanged flashing frequency, preventing the problem of scanning lines from occurring due to the change of the flashing frequency of the flashing device during the photographing process by the electronic device.

[0024] In a third aspect, the present application further provides a photographing method. The method provided in the third aspect can be executed by an electronic device including a camera, or can be executed by a module (such as a processor, a chip, or a chip system, etc.) applied to the electronic device, and can also be implemented by a logical node, a logical module, or software that can implement all or part of the functions of the electronic device. The present application does not make any limitations in this regard.

[0025] Specifically, the method includes: receiving an opening operation of the user on the second control; in response to the opening operation of the user on the second control, displaying first indication information for prompting the user to bring the camera close to the flashing device; obtaining at least one preview image of the flashing device, and determining the flashing frequency of the flashing device based on at least one flashing stripe in the at least one preview image. Determining a first shutter parameter according to the flashing frequency of the flashing device; receiving a photographing operation of the user; and in response to the photographing operation, obtaining a target image based on the first shutter parameter.

[0026] The method provided by the third aspect is that in response to the user's operation of opening the second control, the electronic device can display first indication information to prompt the user to bring the camera close to the flashing device, ensuring that the overall picture color in the preview interface of the electronic device tends to be consistent, so that the form of the flashing stripes obtained is single and stable. Then, at least one preview image of the flashing device is obtained, and at least one of the at least one preview image has at least one flashing stripe. Based on the at least one flashing stripe, the flashing frequency of the flashing device can be calculated. The first shutter parameter of the electronic device is obtained by using the calculated flashing frequency, and there are no flashing stripes in the target image captured by using the first shutter parameter.

[0027] In a possible implementation manner of the third aspect, the electronic device can determine the flashing frequency of the flashing device based on the interval between two adjacent flashing stripes in the first preview image of the at least one preview image. The first preview image can be a preview image of a flashing device, or the first preview image is an image generated according to at least two preview images of the flashing device. In this implementation manner, the electronic device uses the interval between two adjacent flashing stripes to determine the flashing frequency of the flashing device, and can accurately calculate the flashing frequency even when the form of the flashing stripes changes.

[0028] In a possible implementation manner of the third aspect, when the number of flashing stripes in the first image of the flashing device is less than or equal to 1, a second image of the flashing device is obtained; the splicing position of the second image is determined; the first image and the second image are spliced based on the splicing position of the second image to obtain the first preview image of the flashing device.

[0029] In this implementation manner, when there are no flashing stripes or only one flashing stripe in the first image obtained by the electronic device, the electronic device can continue to obtain the second image, and splice the first image and the second image to obtain the first preview image with at least two flashing stripes. By using this method, at least two flashing stripes can be quickly obtained, so as to calculate the flashing frequency based on the interval between two adjacent flashing stripes.

[0030] It should also be noted that the first preview image after splicing the first image and the second image includes at least multiple flashing stripes, and the flashing frequency is calculated by using the interval between two adjacent flashing stripes among the multiple flashing stripes.

[0031] In a possible implementation manner of the third aspect, when the number of flashing stripes in the first image of the flashing device is less than or equal to 1, the shutter parameter when shooting the flashing device is adjusted to obtain the second image of the flashing device, and the second image is the first preview image, and the second image includes at least two flashing stripes. In this implementation manner, multiple flashing stripes can be obtained by adjusting the shutter parameter when shooting the flashing device.

[0032] Optionally, the adjustment method may be: adjusting the shutter parameter when photographing the flashing device to twice the shutter parameter when obtaining the first image until multiple flashing stripes appear in the obtained second image.

[0033] In a possible implementation of the third aspect, determining the flashing stripes in the first image includes: calculating the variance between each row of the first frame image in the first image and the first row to determine a variance statistical graph, and the number of mutations in the variance statistical graph represents the flashing stripes in the first image. The first frame image is any frame in the first image. In this implementation, the number of flashing stripes in the first image can be quickly determined using the variance statistical graph.

[0034] In a possible implementation of the third aspect, determining the flashing frequency of the flashing device using the interval between two adjacent flashing stripes includes: determining the flashing frequency of the flashing device using the interval between two adjacent flashing stripes and the refresh time for generating each row of the image.

[0035] Optionally, the flashing frequency of the flashing device is equal to 1 / (the refresh time for generating each row of the image × the height of the two flashing stripes). In this implementation, the flashing frequency of the flashing device can be conveniently and accurately calculated using this formula.

[0036] In the fourth aspect, a communication device is provided. The communication device includes units for performing each step in the above first aspect or any possible implementation of the first aspect, or units for performing each step in the above second aspect or any possible implementation of the second aspect, or units for performing each step in the above third aspect or any possible implementation of the third aspect.

[0037] In the fifth aspect, a communication device is provided. The communication device includes at least one processor and a memory. The processor and the memory are coupled. The memory stores program instructions. When the program instructions stored in the memory are executed by the processor, the methods in the above first aspect or any possible implementation of the first aspect are executed, or the methods in the above second aspect or any possible implementation of the second aspect are executed, or the methods in the above third aspect or any possible implementation of the third aspect are executed.

[0038] In the sixth aspect, a communication device is provided. The communication device includes at least one processor and an interface circuit. The at least one processor is used to execute the methods in the above first aspect or any possible implementation of the first aspect, or the methods in the above second aspect or any possible implementation of the second aspect, or the methods in the above third aspect or any possible implementation of the third aspect.

[0039] In a seventh aspect, an electronic device is provided, which includes a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the electronic device executes the method in the first aspect above or any possible implementation manner of the first aspect, or executes the method in the second aspect above or any possible implementation manner of the second aspect, or executes the method in the third aspect above or any possible implementation manner of the third aspect.

[0040] In an eighth aspect, a computer program product is provided, which includes a computer program. When the computer program is executed by a processor, it is used to execute the method in the first aspect above or any possible implementation manner of the first aspect, or execute the method in the second aspect above or any possible implementation manner of the second aspect, or execute the method in the third aspect above or any possible implementation manner of the third aspect.

[0041] In a ninth aspect, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed, it is used to execute the method in the first aspect above or any possible implementation manner of the first aspect, or execute the method in the second aspect above or any possible implementation manner of the second aspect, or execute the method in the third aspect above or any possible implementation manner of the third aspect.

[0042] In a tenth aspect, a chip is provided, which includes: a processor, used to call and run a computer program from a memory, so that a communication device installed with the chip executes the method in the first aspect above or any possible implementation manner of the first aspect, or executes the method in the second aspect above or any possible implementation manner of the second aspect, or executes the method in the third aspect above or any possible implementation manner of the third aspect. Description of the Drawings

[0043] Figure 1 A schematic diagram of a scene with a flashing device in a shooting scene is shown;

[0044] Figure 2 A schematic diagram of the structure of the electronic device 100 provided in this application is shown;

[0045] Figure 3 A schematic diagram of the software system of the electronic device 100 according to an embodiment of this application is shown;

[0046] Figure 4 A schematic diagram of a scene applicable to an embodiment of this application is shown;

[0047] Figure 5 Shows another schematic diagram of the applicable scenario of the embodiments of the present application;

[0048] Figure 6 Shows a schematic flowchart of the photographing method 600 provided by the embodiments of the present application;

[0049] Figure 7 Shows a schematic diagram of another example of the photographing method provided by the embodiments of the present application;

[0050] Figure 8 Shows a schematic diagram of the system architecture applicable to the embodiments of the present application;

[0051] Figure 9 Shows a schematic flowchart of the photographing method 900 provided by the embodiments of the present application;

[0052] Figure 10 Shows a schematic flowchart of the photographing method 1000 provided by the embodiments of the present application;

[0053] Figure 11 Shows a schematic diagram of another example of the photographing method provided by the embodiments of the present application;

[0054] Figure 12 Shows a schematic flowchart of the photographing method 1200 provided by the embodiments of the present application;

[0055] Figure 13 Shows a single stripe splicing flowchart provided by the embodiments of the present application;

[0056] Figure 14 Shows a schematic diagram of another example of the photographing method provided by the embodiments of the present application;

[0057] Figure 15 Shows a schematic flowchart of the photographing method 1500 provided by the embodiments of the present application;

[0058] Figure 16 Shows a schematic diagram of another example of the photographing method provided by the embodiments of the present application;

[0059] Figure 17 Shows a schematic diagram of the structure of an electronic device provided by the present application. Detailed implementation manners

[0060] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application.

[0061] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and the appended claims of the present application, the singular forms "a", "an", "the above", "the", and "this" are also intended to include expressions such as "one or more", unless the context clearly indicates otherwise. It should also be understood that in the embodiments of the present application, "one or more" means one or more than two (including two); "and / or" describes the association relationship of associated objects and indicates that three relationships can exist; for example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0062] Reference to "one embodiment" or "some embodiments" described in this specification means that a particular feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in another way.

[0063] The multiple referred to in the embodiments of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, terms such as "first" and "second" are only used for the purpose of distinguishing descriptions and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0064] Currently, when a user uses a mobile phone or a camera to take pictures or shoot videos, if there is a flashing device in the shooting scene, scanning lines will appear in the taken pictures or videos. Such scanning lines can be referred to as banding shadows or flashing stripes. The reason for the generation of scanning lines is the non-integer division relationship between the flashing frequency of the flashing device and the sampling frequency of the shutter of the mobile phone or camera. For example, when the flashing frequency of the flashing device is 1 / 100 second, if the sampling frequency of the shutter (shutter speed) is N / 100 second, that is, the shutter rate is an integer multiple of the flashing frequency, the cumulative value of the light flux of the illumination incident on each row of pixels is equal, so that even if there is illumination whose brightness changes periodically due to the flashing frequency, no scanning lines will be generated. However, if the shutter rate is not an integer multiple of the flashing frequency, the light fluxes of the fluorescent illumination incident on each row of pixels are different, and scanning lines will appear.

[0065] It should be understood that the above shooting scenarios may refer to scenarios where LED displays, LED lights, or other light-emitting devices are installed. For example, the shooting scenarios can be inside a vehicle, in a meeting room, on a bus, in a subway, etc. The flashing devices in the shooting scenarios include in-vehicle head units, LED displays, LED lights, or other light-emitting devices in meeting rooms, on buses, or in subways.

[0066] Exemplarily, Figure 1 A schematic diagram of a scenario with a flashing device in a shooting scenario is shown. As Figure 1 shown, an LED display is installed on the bus, and the LED display is a flashing device. When a user takes a picture of the LED display in this scenario using a mobile phone, vertical flashing stripes 101 are shown in the picture, which is caused by the non-integer relationship between the flashing frequency of the LED display and the sampling frequency of the mobile phone shutter.

[0067] In a related art example, when there is a flashing device in the shooting scenario, in order to avoid scan lines in the captured picture or video, after a shooting device such as a mobile phone or a camera obtains the flashing frequency of the flashing device, the shutter parameter of the shooting device such as the mobile phone or the camera can be adjusted to be divisible by the flashing frequency of the flashing device. Exemplarily, when the flashing device is an LED light and the shooting device is a camera, after the camera obtains the flashing frequency of the LED light, the shutter parameter of the camera can be manually adjusted to 1 / 160, 1 / 80, or 1 / 40, etc. In this case, although there is an LED light in the shooting scenario, no scan lines will appear in the picture or video captured by the camera.

[0068] However, in this implementation, the flashing device has a situation where its flashing frequency changes. The mobile phone or the camera cannot obtain the changed flashing frequency in time, and the manually set shutter parameter will become invalid. When the flashing frequency changes, flashing stripes will still appear.

[0069] In another related art example, when there is a flashing device in the shooting scenario, in order to avoid scan lines in the captured picture or video, a shooting device such as a mobile phone or a camera can detect the flashing stripes of the flashing device, then use an algorithm to calculate the flashing frequency of the flashing device based on the width of the flashing stripes, and then automatically adjust the shutter parameter of the shooting device so that the adjusted shutter parameter is divisible by the flashing frequency of the flashing device.

[0070] However, in this implementation, since there are various types of flashing devices, some flashing stripes are caused by the flashing of LED lights, and some flashing stripes are caused by a certain screen display device in the picture. Under natural shooting conditions, the forms of the flashing stripes will be diverse. For example, horizontal stripes, vertical stripes, or flashing stripes that appear in the middle area of the display screen. Therefore, when a mobile phone or a camera calculates the flashing frequency of the flashing device based on the detected flashing stripes using an algorithm according to the width of the flashing stripes, it will cause a non-robust problem. Moreover, when the flashing frequency of the flashing device changes, the shutter parameters calculated by the algorithm will also become invalid. After the flashing frequency changes, there will still be a situation of flashing stripes.

[0071] In summary, how to effectively avoid having flashing stripes in the captured pictures or videos when there are flashing devices in the shooting scene is an issue that needs attention currently.

[0072] In view of this, the present application provides a photographing method, which includes: after the user activates the detection refresh rate function, a prompt to approach the flashing device is displayed on the detection refresh rate function interface of the electronic device. Based on this prompt, the user can bring the photographing device closer to the flashing device so that the photographing device and the flashing device meet a preset distance. Then, the electronic device calculates the interval width of the scanning stripes using the image of the flashing device captured, and finally calculates the flashing frequency of the flashing device based on the interval width of the scanning stripes. By using this method to obtain the flashing frequency, the shutter parameters of the electronic device can effectively eliminate the scanning stripes when shooting the target image.

[0073] Before introducing the photographing method for eliminating scanning stripes provided by the present application, the electronic device provided by the present application will be specifically described first. An embodiment of the present application provides an electronic device, which is used to execute the photographing method provided by the present application. For example, the electronic device in the embodiment of the present application can be a camera, a personal computer, various portable notebooks, various tablet computers, and mobile phones, vehicle-mounted devices, etc. with a photographing function. Optionally, the electronic device can also be a personal digital assistant (PDA), a handheld device with a large display screen, a computing device, a vehicle-mounted device, a wearable device, an electronic device in a 5G network, or an electronic device in an evolved public land mobile network (PLMN), etc. The embodiment of the present application does not limit this.

[0074] Exemplarily, Figure 2FIG. 0 shows a schematic diagram of the structure of an electronic device 100 provided in this application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0075] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0076] In an embodiment of this application, the processor 110 may receive an instruction from the user to turn on the camera. For example, after the electronic device responds to the user's operation of starting the camera, it uses a preset first shutter parameter to obtain a preview picture and determines whether there are scanning lines in the preview picture. When there are scanning lines in the preview picture, the shutter parameter is sequentially decreased to obtain a preview picture again, and it is determined whether there are scanning lines in the preview picture until an image without scanning lines is output.

[0077] For another example, after receiving an instruction from the user to turn on the camera, the processor 110 establishes a connection with multiple flashing devices in response to the instruction and the shooting scene, and obtains the flashing frequencies of the multiple flashing devices, thereby calculating the shutter parameters, and using the shutter parameters to obtain an image without scanning lines.

[0078] For another example, after receiving an instruction from the user to turn on the camera, the processor 110 takes a preview image using a plurality of preset shutter parameters in response to the instruction, and calculates the flashing frequency of the flashing device based on the preview image without scanning lines among the plurality of preview images.

[0079] For another example, after receiving an instruction from the user to turn on the camera, the processor 110 prompts the user to bring the electronic device close to the flashing device in response to the instruction, then calculates the width of the scanning lines using the image of the flashing device captured, and finally determines the flashing frequency of the flashing device using the interval width of the scanning lines.

[0080] Among them, the controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.

[0081] A memory can also be set in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0082] Among them, the memory is used to store the application program code for implementing the solution of the present application, and is controlled by the processor 110 to execute. The processor 110 is used to execute the application program code stored in the memory to control the electronic device 100 to implement the photographing method provided in the embodiments of the present application.

[0083] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0084] It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present application are only illustrative descriptions and do not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0085] The charging management module 140 is used to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 may receive the charging input from the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 may also supply power to the electronic device through the power management module 141.

[0086] The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.

[0087] The electronic device 100 implements the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0088] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0089] In the embodiments of the present application, the display screen 194 can be used to display images without scanning lines.

[0090] The electronic device 100 can implement the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.

[0091] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.

[0092] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, the image playback function, etc.). The data storage area can store the data created during the use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0093] The electronic device 100 can implement audio functions through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor, etc. For example, music playback, recording, etc.

[0094] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also known as the "touch control screen". The touch sensor 180K is used to detect touch operations acting thereon or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a different position from the display screen 194.

[0095] For example, in the embodiments of the present application, the operation of the user to open the camera can be obtained through the touch sensor 180K. After the processor 110 receives the operation of the user to open the camera, it executes the photographing method provided by the present application in response to this operation.

[0096] The keys 190 include a power-on key, volume keys, etc. The motor 191 can generate a vibration prompt. The indicator 192 can be an indicator light, which can be used to indicate the charging state, power change, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card.

[0097] The hardware system of the electronic device 100 has been described in detail above. Next, the software system of the electronic device will be introduced.

[0098] Figure 3 The schematic diagram of the software system of the electronic device 100 in the embodiments of the present application is shown. As Figure 3 shown, the system architecture may include an application layer (application, APP) 210, an application framework layer 220, a hardware abstraction layer (hardware abstract layer, HAL) 230, a driver layer 240, and a hardware layer 250.

[0099] The application layer 210 may include a camera application or other application programs. Other application programs include, but are not limited to: applications such as cameras, galleries.

[0100] The application layer 210 is at the top of the entire framework and is responsible for directly interacting with users. Once it receives a user's direct or indirect requirement, such as taking a photo, it will send the requirement to the application framework layer 220 through an interface and wait for the application framework layer 220 to return the processing result. The result includes image data, camera parameters, etc.; then the application layer 210 will feedback the result to the user.

[0101] The application framework layer 220 can provide application programming interfaces (APIs) and programming frameworks to the applications in the application layer 210; the application framework layer can include some predefined functions.

[0102] For example, the application framework layer 220 can include a camera access interface; the camera access interface can include camera management and camera devices; among them, camera management can be used to provide an access interface for managing the camera, and the camera device can be used to provide an interface for accessing the camera.

[0103] The hardware abstraction layer 230 is used to abstract the hardware. For example, the hardware abstraction layer can include a camera hardware abstraction layer and other hardware device abstraction layers; the camera hardware abstraction layer can include camera device 1, camera device 2, etc.; the camera hardware abstraction layer can be connected to the camera algorithm library, and the camera hardware abstraction layer can call the algorithms in the camera algorithm library.

[0104] In the embodiment of the present application, the module for performing scan pattern detection can be set in the hardware abstraction layer.

[0105] The driver layer 240 is used to provide drivers for different hardware devices. For example, the driver layer can include a camera device driver, a digital signal processor driver, and a graphics processor driver.

[0106] The hardware layer 250 can include multiple image sensors, multiple image signal processors, digital signal processors, graphics processors, and other hardware devices.

[0107] In the present application, by calling the hardware abstraction layer interface in the hardware abstraction layer 230, the application layer 210 and the application framework layer 220 above the hardware abstraction layer 230 can be connected to the driver layer 240 and the hardware layer 250 below, realizing camera data transmission and function control.

[0108] Next, in combination with an application scenario with a flashing device, the working processes of the software and hardware of the electronic device 100 will be exemplarily described.

[0109] The camera application in the application layer can be displayed on the screen of the electronic device 100 in the form of an icon. When the icon of the camera application is clicked by the user to be triggered, the electronic device 100 starts running the camera application. When the camera application is running on the electronic device 100, the camera application calls the corresponding interface of the camera application in the application framework layer 210, and then starts the camera driver by calling the hardware abstraction layer 230, turns on the camera 193 on the electronic device 100, and at the same time, the camera algorithm library starts to load the photographing method utilized in the embodiments of the present application.

[0110] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0111] For ease of understanding, the following embodiments of the present application will use an electronic device having Figure 2 and Figure 3 the structure shown as an example, and in combination with the accompanying drawings and application scenarios, specifically elaborate on the photographing method provided by the embodiments of the present application.

[0112] Before introducing the photographing method provided by the embodiments of the present application below, first, the application scenarios applicable to the embodiments of the present application will be introduced. The following will take a mobile phone as an example of the electronic device for illustration. The mobile phone may include a display screen and one or more cameras. Among them, in the scene to be photographed, the mobile phone uses one or more cameras to take pictures. The display screen is used to display the captured image obtained after shooting.

[0113] Among them, the scene to be photographed refers to the scene that the user expects to photograph. If the user uses the camera of the electronic device to aim at a scene including a certain object, then the scene including the certain object is the scene to be photographed. It should be understood that the scene to be photographed is not specifically referring to a certain specific scene, but is the scene that is aligned in real time following the pointing of the camera. It should be noted that in the embodiments of the present application, the scene to be photographed includes a flashing device, and the photographing method provided by the embodiments of the present application is to take an image without flashing stripes in the scene to be photographed including the flashing device.

[0114] Figure 4 shows a schematic diagram of a scene applicable to the embodiments of the present application. As Figure 4 shown in figure (a) therein, the camera application is installed on the electronic device 100. In addition, many other applications are also installed, and the embodiments of the present application do not impose any restrictions on this. Exemplarily, in response to the user's click operation on the camera application, when the electronic device 100 runs the camera application, the electronic device 100 displays a shooting interface as shown in Figure 4 figure (b) therein.

[0115] Among them, the shooting interface includes various shooting modes of the camera application, such as the large aperture mode 41, the night scene mode 42, the portrait mode 43, the photo shooting mode 44, the video recording mode 45, etc. The shooting interface further includes a first control, and the first control is a shooting button 50. The shooting button 50 is used to indicate the current shooting mode. For example, when the camera is turned on, the shooting button 50 defaults to indicating that the current shooting mode is the photo shooting mode 44.

[0116] As Figure 4 shown in (b) of , the shooting interface further includes a viewfinder window 60. The viewfinder window 60 can be used to display the preview image before taking a photo in real time (for example, the preview image is an LED display screen). In this application, when there are scanning lines in the preview image, the electronic device can call the photo shooting method provided by this application to automatically reduce the shutter parameter until there are no scanning lines in the preview image.

[0117] Figure 5 shows another schematic diagram of the scenario applicable to the embodiment of this application. As Figure 5 shown in (a) of , a camera application is installed on the electronic device 100. Exemplarily, in response to a user's click operation on the camera application, when the electronic device 100 runs the camera application, the electronic device displays a shooting interface as shown in (b) of . Figure 5 shown in (b) of .

[0118] Among them, the description of the shooting interface is the same as that in (b) of , and will not be repeated here. When the camera is turned on, the default shooting button 50 indicates that the current shooting mode is the photo shooting mode 44. Exemplarily, in the landscape screen state of the electronic device, in response to a user's downward sliding operation, the shooting mode can be switched from the photo shooting mode 44 to the video recording mode 45. Figure 4 Among them, the description of the shooting interface is the same as that in (b) of , and will not be repeated here. When the camera is turned on, the default shooting button 50 indicates that the current shooting mode is the photo shooting mode 44. Exemplarily, in the landscape screen state of the electronic device, in response to a user's downward sliding operation, the shooting mode can be switched from the photo shooting mode 44 to the video recording mode 45.

[0119] As Figure 5 shown in (c) of , when the shooting mode is switched to the video recording mode 45, the viewfinder window 60 included in the shooting interface can be used to display the preview image before video recording in real time. Exemplarily, in response to a user's click operation on the shooting button 50, when the electronic device 100 starts video recording, the electronic device can display a video recording interface as shown in (d) of . Figure 5 shown in (d) of .

[0120] As Figure 5 shown in (d) of , the video recording interface can display the currently captured video picture, the shooting progress, the status icon, and a third control, for example, the snapshot control 70. Currently, the shooting interface can further include other controls, such as: the zoom option 61, the end control 80, the pause / resume control 90, etc. The embodiment of this application does not limit this.

[0121] Among them, the pause / resume control 90 is used to display a pause icon during video shooting, and is also used to pause the current video shooting process when the pause icon is clicked; and to display a shooting icon when the video shooting is paused, and when the user clicks the shooting icon, the current video shooting process is resumed. The end control 80 is used to end the current video shooting process. The capture control 70 is used to capture a photo without pausing or ending the current video shooting process.

[0122] Combined with Figure 5 As shown in (c) and (d) in, when the user wants to capture a photo during the process of shooting an LED display screen, the viewfinder window 60 is used to display a preview image before video recording in real time. The user can click the capture control 70 in the shooting interface, and the electronic device can call the photographing method provided by this application to obtain a captured picture. Compared with the prior art, there are no scanning lines in the captured picture.

[0123] The photographing method provided by the embodiments of this application will be described in detail below in combination with the above application scenarios. Figure 6 A schematic flowchart of the photographing method 600 provided by the embodiments of this application is shown. As Figure 6 shown, Figure 6 The method 600 shown in may include steps S610 to S650. Each step in the method 600 will be described in detail below in combination with Figure 6 Details.

[0124] It should be understood that in the embodiments of this application, taking an electronic device as the execution subject for executing the method 600 as an example, the method 600 is described. By way of example and not limitation, the execution subject for executing the method 600 may also be a chip applied to an electronic device.

[0125] S610. The electronic device responds to the user's operation of turning on the camera and displays a first interface, and the first interface includes a first control.

[0126] In the embodiments of this application, the first interface may be a photographing interface or a video recording interface, and the first control is used to indicate the shooting button in the shooting interface or the shooting button in the video recording interface.

[0127] In other embodiments of this application, when the electronic device is a camera device, the electronic device responds to the user's operation of turning on the camera and displays the first interface, and the first interface includes a first control; when the electronic device is a terminal device such as a mobile phone or a tablet with a camera, the electronic device's response to the user's operation of turning on the camera can be understood as the electronic device's response to the user's operation of opening the camera application.

[0128] Exemplarily, the first interface may be as Figure 4The interface shown in Figure (b) therein, the first control is the shooting button 50 in the shooting interface. Or the first interface can also be the interface shown in Figure (c) of Figure 5 therein, the first control is the snapshot control 70 in the shooting interface, or as shown in Figure (d) of Figure 5 therein, the first control is the shooting button in the video recording interface.

[0129] S620. Receive the first operation of the user on the first control, obtain the first preview picture by using the first shutter parameter, and determine whether there are scanning lines in the first preview picture.

[0130] Optionally, the first operation can be a click operation on the first control, or a voice operation or other operations that instruct the electronic device to take pictures. The embodiments of the present application do not limit this.

[0131] It should be noted that the click operation refers to the behavior of the user touching the first control and then leaving in a short time. The electronic device receiving the first operation of the user on the first control can also be understood as the electronic device receiving the user's shooting operation.

[0132] In the embodiments of the present application, in order to make the image captured by the electronic device without scanning lines, when the user clicks the first control, the electronic device first obtains a preview picture by using the first shutter parameter, and determines whether there are scanning lines on the preview picture.

[0133] It should be understood that the first shutter parameter can be calculated by the electronic device according to the brightness of the preview stream in the current shooting scene. Exemplarily, the first shutter parameter is any one of 1 / 100S, 1 / 90S, 1 / 72S, 1 / 60S, 1 / 50S, 1 / 40S, 1 / 30S. Of course, the first shutter parameter can also be other parameters, and the embodiments of the present application do not specifically limit this.

[0134] In some possible implementation manners, a scanning line detection module is provided on the electronic device. The scanning line detection module can obtain the preview picture of the electronic device, and then determine whether there are scanning lines on the preview picture.

[0135] Of course, the electronic device can also use other methods to determine whether there are scanning lines on the preview picture, and the embodiments of the present application do not specifically limit this.

[0136] S630a. When there are no scanning lines in the preview picture, display the preview picture.

[0137] In the embodiments of the present application, when the electronic device determines that there are no scanning lines in the preview picture, the preview picture is displayed on the current display interface.

[0138] In some possible implementation manners, the scanning pattern detection module in the electronic device may obtain a preview picture and determine whether there is a scanning pattern on the preview picture. When the scanning pattern detection module determines that there is no scanning pattern on the preview picture, the electronic device displays the preview picture on the current display interface.

[0139] S630b. When there is a scanning pattern in the preview picture, adjust the first shutter parameter.

[0140] In a possible implementation manner, when the electronic device determines that there is a scanning pattern in the first preview picture, it automatically reduces the shutter parameter, that is, the electronic device sequentially reduces the shutter parameter during shooting based on the first shutter parameter.

[0141] It should be noted that the shutter parameter determines the duration of light entering the camera. The larger the number, the slower the shutter speed, and the smaller the number, the faster the shutter speed. As the shutter speed becomes faster and faster, the duration of light entering the camera becomes shorter and shorter, so the captured photo becomes darker and darker.

[0142] Optionally, the first electronic device may sequentially reduce the shutter parameter of the camera based on a preset shutter parameter list starting from the first shutter parameter.

[0143] Exemplarily, when there is a scanning pattern in the preview picture obtained when the first shutter parameter is 1 / 100s, the electronic device may sequentially reduce the first shutter parameter based on the preset shutter parameter list, and the reduced shutter parameter may be any one of 1 / 90s, 1 / 72s, 1 / 60s, 1 / 50s, 1 / 40s, and 1 / 30s.

[0144] Of course, the first shutter parameter may also be any one of 1 / 90s, 1 / 72s, 1 / 60s, 1 / 50s, 1 / 40s, and 1 / 30s. The embodiments of the present application do not limit the value of the first shutter parameter.

[0145] S640. Obtain pictures corresponding to the sequentially reduced shutter parameters and determine whether there is a scanning pattern in the pictures.

[0146] After the electronic device reduces the shutter parameter, it uses the current shutter parameter to obtain a preview picture and determines whether there is a scanning pattern in the preview picture.

[0147] Exemplarily, when the first shutter parameter is 1 / 90s, the sequentially reduced shutter parameters may be at least one of 1 / 72s, 1 / 60s, 1 / 50s, 1 / 40s, and 1 / 30s. And determine whether there is a scanning pattern in the image corresponding to the shutter parameter.

[0148] S650. When there are no scanning lines in the images obtained with successively decreasing shutter parameters, a second preview image without scanning lines is obtained, and the shutter parameter corresponding to this second preview image is the second shutter parameter.

[0149] In step S650, when the electronic device successively decreases the first shutter parameter, if there are no scanning lines in the second preview picture corresponding to the second shutter parameter obtained by the electronic device, the picture corresponding to the second shutter parameter is displayed.

[0150] It should be understood that when there are no scanning lines in the picture corresponding to the second shutter parameter, the second shutter parameter can divide the flashing frequency of the flashing device.

[0151] For example, as Figure 4 shown in figure (b) of [], in a photographing scene, when the electronic device receives a click operation on the first control 44 by the user, a preview picture is obtained, and then the scanning line detection module is used to detect whether there are scanning lines on this preview picture. If no scanning lines are detected on the preview picture, the preview picture is displayed on the display interface. If scanning lines are detected on the preview picture, the current shutter parameter is successively decreased until the scanning line detection module detects that there are no scanning lines on this preview picture, and finally an image without scanning lines is displayed on the display screen.

[0152] Although there is a flashing device, that is, an LED display screen, in this shooting scene, there are no scanning lines in the captured picture currently displayed on the current display screen. The shutter parameter corresponding to the current captured picture is the same as the flashing frequency of the LED display screen, or the shutter parameter corresponding to the current captured picture can divide the flashing frequency of the LED display screen.

[0153] Another example, as Figure 5 shown in figure (d) of [], in a video recording scene, when the electronic device receives a click operation on the capture control 70 by the user, the electronic device obtains a preview picture, and then the scanning line detection module is used to detect whether there are scanning lines on this preview picture. If no scanning lines are detected on the preview picture, the preview picture is displayed on the display interface. If scanning lines are detected on the preview picture, the current shutter parameter is successively decreased until the scanning line detection module detects that there are no scanning lines on this preview picture, and finally an image without scanning lines is displayed on the display screen.

[0154] Although there is an LED display screen in this shooting scene, there are no scanning lines in the video currently displayed on the current display screen. It can be seen that the shutter parameter corresponding to the current captured video is the same as the flashing frequency of the LED display screen, or the shutter parameter corresponding to the current captured video can divide the flashing frequency of the LED display screen.

[0155] In some other embodiments, after the electronic device receives a user's operation to turn on the camera, in response to this turn-on operation, the electronic device obtains a first preview image using a first shutter parameter, and determines whether there are scanning lines in the first preview image; when there are scanning lines in the first preview picture, the electronic device automatically adjusts the first shutter parameter to obtain a second preview image without scanning lines, and the shutter parameter corresponding to the second preview image is the second shutter parameter. When the user clicks the photographing operation, the electronic device obtains a target image using the second shutter parameter, and there are no scanning lines in the target image.

[0156] Compared with the embodiment of method 600, in the process of the electronic device using the preview picture to judge the scanning lines, it is carried out after receiving the user's operation to turn on the camera. Therefore, when the user clicks the first control (shooting button), the electronic device can quickly respond and obtain the target image using the optimal shutter parameter.

[0157] In some possible implementation manners, after the electronic device determines the second shutter parameter, it can determine the flashing frequency of the flashing device based on the second shutter parameter.

[0158] Optionally, the electronic device can calculate the flashing frequency of the flashing device using the second shutter parameter and the shutter parameter without scanning lines. Among them, the shutter parameter without scanning lines can be adjusted upward based on the value of the second shutter parameter until a preview image without scanning lines is obtained, or it can be adjusted downward based on the value of the second shutter parameter until a preview image without scanning lines is obtained. Finally, calculate the flashing frequency of the flashing device using the second shutter parameter and the shutter parameter without scanning lines.

[0159] In some other possible implementation manners, the electronic device can also display the flashing frequency of the flashing device on the display screen, and the user can read the flashing frequency of the flashing device.

[0160] Optionally, Figure 7 shows a schematic diagram of another photographing method provided by an embodiment of the present application. As Figure 7 shown, when the user clicks to shoot, the electronic device uses the default shutter 1 / 100S to shoot a preview picture, and then the scanning line detection module detects and classifies the preview picture to judge whether there are scanning lines. When the scanning line detection module judges that there are scanning lines in the preview picture, the software automatically reduces the shutter parameter for image shooting. For example, the shutter parameter can be continuously reduced according to 1 / 90S, 1 / 72S, 1 / 60S, 1 / 50S, 1 / 40S, 1 / 30S. Each time it is reduced, the electronic device obtains a preview picture, and uses the scanning line detection module to judge whether there are scanning lines until there are no scanning lines in the preview picture. The electronic device can output the final picture, that is, the opening parameter corresponding to the output image is the same as or can divide the flashing frequency of the flashing device.

[0161] In the above embodiments, in response to a user's shooting operation, the electronic device detects and identifies moiré patterns in the preview picture, and then adaptively adjusts the shutter parameter according to the recognition result, thereby solving the problem that the shutter parameter of the electronic device does not match the flashing frequency of the flashing device, resulting in moiré patterns, greatly improving the efficiency and effect of taking pictures or videos, and thus enhancing the user experience.

[0162] Through the above embodiments, it is also possible to solve the problem of low efficiency of manually adjusting the shutter in the prior art, as well as the problem that some shutter parameters cannot be set when adjusting the shutter parameter, and at the same time solve the problem that the shutter cannot be manually adjusted during video recording of the electronic device.

[0163] In the above method, the electronic device determines the shutter parameter when there is no moiré pattern by detecting the moiré pattern in the preview picture, so as to ensure that there is no moiré pattern in the picture displayed on the display screen of the electronic device. In this application, another photographing method 800 is also provided. The electronic device can obtain the flashing frequency sent by the flashing device in the shooting scene in real time, thereby updating the shutter parameter based on the flashing frequency, and finally obtaining a picture or video without moiré pattern by using the updated shutter parameter.

[0164] Before introducing another photographing method 800 provided in this application below, first, the system architecture diagram applicable to this method will be described. Figure 8 FIG. shows a schematic diagram of the system architecture applicable to the embodiments of this application, as Figure 8 shown, the system architecture includes an electronic device with a photographing function and various flashing devices. Among them, the electronic device with a photographing function includes a camera module and a communication module. The camera mode is used to collect and obtain image data in the shooting scene, and the communication module is used to communicate with the communication module of the flashing device. The flashing device includes a communication module, and the communication module of the flashing device is used to communicate with the communication module of the electronic device.

[0165] Specifically, in the embodiments of this application, after the communication module of the electronic device establishes a connection with the communication module of the flashing device, the communication module of the electronic device obtains the flashing frequency of the flashing device from the communication module of the flashing device, and then the camera module of the electronic device determines the current shutter parameter according to the obtained flashing frequency, so as to obtain an image without moiré pattern.

[0166] Further, when the flashing frequency of the flashing device changes, the flashing device immediately sends the flashing frequency to the communication module of the electronic device through the communication module. The camera module of the electronic device updates the current shutter parameters in real time according to the flashing frequency obtained in real time, so that when the flashing frequency of the flashing device changes, the electronic device connected to the flashing device can immediately obtain the new flashing frequency and recalculate the shutter parameters, preventing the problem of scanning lines in taking pictures or videos due to the change of the flashing frequency during use.

[0167] The following combines the above system framework diagram and Figure 9 the flowchart of to further illustrate another example of the photographing method provided by the embodiments of the present application in detail. Figure 9 FIG. shows a schematic flowchart of a photographing method 900 provided by an embodiment of the present application. As Figure 9 shown, Figure 9 the method 900 shown in may include steps S910 to S950. The following combines Figure 9 to detail each step in the method 900.

[0168] It should be understood that in the embodiments of the present application, the electronic device is taken as an example of the execution subject for executing the method 900 to illustrate the method 900. By way of example and not limitation, the execution subject for executing the method 900 may also be a chip applied to the electronic device.

[0169] S910. Receive the user's operation to turn on the camera. In response to this operation, establish a connection with at least one flashing device to obtain the flashing frequency of at least one flashing device.

[0170] In the embodiments of the present application, when the electronic device receives the user's operation to turn on the camera, it automatically scans and searches for nearby devices and establishes a connection.

[0171] In some embodiments, when the electronic device receives the user's operation to turn on the camera, the communication module of the electronic device may automatically scan and search for nearby flashing devices and establish a connection with the flashing devices.

[0172] It should be noted that there is at least one flashing device in the shooting scenario. After the electronic device establishes a connection with at least one flashing device, the electronic device can obtain the flashing frequency from at least one flashing device through the communication module. In other words, after the electronic device establishes a connection with the flashing device, at least one flashing device can send the current flashing frequency to the electronic device through the communication module.

[0173] S920. Determine a first shutter parameter based on the flashing frequency of at least one flashing device, and the first shutter parameter can be divided evenly by the flashing frequency of each flashing device in at least one flashing device.

[0174] When the electronic device obtains the flicker frequency of at least one flicker device, in order to ensure that the photographed photo is not affected by any flicker device, the electronic device may determine a first shutter parameter based on the obtained flicker frequency of at least one flicker device. Furthermore, in order to ensure that the photographed photo is not affected by any flicker device, the first shutter parameter may be divisible by any one of the multiple flicker frequencies.

[0175] When the electronic device receives a first operation on a first control by a user, in response to the first operation, a first target image is captured using a first shutter parameter, and the first target image has no scanning pattern.

[0176] Optionally, the first control is a photo control in a shooting interface, or a snapshot control in a shooting interface, or a shooting key in a video recording interface. The embodiment of the present application does not specifically limit the scenario in which the first control is used.

[0177] S930: Receive a photographing operation of the user, and in response to the photographing operation, photograph a first target image using a first shutter parameter.

[0178] It should be understood that the first shutter parameter is determined based on the acquired flashing frequency of at least one flashing device. Therefore, after the electronic device receives the user's photo operation, there is no scanning pattern in the first target image captured based on the first shutter parameter in response to the photo operation.

[0179] S940, when a flickering frequency of a first flickering device among the at least one flickering device changes, the electronic device receives the flickering frequency of the first flickering device, and determines a second shutter parameter based on the flickering frequency of the at least one flickering device, where the second shutter parameter can divide the flickering frequency of the at least one flickering device, where the flickering frequency of the at least one flickering device includes the flickering frequency of the first flickering device;

[0180] Based on steps S910-S930, the electronic device can capture an image without scanning lines based on the current flashing frequency of the flashing device in the shooting scene. However, the flashing frequency of the flashing device may change. When the flashing frequency of the flashing device changes, the first shutter parameter calculated in step S920 will become invalid. When the user takes a photo again, scanning lines will still appear in the image.

[0181] Therefore, in step S940, when the flickering frequency of the first flickering device in at least one flickering device changes, the first flickering device can actively notify the connected electronic device, and the electronic device can determine the second shutter parameter based on the changed flickering frequency and the unchanged flickering frequency. It should be understood that the second shutter parameter can divide any one of the changed flickering frequency and the unchanged flickering frequency.

[0182] It should be noted that the first flashing device is any one or more of at least one flashing device.

[0183] S950. When the electronic device receives a first operation of the user on the first control, in response to the first operation, the second target image is captured using the second shutter parameter.

[0184] It should be understood that the electronic device receiving the first operation of the user on the first control can be understood as the electronic device receiving the user's photographing operation. The electronic device, in response to the photographing operation, captures the second target image using the second shutter parameter, and there are no scanning lines in the second target image.

[0185] In the photographing method 900, the electronic device can actively establish a connection with at least one flashing device to obtain the flashing frequency of at least one flashing device, thereby calculating the first shutter parameter, preventing the problem of scanning lines from occurring when the electronic device takes a photo or records a video, and thus improving the efficiency and effect of taking a photo or recording a video. Moreover, when the flashing frequency of any one of the at least one flashing device changes, the flashing device can promptly send the changed flashing frequency to the electronic device, so that the electronic device can promptly obtain the new flashing frequency and recalculate the second shutter parameter, preventing the problem of scanning lines from occurring during the process of the electronic device taking a photo or recording a video due to the change in the flashing frequency.

[0186] It should be understood that in some other implementation manners of the present application, the electronic device may not establish a communication connection with multiple flashing devices, and the electronic device can obtain the target flashing frequency of the flashing device based on NFC. The target flashing frequency may be the flashing frequency of the flashing device or the greatest common divisor of multiple flashing devices.

[0187] Specifically, the electronic device can automatically identify the card information of the flashing device in the shooting scene through NFC, and then read the label information on the card to obtain the target flashing frequency of the flashing device.

[0188] The electronic device calculates the shutter parameter during photographing based on the target flashing frequency, and then, in response to the user's photographing operation, obtains the target image using the shutter parameter, and there are no scanning lines in the target image.

[0189] In the above method, the electronic device ensures that there are no scanning lines in the picture displayed on the electronic device display screen by obtaining the flashing frequency from the flashing device. In the present application, another photographing method 1000 is also provided. The electronic device can calculate the flashing frequency without scanning lines based on a plurality of preset shutter parameters, thereby outputting the flashing frequency of the flashing device and obtaining a picture or video without scanning lines using the shutter parameter.

[0190] The following combines Figure 10The flowchart is used to elaborate in detail another example of the photographing method provided by the embodiments of the present application. Figure 10 It shows a schematic flowchart of the photographing method 1000 provided by the embodiments of the present application. As Figure 10 shown, Figure 10 the method 1000 shown in it may include step S1010 to step S1040. The following will elaborate on each step in method 1000 in combination with Figure 10 details.

[0191] It should be understood that in the embodiments of the present application, taking an electronic device as the execution subject for executing method 1000 as an example, method 1000 is described. By way of example rather than limitation, the execution subject for executing method 1000 may also be a chip applied in an electronic device.

[0192] S1010. Receive the user's operation to turn on the camera. In response to the turn-on operation, obtain multiple preview images based on a plurality of preset shutter parameters, and each preview image corresponds to a shutter parameter;

[0193] In the embodiments of the present application, when the electronic device receives the user's operation to turn on the camera, the electronic device obtains multiple preview images through a plurality of preset shutter parameters on the preview interface, where each shutter parameter corresponds to a preview image.

[0194] Exemplarily, the plurality of shutter parameters may be 1 / 30S, 1 / 40S, 1 / 50S, 1 / 60S, 1 / 70S, 1 / 80S, 1 / 90S, 1 / 100S, 1 / 120S, 1 / 140S, 1 / 160S, 1 / 180S, 1 / 200S, 1 / 240S, 1 / 280S, 1 / 320S, 1 / 360S, 1 / 400S. Of course, the shutter parameters may also be other parameters, and the embodiments of the present application do not limit this.

[0195] S1020. Respectively determine whether there are moiré patterns in the multiple preview pictures.

[0196] Obtain multiple preview pictures through a plurality of preset shutter parameters, and respectively determine whether there are moiré patterns in the multiple preview pictures.

[0197] In a possible implementation manner, the electronic device uses a moiré pattern detection module to respectively determine whether there are moiré patterns in the multiple preview pictures.

[0198] S1030. Calculate the flicker frequency of the flashing device based on the shutter parameter corresponding to the preview image without moiré patterns among the multiple preview images;

[0199] In step S1030, the flicker frequency of the flashing device may be calculated based on the judgment result of the moiré patterns of the multiple preview pictures and the corresponding shutter parameters.

[0200] In a possible implementation, the minimum common multiple of the shutter parameters corresponding to the images without scanning lines among multiple preview images is used to calculate the flashing frequency of the flashing device.

[0201] S1040. Receive a first operation of the user on a first control, and in response to the first operation, obtain a target image according to the flashing frequency of the flashing device and display the flashing frequency.

[0202] In step S1040, the electronic device can display the calculated flashing device on the display interface of the electronic device, and the user can obtain the flashing frequency of the flashing device. And based on this flashing frequency, determine the current shutter parameter, so as to obtain the final target image, and there are no scanning lines in the target image.

[0203] Exemplarily, when the shutter parameters of the electronic device during photographing are 1 / 40S, 1 / 80S, and 1 / 160S, and the obtained images have no scanning lines, the output current flashing frequency of the flashing device is 160 hz. When the shutter parameter of the electronic device during photographing is 1 / 60 and there are no scanning lines, the output current flashing frequency of the flashing device is 60 hz.

[0204] When the images obtained based on the above multiple shutter parameters all have no scanning lines, the output current flashing frequency of the flashing device is the common multiple greater than 400 hz; when the images obtained based on the above multiple shutter parameters all have scanning lines, the output current flashing frequency of the flashing device is the common multiple less than 30 hz.

[0205] It should be understood that the common multiple of the flashing frequency of the flashing device greater than 400 hz means that the flashing frequency of the flashing device that the camera capability of the electronic device can detect is greater than the common multiple of 400 hz. Assume that the preset shutter parameters of the electronic device also include 1 / 500, and when the images obtained based on the above multiple shutter parameters all have no scanning lines, the output current flashing frequency of the flashing device is the common multiple greater than 500 hz, that is, when the images obtained based on the multiple preset shutter parameters of the electronic device all have no scanning lines, the output current flashing frequency of the flashing device that the electronic device can output is related to the maximum shutter parameter supported by the electronic device, and the embodiments of the present application do not limit the maximum shutter parameter supported by the electronic device.

[0206] It should also be understood that the flashing frequency of the flashing device is less than the least common multiple of 30 Hz, which means that the flashing frequency of the flashing device that can be detected by the camera capability of the electronic device is less than the least common multiple of 30 Hz. Assume that the preset shutter parameter of the electronic device further includes 1 / 20, and when there are scanning lines in the images obtained based on the above-mentioned multiple shutter parameters, the output flashing frequency of the current flashing device is less than the least common multiple of 20 Hz, that is, when there are scanning lines in the images obtained based on the multiple preset shutter parameters of the electronic device, the current flashing frequency of the flashing device that the electronic device can output is related to the minimum shutter parameter supported by the electronic device. The embodiments of the present application do not limit the minimum shutter parameter supported by the electronic device.

[0207] Optionally, Figure 11 shows a schematic diagram of another photographing method provided by the embodiments of the present application. As Figure 11 shown, when the user clicks to take a photo, the electronic device uses multiple preset shutter parameters to take pictures with different parameters, then detects whether there are scanning lines in each picture, then calculates the flashing frequency of the flashing device using the shutter parameter corresponding to the image without scanning lines, and finally displays the flashing frequency of the flashing device on the preview interface. This method can automatically detect the flashing frequency of the flashing device through the electronic device, allowing the user to detect whether the flashing device meets the quality requirements, and an image without scanning lines can be obtained based on the calculated flashing frequency.

[0208] In method 1000, the electronic device can automatically detect the flashing frequency of the flashing device based on the preset shutter parameters, and output an image without scanning lines based on the detected flashing frequency of the flashing device. And it can also remind the user whether the flashing device meets the quality requirements.

[0209] The embodiments of the present application also provide another method for the electronic device to automatically detect the flashing frequency of the flashing device. The electronic device detects the flashing frequency of the flashing device based on the interval width of the scanning lines, so as to determine the shutter parameter based on the flashing frequency to obtain an image without scanning lines. The following combines Figure 12 the flowchart of to detail another photographing method provided by the embodiments of the present application. Figure 12 shows a schematic flowchart of the photographing method 1200 provided by the embodiments of the present application. As Figure 12 shown, Figure 12 the method 1200 shown in may include steps S1210 to step S1250. The following combines Figure 12 to detail each step in method 1200.

[0210] It should be understood that in the embodiments of the present application, taking an electronic device as the execution subject for executing method 1200 as an example, method 1200 will be described. By way of example rather than limitation, the execution subject for executing method 1200 may also be a chip applied in the electronic device.

[0211] S1210. Receive an opening operation of the user on the second control. In response to the opening operation of the second control, the electronic device displays first indication information, which is used to prompt the user to bring the camera close to the flashing device.

[0212] It should be noted that the second control may be a scan control, and the second control is used to indicate the interface for the electronic device to start the detection refresh rate function.

[0213] In some implementation manners, the second control may be set at the upper left corner or the upper right corner of the preview interface. When the user needs to detect the flashing frequency of the flashing device in the shooting scene, the second control is opened. Of course, the embodiments of the present application do not make specific limitations on the setting position of the second control.

[0214] In some possible implementation manners, when the electronic device receives an opening operation of the user on the second control, the electronic device enters the detection refresh rate function interface, and first indication information is displayed on this interface to prompt the user to bring the camera close to the flashing device.

[0215] S1220. Obtain a first preview image of the flashing device. The first preview image is an image generated based on at least two preview images of the flashing device, and at least two flashing stripes are included in the first preview image.

[0216] When the user brings the camera of the electronic device close to the flashing device, the electronic device obtains a first image of the flashing device based on the minimum shutter parameter.

[0217] Optionally, when the distance between the camera of the electronic device and the flashing device meets a preset condition, the electronic device may display second indication information on the detection refresh rate function interface. The second indication information is used to remind the user that the camera is already close enough to the flashing device, and the user can stop the approaching action based on the second indication information. At this time, the electronic device may obtain a first image of the flashing device.

[0218] It should be noted that the preset condition may be set according to specific situations, and the embodiments of the present application do not make limitations thereto.

[0219] It should be understood that when the distance between the camera and the flashing device meets the preset condition, the overall picture color in the captured first image tends to be consistent, and the form of the scanning pattern in the first image also tends to be stable.

[0220] Further, in order to obtain the flickering stripes in the first image, the electronic device calculates the variance between each row except the first row and the first row in the first image of the flickering device to obtain a variance statistical graph, and then calculates the number of mutations in the variance statistical graph. It should be understood that the number of mutations in the variance statistical graph represents the flickering stripes in the first image.

[0221] When the number of flickering stripes in the first image is less than 1, the electronic device obtains the second image of the flickering device, and based on the first image and the second image, the first preview image can be determined.

[0222] It should be understood that when the number of mutations in the variance statistical graph of the first image is less than 1, the interval of the scanning stripes cannot be determined. Then the electronic device obtains the second image of the flickering device, and then stitches the first image and the second image of the flickering device. Based on the stitched first preview image, the variance statistical graph is calculated, and the heights of two mutations are found in the variance statistical graph of the first preview image, that is, two adjacent flickering stripes are found.

[0223] It should be noted that the second image of the flickering device can be obtained in the next frame of the first image of the flickering device or in the next next frame of the first image of the flickering device. The embodiments of the present application do not make specific limitations on this. The stitched first preview image may include more flickering stripes. In the embodiments of the present application, the flickering frequency of the flickering device is calculated based on two adjacent flickering stripes.

[0224] It should also be noted that the method of calculating the variance statistical graph based on the stitched first preview image is the same as that of calculating the variance statistical graph using the first image, that is, the variance is calculated between each row except the first row and the first row of the first preview image to obtain the variance statistical graph.

[0225] It should also be noted that the first preview image after stitching the first image and the second image includes at least two flickering stripes, and the interval between two adjacent flickering stripes among the multiple flickering stripes is used to calculate the flickering frequency.

[0226] In a possible implementation, when stitching the second image and the first image of the flickering device, the starting position of the stitching height of the second image is 1s / fps (frame rate) / one-line refresh time T.

[0227] Exemplarily, Figure 13 shows the single-stripe stitching flowchart provided by the embodiments of the present application. As Figure 13 shown in the figure (a), it is the first image of the flickering device, and there is one flickering stripe in the first image of the flickering device. As Figure 13As shown in Figure (b), it is the second image of the flashing device. There is a flashing stripe in the second image of the flashing device. After determining the splicing starting position (the position indicated by the arrow) in the second image of the flashing device, splice the first image of the flashing device and the second image of the flashing device. The obtained image is as shown in Figure 13 Figure (c) in, that is, the third spliced image. Find the heights of two adjacent mutations in the third image (for example, Figure 13 the heights of the two lines in

[0228] S1230. Determine the flashing frequency of the flashing device using the interval between two adjacent flashing stripes.

[0229] Finally, based on the interval between two adjacent flashing stripes and the time for the camera of the electronic device to generate each line of the image, calculate the flashing frequency of the flashing device.

[0230] In a possible implementation, the flashing frequency of the flashing device is equal to the reciprocal of the product of the interval between two adjacent flashing stripes and the time for generating each line of the image.

[0231] Exemplarily, if the interval h between two adjacent flashing stripes of the flashing device is 1200 and the refresh time T for generating each line of the image is 0.00000694 (s), then the refresh rate = 1 / (T×h) = 120 hz.

[0232] In the embodiments of the present application, the minimum current shutter is 1 / 4000, so the maximum testable refresh rate can be 2000 hz.

[0233] S1240. Determine the first shutter parameter according to the flashing frequency of the flashing device.

[0234] Furthermore, in order to obtain an image without flashing stripes, the electronic device can determine the first shutter parameter according to the calculated flashing frequency of the flashing device.

[0235] S1250. Receive the first operation of the user on the first control, and in response to the first operation, obtain the target image according to the first shutter parameter.

[0236] It should be noted that in the embodiments of the present application, the electronic device receiving the first operation of the user on the first control can be understood as the electronic device receiving the user's photographing operation. When the electronic device receives the user's photographing operation, it can obtain the target image according to the first shutter parameter, and there are no scanning stripes in the target image.

[0237] In other embodiments of the present application, the electronic device can also display the flashing frequency of the flashing device on the preview interface so that the user can obtain the flashing frequency of the flashing device in the current shooting scene.

[0238] Optionally,Figure 14 The figure shows a schematic diagram of another example of the photographing method provided by the embodiments of the present application. As Figure 14 shown, when the user clicks to take a photo, the electronic device enters the camera detection refresh rate function interface. After the user brings the camera close to the flashing device, the electronic device automatically obtains a picture with the minimum shutter parameter. Then, the electronic device calculates the variance between each row of the data of one frame of this picture and the first row to obtain a variance statistical graph, and determines the number of mutations in the variance statistical graph. If the number of mutations is 0 and the time of 1 second is counted, then the electronic device can directly output the flashing frequency of the flashing device. When the number of mutations is less than or equal to 1, a second image is obtained, and then the splicing position of the second image is calculated. The first image and the second image are spliced. Then, the electronic device calculates the variance between each row of the data of one frame of the spliced image and the first row to obtain a variance statistical graph, and determines the number of mutations in the spliced variance statistical graph. When the number of mutations is greater than 1, the height difference between the two mutations is calculated, and finally the flashing frequency of the flashing device is calculated according to the height difference between the two mutations.

[0239] In method 1200, after the electronic device splices the two images of the flashing device obtained by using the minimum shutter, it automatically calculates the flashing frequency of the flashing device by using the height sum of the two flashing stripes to generate the refresh time of each row of the image, and finally displays the flashing frequency of the flashing device on the preview interface. This method can automatically detect the flashing frequency of the flashing device through the electronic device, enabling the user to detect whether the flashing device meets the quality requirements, and an image without scanning lines can be obtained based on the calculated flashing frequency.

[0240] The embodiments of the present application also provide another method for the electronic device to automatically detect the flashing frequency of the flashing device, and a method for determining the shutter parameter based on the flashing frequency detected by the electronic device to obtain an image without scanning lines. The following combines Figure 15 the flowchart of to detail another example of the photographing method provided by the embodiments of the present application. Figure 15 The figure shows a schematic flowchart of the photographing method 1500 provided by the embodiments of the present application. As Figure 15 shown, Figure 15 the method 1500 shown in may include steps S1510 to S1550. The following combines Figure 15 to detail each step in method 1500.

[0241] It should be understood that in the embodiments of the present application, the electronic device is taken as an example of the execution subject for executing method 1500 to illustrate method 1500. By way of example and not limitation, the execution subject for executing method 1500 may also be a chip applied to the electronic device.

[0242] S1510. Receive the user's operation to open the second control. In response to this opening operation, the electronic device displays first indication information, which is used to remind the user to bring the camera close to the flashing device.

[0243] For the description of step S1510, reference can be made to the description of step S1210 above, and details will not be repeated here.

[0244] S1520. Obtain a first preview image of the flashing device. The first preview image is a preview image of the flashing device, and at least two flashing stripes are included in the first preview image.

[0245] When the user brings the camera of the electronic device close to the flashing device, the electronic device obtains a first image of the flashing device based on the minimum shutter parameter.

[0246] When the number of flashing stripes in the first image is less than or less than or equal to 1, the electronic device adjusts the shutter parameter to obtain a second image of the flashing device so that at least two flashing stripes are included in the obtained second image. In this case, the second image is the first preview image.

[0247] Optionally, in some possible implementation manners, the electronic device adjusts the pixel refresh time of each row of the second image to be twice that of each row of the first image until at least two scanning stripes appear in the second image.

[0248] In the embodiments of the present application, when the number of flashing stripes in the first image is less than or less than or equal to 1, the flashing frequency of the flashing device cannot be calculated according to the interval of the flashing stripes. The electronic device can obtain a second image of the flashing device, and at least two flashing stripes are included in the second image, then the flashing frequency of the flashing device is calculated according to the interval between two adjacent flashing stripes in the second image.

[0249] In some embodiments, when the number of mutations in the variance statistical graph of the first image is less than 1, the electronic device can adjust the generation time of each row of pixels to be twice that of the previous time, obtain a second image of the flashing device again. Based on the second image, the electronic device calculates the variance between each row except the first row and the first row in the second image to obtain a variance statistical graph, and then calculates the number of mutations in the variance statistical graph. When the number of mutations in the variance statistical graph is greater than 1, find the heights of two nearest mutations, and the heights of the two nearest mutations are the intervals between two adjacent flashing stripes.

[0250] S1530. Determine the flashing frequency of the flashing device by using the interval between two adjacent flashing stripes.

[0251] S1540. Determine a first shutter parameter according to the flashing frequency of the flashing device.

[0252] S1550. Receive a first operation of a user on a first control. In response to the first operation, obtain a target image according to a first shutter parameter.

[0253] For the descriptions of steps S1530 - S1550, reference may be made to the descriptions of the above steps S1230 - S1250, which will not be elaborated herein.

[0254] Optionally, Figure 16 The following shows a schematic diagram of another example of a photographing method provided by an embodiment of the present application. As Figure 16 shown, when the user clicks to take a photo, the electronic device enters the camera detection refresh rate function interface. After the user brings the camera close to the flashing device, the electronic device automatically obtains a picture with the minimum shutter parameter. Then, the electronic device calculates the variance between each row of the frame data of this picture and the first row to obtain a variance statistical graph, and determines the number of mutations in the variance statistical graph. If the number of mutations is 0 and the pixel generation time is adjusted more than 3 times, then the electronic device can directly output the flashing frequency of the flashing device. When the number of mutations is less than or equal to 1, the row pixel refresh time is adjusted to twice the previous time, and the second image of the flashing device is obtained using the minimum shutter parameter. Calculate the variance between each row and the first row based on the second image to obtain a variance statistical graph, and determine the number of mutations in the variance statistical graph of the second image. When the number of mutations is greater than 1, calculate the height difference between the two mutations, and finally calculate the flashing frequency of the flashing device according to the height difference between the two mutations.

[0255] In method 1600, the electronic device controls the pixel generation time of each row of the second image to be twice that of the first image, so that there are at least two scanning lines in the second image. The flashing frequency of the flashing device is automatically calculated using the interval between the two scanning lines and the refresh time for generating each row of the image. Finally, the flashing frequency of the flashing device is displayed on the preview interface. In this way, the electronic device can automatically detect the flashing frequency of the flashing device, enabling the user to check whether the flashing device meets the quality requirements, and taking a photo based on the shutter parameter determined according to the calculated flashing frequency can obtain an image without scanning lines.

[0256] The above has introduced in detail the examples of the photographing method provided by the present application. It can be understood that in order for the electronic device to implement the above functions, it includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that, combining the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0257] The present application can divide the photographing method into functional units according to the above method examples. For example, each function can be divided into respective functional units, or two or more functions can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. It should be noted that the division of units in the present application is illustrative, merely a logical function division, and there can be other division methods in actual implementation.

[0258] Figure 17 Fig. shows a schematic structural diagram of an electronic device provided by the present application. Figure 17 The dotted line in... indicates that the unit or the module is optional. The electronic device 1700 can be used to implement the method described in the above method embodiments. The electronic device 1700 can be a terminal device or a server, or can also be a module (such as a processor, a chip, or a chip system, etc.) applied to a terminal device or a server, or a logical node, a logical module, or software that can implement all or part of the terminal functions, or a logical node, a logical module, or software that can implement all or part of the server functions.

[0259] The electronic device 1700 includes one or more processors 1701, and the one or more processors 1701 can support the electronic device 1700 to implement Figure 11 the method in the corresponding method embodiment. The processor 1701 can be a general-purpose processor or a special-purpose processor. For example, the processor 1701 can be a Central Processing Unit (CPU). The CPU can be used to control the electronic device 1700, execute software programs, and process the data of software programs. The electronic device 1700 can also include a communication unit 1705 for implementing the input (reception) and output (transmission) of signals.

[0260] The above electronic device 1700 can be a chip (system), and the chip (system) includes a memory and a processor, wherein the processor is configured to execute a computer program stored in the memory to implement the methods shown in the above respective embodiments.

[0261] The communication unit 1705 can be the input and / or output circuit of the chip (system), or the communication unit 1705 can be the communication interface of the chip (system), and the chip (system) can be a component of the electronic device 1700.

[0262] For another example, the communication unit 1705 can be the transceiver of the electronic device 1700, or the communication unit 1705 can be the transceiver circuit of the electronic device 1700.

[0263] The electronic device 1700 may include one or more memories 1702, on which a program 1704 is stored. The program 1704 can be run by the processor 1701 to generate instructions 1703, enabling the processor 1701 to execute the methods described in the above method embodiments according to the instructions 1703. Optionally, data may also be stored in the memory 1702. Optionally, the processor 1701 may also read the data stored in the memory 1702. This data may be stored at the same storage address as the program 1704, or it may be stored at a different storage address from the program 1704.

[0264] The processor 1701 and the memory 1702 can be provided separately or integrated together. For example, they can be integrated on a system-on-chip (SOC) of the electronic device.

[0265] For the specific manner in which the processor 1701 executes the method for displaying multiple windows of an application program, reference can be made to the relevant descriptions in the method embodiments.

[0266] It should be understood that each step of the above method embodiments can be completed by a logic circuit in hardware form or instructions in software form in the processor 1701. The processor 1701 can be a CPU, a digital signal processor (DSP), a field programmable gate array (FPGA), or other programmable logic devices. For example, discrete gates, transistor logic devices, or discrete hardware components.

[0267] The present application also provides a computer program product, which, when executed by the processor 1701, implements the methods of any one of the method embodiments in the present application.

[0268] This computer program product can be stored in the memory 1702, such as the program 1704. After processes such as preprocessing, compilation, assembly, and linking, the program 1704 is finally converted into an executable target file that can be executed by the processor 1701.

[0269] The present application also provides a computer-readable storage medium, on which a computer program is stored. When this computer program is executed by a computer, it implements the methods of any one of the method embodiments in the present application. This computer program can be a high-level language program or an executable target program.

[0270] The computer-readable storage medium is, for example, the memory 1702. The memory 1702 may be a volatile memory or a non-volatile memory, or the memory 1702 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).

[0271] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes and technical effects of the above-described devices and apparatuses can refer to the corresponding processes and technical effects in the foregoing method embodiments, and will not be elaborated herein again.

[0272] In several embodiments provided in this application, the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, some features of the above-described method embodiments can be ignored or not executed. The above-described apparatus embodiments are merely illustrative. The splitting of units is only a logical function splitting, and there may be other splitting methods in actual implementation. Multiple units or components can be combined or integrated into another system. In addition, the coupling between units or the coupling between each component can be a direct coupling or an indirect coupling. The above couplings include electrical, mechanical, or other forms of connection.

[0273] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features, and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

[0274] Finally, as described above, the above are only the specific implementation manners of the present application, but the protection scope of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A photographing method, characterized in that, the method is applied to an electronic device, the electronic device includes a camera, and the method includes: receiving an opening operation of the user on the camera; in response to the opening operation, obtaining a first preview image by using a first shutter parameter; determining whether there are scanning lines in the first preview image; when there are scanning lines in the first preview image, adjusting the first shutter parameter to obtain a second preview image without scanning lines, wherein the shutter parameter corresponding to the second preview image is a second shutter parameter; receiving a photographing operation of the user; in response to the photographing operation, obtaining a target image by using the second shutter parameter.

2. The method according to claim 1, characterized in that, the second shutter parameter is less than the first shutter parameter.

3. The method according to claim 2, characterized in that, the adjusting the first shutter parameter to obtain a second preview image without scanning lines includes: based on a preset shutter parameter list, starting from the first shutter parameter, sequentially decreasing the shutter parameter of the camera until a second preview image without scanning lines is obtained.

4. The method according to any one of claims 1-3, characterized in that, the method further includes: determining the flashing frequency of a flashing device based on the second shutter parameter.

5. The method according to any one of claims 1-4, characterized in that, the first shutter parameter is any one of 1 / 100S, 1 / 90S, 1 / 72S, 1 / 60S, 1 / 50S, 1 / 40S, 1 / 30S.

6. The method according to any one of claims 1-5, characterized in that, the second shutter parameter is any one of 1 / 100S, 1 / 90S, 1 / 72S, 1 / 60S, 1 / 50S, 1 / 40S, 1 / 30S.

7. A photographing method, characterized in that, the method is applied to an electronic device, the electronic device includes a camera, and the method includes: receiving an opening operation of the user on the camera; in response to the opening operation, establishing a connection with at least one flashing device to obtain the flashing frequency of at least one flashing device; determining a first shutter parameter based on the flashing frequency of at least one flashing device, and the first shutter parameter can divide the flashing frequency of each flashing device in the at least one flashing device; receiving a photographing operation of the user; in response to the photographing operation, photographing a first target image by using the first shutter parameter.

8. The method according to claim 7, characterized in that, the method further includes: when the flashing frequency of a first flashing device in the at least one flashing device changes, receiving the flashing frequency of the first flashing device; determining a second shutter parameter based on the flashing frequency of at least one flashing device, and the second shutter parameter can divide the flashing frequency of at least one flashing device; receiving a photographing operation of the user; in response to the photographing operation, obtaining a second target image by using the second shutter parameter.

9. A photographing method, characterized in that, The method is applied to an electronic device, the electronic device includes a camera, and the method includes: Receiving an opening operation of a second control by a user; In response to the opening operation of the second control by the user, displaying first indication information for prompting the user to bring the camera close to a flashing device; Obtaining at least one preview image of the flashing device; Determining the flashing frequency of the flashing device based on at least one flashing stripe of the at least one preview image; Determining a first shutter parameter according to the flashing frequency of the flashing device; Receiving a photographing operation of the user; In response to the photographing operation, obtaining a target image based on the first shutter parameter.

10. The method according to claim 9, wherein, The determining the flashing frequency of the flashing device based on at least one flashing stripe of the at least one preview image includes: Determining the flashing frequency of the flashing device based on the interval between two adjacent flashing stripes in a first preview image among the at least one preview image, the first preview image being a preview image of the flashing device, or the first preview image being an image generated according to at least two preview images of the flashing device.

11. The method according to claim 10, wherein, The method further includes: When the number of flashing stripes in a first image of the flashing device is less than or equal to 1, obtaining a second image of the flashing device; Determining the splicing position of the second image; Splicing the first image and the second image based on the splicing position of the second image to obtain a first preview image of the flashing device.

12. The method according to claim 10, wherein, The method further includes: When the number of flashing stripes in a first image of the flashing device is less than or equal to 1, adjusting the shutter parameter when photographing the flashing device to obtain a second image of the flashing device, the second image being the first preview image and including at least two flashing stripes.

13. The method according to claim 12, wherein, The adjusting the shutter parameter when photographing the flashing device includes: Adjusting the shutter parameter when photographing the flashing device to be twice the shutter parameter when obtaining the first image.

14. An electronic device, wherein, including: A camera, a memory and a processor, the camera is used for taking pictures, the memory is used for storing computer programs; the processor is used for executing the method according to any one of claims 1-6 when calling the computer program, or for executing the method according to claim 7 or 8, or for executing the method according to any one of claims 9-13.

15. A computer-readable storage medium, on which a computer program is stored, wherein, The computer program, when executed by a processor, implements the method according to any one of claims 1-6, or implements the method according to claim 7 or 8, or implements the method according to any one of claims 9-13.

16. A computer program product, wherein, When the computer program product runs on an electronic device, it causes the electronic device to execute the method described in any one of claims 1-6, or to execute the method described in claim 7 or 8, or to execute the method described in any one of claims 9-13.