WO2019237887A1 - 图像处理方法、电子设备、计算机可读存储介质 - Google Patents

图像处理方法、电子设备、计算机可读存储介质 Download PDF

Info

Publication number
WO2019237887A1
WO2019237887A1 PCT/CN2019/087532 CN2019087532W WO2019237887A1 WO 2019237887 A1 WO2019237887 A1 WO 2019237887A1 CN 2019087532 W CN2019087532 W CN 2019087532W WO 2019237887 A1 WO2019237887 A1 WO 2019237887A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
captured
scene
label
tag
Prior art date
Application number
PCT/CN2019/087532
Other languages
English (en)
French (fr)
Inventor
陈岩
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to EP19819056.3A priority Critical patent/EP3793188A4/en
Publication of WO2019237887A1 publication Critical patent/WO2019237887A1/zh
Priority to US17/037,682 priority patent/US20210014411A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/18Eye characteristics, e.g. of the iris
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/70Labelling scene content, e.g. deriving syntactic or semantic representations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • H04N23/675Focus control based on electronic image sensor signals comprising setting of focusing regions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/682Vibration or motion blur correction
    • H04N23/684Vibration or motion blur correction performed by controlling the image sensor readout, e.g. by controlling the integration time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Definitions

  • the present application relates to the field of computer technology, and in particular, to an image processing method, an electronic device, and a computer-readable storage medium.
  • an image processing method an electronic device, and a computer-readable storage medium are provided.
  • An image processing method includes:
  • the scene tag includes a preset tag
  • a shutter priority mode is activated, and the preset tag is a tag corresponding to a dynamic scene
  • An electronic device includes a memory and a processor.
  • the memory stores a computer program.
  • the processor causes the processor to perform the following operations:
  • the scene tag includes a preset tag
  • a shutter priority mode is activated, and the preset tag is a tag corresponding to a dynamic scene
  • a computer-readable storage medium stores a computer program thereon.
  • the computer program is executed by a processor, the following operations are implemented:
  • the scene tag includes a preset tag
  • a shutter priority mode is activated, and the preset tag is a tag corresponding to a dynamic scene
  • the image processing method, electronic device, and computer-readable storage medium obtained scene labels of the images to be captured by performing scene detection on the images to be captured.
  • the scene labels include preset labels
  • the shutter priority mode is activated.
  • the preset label is a label corresponding to a dynamic scene, obtains a shutter speed, and shoots an image to be captured according to a shutter priority mode and a shutter speed. Since the shutter priority mode can be activated for shooting when the image to be captured contains a dynamic scene, a desired image can be captured.
  • FIG. 1 is a schematic diagram of an internal structure of an electronic device in one or more embodiments.
  • FIG. 2 is a flowchart of an image processing method in one or more embodiments.
  • FIG. 3 is a schematic structural diagram of a neural network in one or more embodiments.
  • FIG. 4 is a flowchart of an image processing method in another embodiment.
  • FIG. 5 is a flowchart of an image processing method according to still another embodiment.
  • FIG. 6 is a flowchart of an image processing method in one or more embodiments.
  • FIG. 7 is a flowchart of an image processing method in another embodiment.
  • FIG. 8 is a structural block diagram of an image processing apparatus in one or more embodiments.
  • FIG. 9 is a schematic diagram of an image processing circuit in one or more embodiments.
  • FIG. 1 is a schematic diagram of an internal structure of an electronic device in an embodiment.
  • the electronic device includes a processor, a memory, and a network interface connected through a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
  • the memory is used to store data, programs, and the like. At least one computer program is stored on the memory, and the computer program can be executed by a processor to implement the wireless network communication method applicable to the electronic device provided in the embodiments of the present application.
  • the memory may include a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and a computer program.
  • the computer program can be executed by a processor to implement an image processing method provided by each of the following embodiments.
  • the internal memory provides a cached operating environment for operating system computer programs in a non-volatile storage medium.
  • the network interface may be an Ethernet card or a wireless network card, and is used to communicate with external electronic devices.
  • the electronic device may be a mobile phone, a tablet computer, or a personal digital assistant or a wearable device.
  • FIG. 2 is a flowchart of an image processing method according to an embodiment.
  • the image processing method in this embodiment is described by using an electronic device running in FIG. 1 as an example.
  • the image processing method includes operations 202 to 206.
  • Operation 202 Perform scene detection on the image to be captured to obtain a scene label of the image to be captured.
  • the image to be captured refers to the image generated by the electronic device by capturing the current scene in real time through the imaging device.
  • the images to be captured can be displayed on the display of the electronic device in real time.
  • scene recognition models can be trained based on deep learning algorithms such as VGG (Visual Geometry Group), CNN (Convolutional Neural Network), SSD (single shot multibox detector), and Decision Tree.
  • the recognition model performs scene recognition on the image to be captured.
  • the scene recognition model generally includes an input layer, a hidden layer, and an output layer; the input layer is used to receive the input of the image; the hidden layer is used to process the received image; the output layer is used to output the final result of the image processing, that is, the output image Scene recognition results.
  • the scene of the image can be landscape, beach, blue sky, green grass, snow, fireworks, spotlight, text, portrait, baby, cat, dog, food, etc.
  • the scene label of the image to be captured refers to the scene mark of the image to be captured.
  • the electronic device may determine a scene label of the image to be captured according to a scene recognition result of the image to be captured. For example, when the scene recognition result of the image to be captured is blue sky, the scene label of the image is blue sky.
  • the electronic device may perform scene recognition according to the scene recognition model, and determine a scene label of the image to be captured according to the scene recognition result.
  • a shutter priority mode is activated, and the preset label is a label corresponding to a dynamic scene.
  • a dynamic scene is a scene that contains objects that can move at high speed.
  • the preset label refers to a label corresponding to a preset dynamic scene.
  • the dynamic scene may include a cat, a dog, a firework, a baby, etc.
  • the corresponding preset tags may include a cat scene tag, a dog scene tag, a firework scene tag, a baby scene tag, and the like, and are not limited thereto.
  • the image to be captured may include two preset tags: a dog scene tag and a cat scene tag.
  • Shutter priority mode refers to a shooting mode in which the exposure value is calculated by the device's automatic metering system, and then the aperture is automatically determined according to the selected shutter speed.
  • Shutter priority mode is mainly used for shooting moving objects, which can obtain a clear subject.
  • the electronic device When the electronic device includes a preset label in a scene label of an image to be captured, the electronic device activates a shutter priority mode for shooting.
  • Operation 206 Obtain a shutter speed, and shoot an image to be captured according to the shutter priority mode and the shutter speed.
  • the shutter speed refers to the time from when the shutter is fully opened to when the image is captured.
  • the shutter speed determines the length of the exposure time. Specifically, the smaller the shutter speed, the shorter the exposure time of the image, which is suitable for shooting fast moving objects; conversely, the larger the shutter speed, the longer the exposure time of the image, suitable for shooting slow or stationary objects .
  • the electronic device can obtain the shutter speed set by the user. Specifically, after the electronic device starts the shutter priority mode, it can generate a shutter speed selection slider on the display screen. The user can select the corresponding shutter speed through the slider. The electronic device can Gets the user speed selected by the user. The electronic device can also obtain a preset shutter speed.
  • the electronic device may set shutter speeds corresponding to different preset tags according to the movement speed of different dynamic scenes.
  • the electronic device may obtain the corresponding shutter speed according to the preset tags included in the image to be captured.
  • the electronic device can set the shutter speed of the dog scene tag with a faster movement speed to 1/500 second, and the shutter speed of a slower movement such as the baby scene tag with 1/125 second.
  • the electronic device detects the image to be captured,
  • the shutter priority mode is activated, and the shutter speed corresponding to the dog scene tag is 1/500 second, and the image to be captured is taken.
  • the electronic device performs scene detection on the image to be captured to obtain a corresponding scene label.
  • the scene label of the image to be captured includes a preset label
  • the shutter priority mode is activated to obtain the set shutter speed
  • the automatic metering system is activated according to the shutter priority mode.
  • the determined exposure amount and shutter speed determine the size of the aperture and shoot the image to be captured.
  • scene detection of an image to be captured is performed to obtain a scene label of the image to be captured.
  • a shutter priority mode is activated and a shutter speed is obtained.
  • Priority mode and shutter speed are used to shoot the image to be captured. Since the image to be captured can be detected, the shutter priority mode is activated when the scene label of the image to be captured contains a preset label, and the shutter speed is obtained for shooting, so that you can capture the clear image you need, avoiding missing when setting the high-speed shooting mode Needed images.
  • scene detection is performed on an image to be captured, and a process of obtaining scene tags of the image to be captured further includes: performing scene detection on the image to be captured to obtain multiple scene tags of the image to be captured.
  • Electronic devices can train neural networks that can output multiple scene labels.
  • a training image containing multiple training labels may be input into the neural network, and the neural network performs feature extraction on the training image and detects the extracted image features to obtain predictions corresponding to each feature in the image.
  • Confidence degree, the loss function is obtained according to the predicted confidence degree and true confidence degree of the feature, and the parameters of the neural network are adjusted according to the loss function, so that the trained neural network can subsequently identify the scene labels corresponding to multiple features of the image at the same time, thereby obtaining the output Neural network with multiple scene tags.
  • Confidence is the degree of confidence in the measured value of the parameter being measured.
  • the true confidence level indicates the confidence level of the specified scene category to which the feature labeled in advance in the training image belongs.
  • Electronic devices can also train neural networks that can achieve both scene classification and target detection.
  • a training image including at least one background training target and a foreground training target may be input into the neural network, and the neural network performs feature extraction based on the background training target and the foreground training target, and performs background extraction on the background training target.
  • the first true confidence level indicates the confidence level of the specified image category to which the background image previously labeled in the training image belongs.
  • the second true confidence level indicates the confidence level of the specified target category to which the foreground target previously labeled in the training image belongs.
  • the neural network includes at least one input layer, a basic network layer, a classification network layer, a target detection network layer, and two output layers, and the two output layers include a first output layer cascaded with the classification network layer. And a second output layer cascaded with the target detection network layer; wherein, during the training phase, the input layer is used to receive the training image, and the first output layer is used to output the specified scene category to which the background image detected by the classification network layer belongs The first prediction confidence of; the second output layer is used to output the offset parameter of each preselected default bounding box detected by the target detection network layer relative to the real bounding box corresponding to the specified target and the specified target category The second prediction confidence.
  • FIG. 3 is a schematic structural diagram of a neural network in an embodiment.
  • the input layer of the neural network receives training images with image category labels, performs feature extraction through a basic network (such as a VGG network), and outputs the extracted image features to a feature layer, and the feature layer pairs the image
  • a basic network such as a VGG network
  • the first loss function is obtained by performing category detection
  • the second loss function is obtained by performing target detection on the foreground target based on image characteristics
  • the position loss function is obtained by performing position detection on the foreground target according to the foreground target.
  • the first loss function, the second loss function, and the position The loss function is weighted and summed to obtain the target loss function.
  • the neural network includes a data input layer, a basic network layer, a scene classification network layer, an object detection network layer, and two output layers.
  • the data input layer is used to receive raw image data.
  • the basic network layer performs preprocessing and feature extraction on the image input from the input layer.
  • the pre-processing may include de-averaging, normalization, dimensionality reduction, and whitening processes.
  • De-averaging refers to centering all dimensions of the input data to 0 in order to pull the center of the sample back to the origin of the coordinate system.
  • Normalization is normalizing the amplitude to the same range.
  • Whitening refers to normalizing the amplitude on each characteristic axis of the data.
  • Image data is used for feature extraction. For example, the first five layers of VGG16 convolutional layers are used for feature extraction of the original image, and the extracted features are input to the classification network layer and the target detection network layer.
  • deep convolution such as Mobilenet network and point convolution can be used to detect features, and then input to the output layer to obtain the first prediction confidence level of the specified image category to which the image scene classification belongs, and then according to the first prediction confidence level and The first true confidence is calculated to obtain the first loss function.
  • the target detection network layer can be an SSD network, and the convolutional feature layers are concatenated after the first 5 layers of the VGG16 convolution layer.
  • a set of convolutional feature layers is used.
  • a convolution filter is used to predict the offset parameter of the preselected default bounding box corresponding to the specified target category from the real bounding box and the second prediction confidence corresponding to the specified target category.
  • the area of interest is the area of the preselected default bounding box.
  • a position loss function is constructed according to the offset parameter, and a second loss function is obtained according to a difference between the second predicted confidence level and the second true confidence level.
  • the target loss function is obtained by weighting and summing the first loss function, the second loss function, and the position loss function, and the back propagation algorithm is used to adjust the parameters of the neural network according to the target loss function to train the neural network.
  • the neural network input layer receives the input image to be captured, extracts the characteristics of the image to be captured, and inputs it to the classification network layer for image scene recognition.
  • the softmax classifier is used in the first output layer. The confidence of each specified scene category to which the background image belongs is output, and the image scene with the highest confidence and exceeding the confidence threshold is selected as the scene classification label to which the background image of the image to be captured belongs. The features of the extracted image to be captured are input to the target detection network layer for foreground target detection.
  • the softmax classifier is used to output the confidence level and corresponding position of the specified target category to which the foreground target belongs. The highest confidence level is selected and exceeds the confidence level.
  • the target category of the degree threshold is used as the target classification label to which the foreground target in the image to be captured belongs, and the position corresponding to the target classification label is output. Use the obtained scene classification label and target classification label as the scene label of the image.
  • the provided image processing method further includes operations 402 to 408. among them:
  • Operation 402 Perform scene detection on the image to be captured to obtain multiple scene tags of the image to be captured.
  • a label area corresponding to the preset label is obtained.
  • An image detection model such as a neural network can output the scene label of the image and the position corresponding to the scene label after detecting the image.
  • the scene label of the image to be captured may be one or more, and the electronic device may obtain the label area corresponding to the preset label in the image to be captured.
  • the label area corresponding to the preset label may also be one or more. For example, when a dog scene tag and a blue sky scene tag are included in an image to be captured, if the preset tag is a dog scene tag, the electronic device can obtain a corresponding position of the dog scene tag in the image to be captured as a label area, and the image to be captured There can be multiple tag areas corresponding to the middle dog scene tags.
  • a shutter priority mode is activated.
  • the electronic device can detect the area of the label area according to the position of the label area in the image to be captured.
  • the area of the label area corresponding to the preset label may be the area of the label area corresponding to each preset label in the image to be captured, or may be the sum of the areas of the label areas corresponding to all the preset labels in the image to be captured.
  • the area of the image to be captured can be calculated from the height and width of the image to be captured.
  • the electronic device can directly read the height and width of the image to be captured, and calculate the area of the image to be captured.
  • the threshold may be determined according to actual requirements, and may be, for example, 05, 0.6, 0.7, and the like are not limited thereto.
  • the electronic device may activate the shutter priority mode of the electronic device when the ratio of the area of the label region corresponding to the preset label in the image to be captured to the area of the image to be captured exceeds a threshold.
  • Operation 408 Obtain a shutter speed, and shoot an image to be captured according to the shutter priority mode and the shutter speed.
  • the electronic device can determine that the subject of the image to be captured is in the label region, thereby activating the shutter priority mode, obtaining the shutter speed, and according to the shutter priority mode And shutter speed to shoot the image to be captured, you can shoot the clear image you need, avoiding the need to miss the image you need to shoot because you need to manually set the high-speed shooting mode.
  • the shutter priority mode is not activated for shooting.
  • the provided image processing method further includes:
  • Operation 502 Obtain a label area corresponding to a preset label in an image to be captured.
  • Operation 504 Focus the label area, and after the focusing, shoot the image to be captured according to the shutter priority mode and the shutter speed.
  • Focusing refers to the process of making the image of the subject clear by adjusting the distance between the imaging device and the focus in the electronic device.
  • the electronic device focuses on the label area.
  • the focus can be achieved by laser focusing, phase focusing, contrast focusing, and the like, and the focusing method is not limited to this.
  • the electronic device When the scene label of the image to be captured includes a preset label, the electronic device obtains a label area corresponding to the preset label, focuses on the label area corresponding to the preset label, and performs focusing on the image to be captured according to the activated shutter priority mode and shutter speed after focusing. Shooting can make the area corresponding to the preset label in the captured image clearer and improve the shooting effect of the image.
  • the provided image processing method further includes operations 602 to 604. among them:
  • Operation 602 Obtain a label area with the largest area in the image to be captured.
  • the electronic device can obtain the label area corresponding to each scene label in the image to be captured, calculate the area size of each label area, and obtain the label area with the largest area from it.
  • the electronic device may also obtain the label area corresponding to the preset label in the image to be captured, calculate the area size of the label area corresponding to each preset label, and obtain the label area with the largest area from it.
  • Operation 604 Focus on the label area with the largest area, and after the focusing, shoot the image to be captured according to the shutter priority mode and shutter speed.
  • the electronic device acquires the label area with the largest area in the image to be captured, and focuses on the label area with the largest area. After focusing, the image to be captured is captured according to the shutter priority mode and shutter speed, and the label area with the largest area can be increased while increasing the shutter speed Focusing can capture the required image and make the shooting effect of the largest label area in the captured image clearer.
  • the provided image processing method further includes operations 702 to 704. among them:
  • Operation 702 Obtain a label area corresponding to a preset label in an image to be captured.
  • the eyes in the label area are focused, and after focusing, the image to be captured is captured according to the shutter priority mode and the shutter speed.
  • the electronic device may obtain a label area corresponding to a preset label in the image to be captured, and perform key point detection on the label area corresponding to the preset label.
  • the electronic device can use the dlib algorithm to perform key point detection.
  • the point coordinates of the eyes in the training image can be obtained, and the point coordinates are labeled with key points.
  • the dlib algorithm is used to train the training image. Therefore, the electronic device detects the label area corresponding to the preset label using the trained key point detection algorithm after acquiring the label area corresponding to the preset label in the image to be captured, and can output the detected eye keypoint mark.
  • the electronic device may also use ASM (Active Shape Models) -based models, cascade shape regression models, and deep learning algorithms such as DCNN (Dynamic Convolutional Neural Network) to perform key points. Detection. The electronic device detects the label area corresponding to the preset label in the captured image, which can improve the efficiency of key point detection.
  • ASM Active Shape Models
  • cascade shape regression models such as cascade shape regression models
  • DCNN Dynamic Convolutional Neural Network
  • the electronic device When the label area corresponding to the preset label does not include eyes, the electronic device focuses on the label area and can capture a clearer image of the label area. When the electronic device detects that the label area corresponding to the preset label contains eyes, the electronic device focuses on the eyes in the label area. After focusing, the image to be captured is captured according to the shutter priority mode and shutter speed, and an image with the eye as the focus can be obtained. Makes captured images more vivid. For example, when the preset label included in the image to be captured is a baby scene label, the electronic device determines that the image to be captured includes eyes and obtains the corresponding eye position through keypoint detection, and focuses and shoots the eyes of the image to be captured. The image can show the baby's agility.
  • an image processing method provided further includes: the preset tag includes at least one of a cat scene tag and a dog scene tag.
  • scene detection can be performed on an image to be captured to obtain a scene label of the image.
  • the scene label of the image to be captured includes at least one of a cat scene label and a dog scene label
  • the shutter is automatically activated. Priority mode, and obtain the set shutter speed to shoot the image to be captured. Since there is no need to manually set the shooting mode, you can avoid missing wonderful pictures of cats and dogs and obtain clear images.
  • the electronic device when the electronic device detects that the image to be captured contains at least one of a cat scene tag and a dog scene tag, it may also obtain a tag area corresponding to the scene tag, and detect the eyes of the cat or the dog in the tag area. Where the eyes are, after focusing on the eyes, the image is captured according to the shutter priority mode and shutter speed, so that the shooting focus can be on the eyes of cats and dogs, and an image showing the flexibility of cats and dogs can be obtained.
  • an image processing method is provided, and specific operations for implementing the method are as follows:
  • the electronic device performs scene detection on an image to be captured to obtain a scene label of the image to be captured.
  • the image to be captured refers to the image generated by the electronic device by capturing the current scene in real time through the imaging device.
  • the electronic device performs scene recognition on the image to be captured.
  • the scene recognition model can be trained according to deep learning algorithms such as VGG, CNN, SSD, and decision tree, and the scene to be captured is recognized based on the scene recognition model.
  • the scene of the image can be landscape, beach, blue sky, green grass, snow, fireworks, spotlight, text, portrait, baby, cat, dog, food, etc.
  • the electronic device may perform scene recognition according to the scene recognition model, and determine a scene label of the image to be captured according to the scene recognition result.
  • the electronic device performs scene detection on the image to be captured to obtain multiple scene tags of the image to be captured.
  • the electronic device can train a neural network that can achieve scene classification and target detection at the same time, use the basic network layer of the neural network to extract features from the image, input the extracted image features to the classification network and the target detection network layer, and perform classification detection through the classification network
  • the confidence level of the specified classification category to which the background area of the image belongs is output.
  • the confidence level of the specified target category to which the foreground area belongs is obtained through the target detection network layer.
  • the target category with the highest confidence level and exceeding the confidence threshold is selected as the foreground target in the image.
  • the classification label and the target label are used as scene labels of the image to be captured.
  • the electronic device activates a shutter priority mode
  • the preset tag is a tag corresponding to a dynamic scene.
  • a dynamic scene is a scene that contains objects that can move at high speed.
  • the preset label refers to a label corresponding to a preset dynamic scene.
  • the preset tag includes at least one of a cat scene tag and a dog scene tag.
  • the electronic device can perform scene detection on the image to be captured to obtain a scene label of the image to be captured.
  • the scene label of the image to be captured includes at least one of a cat scene label and a dog scene label
  • the shutter priority mode is automatically activated, and the setting is obtained.
  • a fixed shutter speed is used to shoot the image to be captured. Since there is no need to manually set the shooting mode, you can avoid missing wonderful pictures of cats and dogs and obtain clear images.
  • the electronic device obtains a tag area corresponding to the preset tag, and starts when a ratio of an area of the tag area corresponding to the preset tag to an area of the image to be captured exceeds a threshold.
  • Shutter priority mode When the area of the label region in the image to be captured and the area of the image to be captured exceed the threshold, the electronic device can determine that the subject of the image to be captured is in the label region, thereby activating the shutter priority mode, obtaining the shutter speed, and according to the shutter priority mode and the shutter Speed to shoot the image you want to capture, you can shoot the clear image you need, avoiding the need to miss the image you need to shoot because you need to manually set the high-speed shooting mode.
  • the electronic device acquires a shutter speed, and shoots an image to be captured according to the shutter priority mode and the shutter speed.
  • the electronic device can obtain the shutter speed set by the user. Specifically, after the electronic device starts the shutter priority mode, it can generate a shutter speed selection slider on the display screen. The user can select the corresponding shutter speed through the slider. The electronic device can Gets the user speed selected by the user.
  • the electronic device can also obtain a preset shutter speed. Specifically, the electronic device may set shutter speeds corresponding to different preset tags according to the movement speed of different dynamic scenes. When the shutter priority mode is activated, the electronic device may obtain the corresponding shutter speed according to the preset tags included in the image to be captured.
  • the electronic device can obtain the set shutter speed, determine the aperture size according to the exposure amount and shutter speed determined by the automatic metering system when the shutter priority mode is activated, and shoot the image to be captured.
  • the electronic device performs focusing on a label area corresponding to a preset label in the image to be captured, and after focusing, shoots the image to be captured according to a shutter priority mode and a shutter speed.
  • the electronic device obtains a label area corresponding to the preset label, focuses on the label area corresponding to the preset label, and performs focusing on the image to be captured according to the activated shutter priority mode and shutter speed after focusing.
  • Shooting can make the area corresponding to the preset label in the captured image clearer and improve the shooting effect of the image.
  • the electronic device acquires the label area with the largest area in the image to be captured, focuses the label area with the largest area, and after the focusing, shoots the image to be captured according to the shutter priority mode and shutter speed.
  • the electronic device acquires the label area with the largest area in the image to be captured, and focuses on the label area with the largest area.
  • the image to be captured is captured according to the shutter priority mode and shutter speed, and the label area with the largest area can be increased while increasing the shutter speed Focusing can capture the required image and make the shooting effect of the largest label area in the captured image clearer.
  • the electronic device when it is detected through the key point that the label region contains eyes, the electronic device focuses the eyes in the label region, and after focusing, the image to be captured is captured according to the shutter priority mode and the shutter speed.
  • the electronic device can obtain a label area corresponding to a preset label in the image to be captured, perform key point detection on the label area corresponding to the preset label, and detect that the label area corresponding to the preset label includes eyes, and detect the eyes in the label area. Focusing is performed. After focusing, the image to be captured is captured according to the shutter priority mode and the shutter speed, and an image focused on the eye is obtained, which can make the captured image more vivid.
  • FIGS. 2 and 4-7 are sequentially displayed in accordance with the instructions of the arrows, these operations are not necessarily performed sequentially in the order indicated by the arrows. Unless explicitly stated in this article, there is no strict order in which these operations can be performed, and these operations can be performed in other orders. Moreover, at least a part of the operations in FIGS. 2 and 4-7 may include multiple sub-operations or multiple phases. These sub-operations or phases are not necessarily performed at the same time, but may be performed at different times. Or the execution order of the phases is not necessarily performed sequentially, but may be performed in turn or alternately with other operations or at least a part of the sub-operations or phases of other operations.
  • FIG. 8 is a structural block diagram of an image processing apparatus according to an embodiment. As shown in FIG. 8, an image processing apparatus includes an image detection module 820, a mode activation module 840, and a photographing module 860. among them:
  • the image detection module 820 is configured to perform scene detection on an image to be captured to obtain a scene label of the image to be captured.
  • the mode activation module 840 is configured to activate the shutter priority mode when the scene label includes a preset label, and the preset label is a label corresponding to a dynamic scene.
  • the shooting module 860 is configured to obtain a shutter speed and shoot an image to be captured according to a shutter priority mode and a shutter speed.
  • the image detection module 820 may be further configured to perform scene detection on an image to be captured to obtain multiple scene tags of the image to be captured.
  • the image detection module 820 may be further configured to obtain a label area corresponding to a preset label when a plurality of scene labels include a preset label; the mode activation module 840 may also be configured to use a label corresponding to the preset label.
  • the shutter priority mode is activated; the shooting module 860 may also be used to obtain a shutter speed and shoot the image to be captured according to the shutter priority mode and the shutter speed.
  • the image detection module 820 may be further configured to obtain a label area corresponding to a preset label in an image to be captured; the shooting module 860 may also be used to focus the label area, and after the focus is treated according to the shutter priority mode and the shutter speed Take an image and shoot.
  • the image detection module 820 can also be used to obtain the label area with the largest area in the image to be captured; the shooting module 860 can also be used to focus the label area with the largest area. After focusing, according to the shutter priority mode and shutter speed Take pictures to be taken.
  • the image detection module 820 may be further configured to obtain a label area corresponding to a preset label in the image to be captured; the shooting module 860 may also be configured to detect the label area through the key point when the label area includes eyes. The eyes in focus are focused. After focusing, the image to be captured is captured according to the shutter priority mode and shutter speed.
  • the mode activation module 840 may be further configured to activate the shutter priority mode when the scene tag includes a preset tag, and the preset tag includes at least one of a cat scene tag and a dog scene tag.
  • each module in the above image processing apparatus is for illustration only. In other embodiments, the image processing apparatus may be divided into different modules as needed to complete all or part of the functions of the above image processing apparatus.
  • Each module in the image processing apparatus may be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the hardware in or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • each module in the image processing apparatus provided in the embodiments of the present application may be in the form of a computer program.
  • the computer program can be run on a terminal or a server.
  • the program module constituted by the computer program can be stored in the memory of the terminal or server.
  • the computer program is executed by a processor, the operations of the method described in the embodiments of the present application are implemented.
  • An embodiment of the present application further provides a computer-readable storage medium.
  • One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the operations of the image processing method.
  • a computer program product containing instructions that, when run on a computer, causes the computer to perform an image processing method.
  • An embodiment of the present application further provides an electronic device.
  • the above electronic device includes an image processing circuit.
  • the image processing circuit may be implemented by hardware and / or software components, and may include various processing units that define an ISP (Image Signal Processing) pipeline.
  • FIG. 9 is a schematic diagram of an image processing circuit in one embodiment. As shown in FIG. 9, for ease of description, only aspects of the image processing technology related to the embodiments of the present application are shown.
  • the image processing circuit includes an ISP processor 940 and a control logic 950.
  • the image data captured by the imaging device 910 is first processed by the ISP processor 940, which analyzes the image data to capture image statistical information that can be used to determine and / or one or more control parameters of the imaging device 910.
  • the imaging device 910 may include a camera having one or more lenses 912 and an image sensor 914.
  • the image sensor 914 may include a color filter array (such as a Bayer filter).
  • the image sensor 914 may obtain light intensity and wavelength information captured with each imaging pixel of the image sensor 914, and provide a set of raw data that can be processed by the ISP processor 940 Image data.
  • the sensor 920 may provide parameters (such as image stabilization parameters) of the acquired image processing to the ISP processor 940 based on the interface type of the sensor 920.
  • the sensor 920 interface may use a SMIA (Standard Mobile Imaging Architecture) interface, other serial or parallel camera interfaces, or a combination of the foregoing interfaces.
  • SMIA Standard Mobile Imaging Architecture
  • the image sensor 914 may also send the original image data to the sensor 920, and the sensor 920 may provide the original image data to the ISP processor 940 based on the interface type of the sensor 920, or the sensor 920 stores the original image data in the image memory 930.
  • the ISP processor 940 processes the original image data pixel by pixel in a variety of formats.
  • each image pixel may have a bit depth of 8, 10, 12, or 14 bits, and the ISP processor 940 may perform one or more image processing operations on the original image data and collect statistical information about the image data.
  • the image processing operations may be performed with the same or different bit depth accuracy.
  • the ISP processor 940 may also receive image data from the image memory 930.
  • the sensor 920 interface sends the original image data to the image memory 930, and the original image data in the image memory 930 is then provided to the ISP processor 940 for processing.
  • the image memory 930 may be a part of a memory device, a storage device, or a separate dedicated memory in an electronic device, and may include a DMA (Direct Memory Access) feature.
  • DMA Direct Memory Access
  • the ISP processor 940 may perform one or more image processing operations, such as time-domain filtering.
  • the processed image data may be sent to the image memory 930 for further processing before being displayed.
  • the ISP processor 940 receives processing data from the image memory 930 and performs image data processing on the processing data in the original domain and in the RGB and YCbCr color spaces.
  • the image data processed by the ISP processor 940 may be output to the display 970 for viewing by the user and / or further processed by a graphics engine or a GPU (Graphics Processing Unit).
  • the output of the ISP processor 940 can also be sent to the image memory 930, and the display 970 can read image data from the image memory 930.
  • the image memory 930 may be configured to implement one or more frame buffers.
  • the output of the ISP processor 940 may be sent to an encoder / decoder 960 to encode / decode image data.
  • the encoded image data can be saved and decompressed before being displayed on the display 970 device.
  • the encoder / decoder 960 may be implemented by a CPU or a GPU or a coprocessor.
  • the statistical data determined by the ISP processor 940 may be sent to the control logic 950 unit.
  • the statistical data may include image information of the image sensor 914 such as auto exposure, auto white balance, auto focus, flicker detection, black level compensation, and lens 912 shading correction.
  • the control logic 950 may include a processor and / or a microcontroller that executes one or more routines (such as firmware). The one or more routines may determine the control parameters of the imaging device 910 and the ISP processing according to the received statistical data. Parameters of the controller 940.
  • control parameters of the imaging device 910 may include sensor 920 control parameters (such as gain, integration time for exposure control, image stabilization parameters, etc.), camera flash control parameters, lens 912 control parameters (such as focus distance for focusing or zooming), or these A combination of parameters.
  • ISP control parameters may include gain levels and color correction matrices for automatic white balance and color adjustment (eg, during RGB processing), and lens 912 shading correction parameters.
  • the electronic device can implement the image processing method described in the embodiment of the present application according to the image processing technology.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM), which is used as external cache memory.
  • RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDR, SDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR dual data rate SDRAM
  • SDRAM enhanced SDRAM
  • SLDRAM synchronous Link (Synchlink) DRAM
  • SLDRAM synchronous Link (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Ophthalmology & Optometry (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

一种图像处理方法,包括:对待拍摄图像进行场景检测,得到待拍摄图像的场景标签,当场景标签中包含预设标签时,启动快门优先模式,预设标签为动态场景所对应的标签,获取快门速度,根据快门优先模式与快门速度对待拍摄图像进行拍摄。

Description

图像处理方法、电子设备、计算机可读存储介质
相关申请的交叉引用
本申请要求于2018年06月15日提交中国专利局、申请号为2018106186286、发明名称为“图像处理方法和装置、电子设备、计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别是涉及一种图像处理方法、电子设备、计算机可读存储介质。
背景技术
随着计算机技术的快速发展,使用移动设备拍摄照片的现象越来越频繁。当人们想拍摄猫、狗等运动速度较大的物体时,可以通过在相机中将拍摄模式设置为高速摄影模式,从而拍摄到较为清晰的图像。
然而,传统技术中存在难以及时拍摄到需要的图像的问题。
发明内容
根据本申请的各种实施例提供一种图像处理方法、电子设备、计算机可读存储介质。
一种图像处理方法,包括:
对待拍摄图像进行场景检测,得到所述待拍摄图像的场景标签;
当所述场景标签中包含预设标签时,启动快门优先模式,所述预设标签为动态场景所对应的标签;及
获取快门速度,根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄。
一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下操作:
对待拍摄图像进行场景检测,得到所述待拍摄图像的场景标签;
当所述场景标签中包含预设标签时,启动快门优先模式,所述预设标签为动态场景所对应的标签;及
获取快门速度,根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄。
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如下操作:
对待拍摄图像进行场景检测,得到所述待拍摄图像的场景标签;
当所述场景标签中包含预设标签时,启动快门优先模式,所述预设标签为动态场景所对应的标签;及
获取快门速度,根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄。
本申请实施例提供的图像处理方法、电子设备、计算机可读存储介质,通过对待拍摄图像进行场景检测,得到待拍摄图像的场景标签,当场景标签中包含预设标签时,启动快门优先模式,预设标签为动态场景所对应的标签,获取快门速度,根据快门优先模式与快门速度对待拍摄图像进行拍摄。由于可以在待拍摄图像包含动态场景时启动快门优先模式进行拍摄,可以拍摄到需要的图像。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本发明的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一个或多个实施例中电子设备的内部结构示意图。
图2为一个或多个实施例中图像处理方法的流程图。
图3为一个或多个实施例中神经网络的架构示意图。
图4为另一个或多个实施例中图像处理方法的流程图。
图5为又一个或多个实施例中图像处理方法的流程图。
图6为一个或多个实施例中图像处理方法的流程图。
图7为另一个或多个实施例中图像处理方法的流程图。
图8为一个或多个实施例中图像处理装置的结构框图。
图9为一个或多个实施例中图像处理电路的示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
图1为一个实施例中电子设备的内部结构示意图。如图1所示,该电子设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该处理器用于提供计算和控制能力,支撑整个电子设备的运行。存储器用于存储数据、程序等,存储器上存储至少一个计算机程序,该计算机程序可被处理器执行,以实现本申请实施例中提供的适用于电子设备的无线网络通信方法。存储器可包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序可被处理器所执行,以用于实现以下各个实施例所提供的一种图像处理方法。内存储器为非易失性存储介质中的操作系统计算机程序提供高速缓存的运行环境。网络接口可以是以太网卡或无线网卡等,用于与外部的电子设备进行通信。该电子设备可以是手机、平板电脑或者个人数字助理或穿戴式设备等。
图2为一个实施例中图像处理方法的流程图。本实施例中的图像处理方法,以运行于图1中的电子设备上为例进行描述。如图2所示,图像处理方法包括操作202至操作206。
操作202,对待拍摄图像进行场景检测,得到待拍摄图像的场景标签。
待拍摄图像是指电子设备通过成像设备实时捕捉当前场景的画面生成的。待拍摄图像可以实时展示在电子设备的显示屏上。电子设备对待拍摄图像进行场景识别,可以根据VGG(Visual Geometry Group)、CNN(Convolutional Neural Network)、SSD(single shot multibox detector)、决策树(Decision Tree)等深度学习算法训练场景识别模型,根据场景识别模型对待拍摄图像进行场景识别。场景识别模型一般包括输入层、隐层和输出层;输入层用于接收图像的输入;隐层用于对接收到的图像进行处理;输出层用于输出对图像处理的最终结果即输出图像的场景识别结果。
图像的场景可以是风景、海滩、蓝天、绿草、雪景、烟火、聚光灯、文本、人像、婴儿、猫、狗、美食等。待拍摄图像的场景标签是指对待拍摄图像的场景标记。具体地,电子设备可以根据待拍摄图像的场景识别结果确定待拍摄图像的场景标签。例如,当待拍摄图像的场景识别结果为蓝天时,则图像的场景标签为蓝天。
电子设备可以在获取成像设备捕捉的待拍摄图像后,根据场景识别模型对待拍摄图像进行场景识别,并根据场景识别结果确定待拍摄图像的场景标签。
操作204,当场景标签中包含预设标签时,启动快门优先模式,预设标签为动态场景 所对应的标签。
动态场景是指包含可高速运动的物体的场景。预设标签是指预先设定的动态场景所对应的标签。具体地,动态场景可以包括猫、狗、烟火、婴儿等,则对应的预设标签可以包括猫场景标签、狗场景标签、烟火场景标签、婴儿场景标签等,不限于此。场景标签中包含的预设标签可以是一个,也可以是多个。例如,待拍摄图像中可以包含狗场景标签和猫场景标签两个预设标签。快门优先模式是指由设备自动测光系统计算出曝光量的值,然后根据选定的快门速度自动决定用多大的光圈的一种拍摄模式。快门优先模式主要应用于拍摄运动的物体,可以获取清晰的拍摄主体。
电子设备在待拍摄图像的场景标签中包含预设标签时,启动快门优先模式进行拍摄。
操作206,获取快门速度,根据快门优先模式与快门速度对待拍摄图像进行拍摄。
快门速度是指拍摄图像时,快门由全开到全关的时间。快门速度决定曝光时间的长短。具体地,快门速度越小,则图像的曝光时间越短,适合拍摄运动速度越快的物体;反之,快门速度越大,则图像的曝光时间越长,适合拍摄运动速度较小或静止的物体。电子设备可以获取由用户设定的快门速度,具体地,电子设备在启动快门优先模式后,可以在显示屏上生成快门速度选择滑动条,用户可以通过滑动条选择对应的快门速度,电子设备可以获取用户选定的用户速度。电子设备也可以获取预设的快门速度。具体地,电子设备可以根据不同动态场景的运动速度设定不同的预设标签对应的快门速度,当启动快门优先模式时,电子设备可以根据待拍摄图像包含的预设标签获取对应的快门速度。例如,电子设备可以设定运动速度较快的狗场景标签的快门速度为1/500秒,运动速度较慢的如婴儿场景标签的快门速度为1/125秒,当电子设备检测到待拍摄图像中包含狗场景标签时,启动快门优先模式,并获取狗场景标签对应的快门速度即1/500秒,对待拍摄图像进行拍摄。
电子设备对待拍摄图像进行场景检测得到对应的场景标签,当待拍摄图像的场景标签包含预设标签时,启动快门优先模式,获取设定的快门速度,并根据启动快门优先模式时自动测光系统确定的曝光量和快门速度确定光圈的大小,对待拍摄图像进行拍摄。
本申请提供的实施例中,通过对待拍摄图像进行场景检测,得到待拍摄图像的场景标签,当场景标签中包含动态场景所对应的预设标签时,启动快门优先模式并获取快门速度,根据快门优先模式与快门速度对待拍摄图像进行拍摄。由于可以对待拍摄图像进行检测,在待拍摄图像的场景标签包含预设标签时启动快门优先模式,并获取快门速度进行拍摄,从而可以拍摄到需要的清晰的图像,避免在设置高速拍摄模式时错过需要的图像。
在一个实施例中,提供的图像处理方法中对待拍摄图像进行场景检测,得到待拍摄图像的场景标签的过程还包括:对待拍摄图像进行场景检测,得到待拍摄图像的多个场景标签。
电子设备可以训练可以输出多个场景标签的神经网络。具体地,在神经网络训练过程中,可以将包含多个训练标签的训练图像输入到神经网络中,神经网络对训练图像进行特征提取,对提取的图像特征进行检测得到图像中各个特征对应的预测置信度,根据特征的预测置信度和真实置信度得到损失函数,根据损失函数对神经网络的参数进行调整,使得训练的神经网络后续可同时识别图像的多个特征对应的场景标签,从而得到输出多个场景标签的神经网络。置信度是被测量参数的测量值的可信程度。真实置信度表示在该训练图像中预先标注的特征所属指定场景类别的置信度。
电子设备还可以训练可同时实现场景分类和目标检测的神经网络。具体地,在神经网络训练过程中,可以将包含有至少一个背景训练目标和前景训练目标的训练图像输入到神经网络中,神经网络根据背景训练目标和前景训练目标进行特征提取,对背景训练目标进行检测得到第一预测置信度,根据第一预测置信度和第一真实置信度得到第一损失函数,对前景训练目标进行检测得到第二预测置信度,根据第二预测置信度和第二真实置信度得到第二损失函数,根据第一损失函数和第二损失函数得到目标损失函数,对神经网络 的参数进行调整,使得训练的神经网络后续可同时识别出场景分类和目标分类,将场景分类和目标分类作为图像的场景标签,从而得到可以同时对图像的前景区域和背景区域进行检测的神经网络。置信度是被测量参数的量值的可信程度。该第一真实置信度表示在该训练图像中预先标注的背景图像所属指定图像类别的置信度。第二真实置信度表示在该训练图像中预先标注的前景目标所属指定目标类别的置信度。
在一个实施例中,上述神经网络包括至少一个输入层、基础网络层、分类网络层、目标检测网络层和两个输出层,该两个输出层包括与该分类网络层级联的第一输出层和与该目标检测网络层级联的第二输出层;其中,在训练阶段,该输入层用于接收该训练图像,该第一输出层用于输出该分类网络层检测的背景图像所属指定场景类别的第一预测置信度;该第二输出层用于输出该目标检测网络层检测的每个预选的默认边界框所属相对于指定目标所对应的真实边界框的偏移量参数和所属指定目标类别的第二预测置信度。图3为一个实施例中神经网络的架构示意图。如图3所示,神经网络的输入层接收带有图像类别标签的训练图像,通过基础网络(如VGG网络)进行特征提取,并将提取的图像特征输出给特征层,由该特征层对图像进行类别检测得到第一损失函数,对前景目标根据图像特征进行目标检测得到第二损失函数,对前景目标根据前景目标进行位置检测得到位置损失函数,将第一损失函数、第二损失函数和位置损失函数进行加权求和得到目标损失函数。神经网络包括数据输入层、基础网络层、场景分类网络层、目标检测网络层和两个输出层。数据输入层用于接收原始图像数据。基础网络层对输入层输入的图像进行预处理以及特征提取。该预处理可包括去均值、归一化、降维和白化处理。去均值是指将输入数据各个维度都中心化为0,目的是将样本的中心拉回到坐标系原点上。归一化是将幅度归一化到同样的范围。白化是指对数据各个特征轴上的幅度归一化。图像数据进行特征提取,例如利用VGG16的前5层卷积层对原始图像进行特征提取,再将提取的特征输入到分类网络层和目标检测网络层。在分类网络层可采用如Mobilenet网络的深度卷积、点卷积对特征进行检测,然后输入到输出层得到图像场景分类所属指定图像类别的第一预测置信度,然后根据第一预测置信度与第一真实置信度求差得到第一损失函数;在目标检测网络层可采用如SSD网络,在VGG16的前5层的卷积层后级联卷积特征层,在卷积特征层使用一组卷积滤波器来预测指定目标类别所对应的预选默认边界框相对于真实边界框的偏移量参数和指定目标类别所对应的第二预测置信度。感兴趣区域为预选默认边界框的区域。根据偏移量参数构建位置损失函数,根据第二预测置信度与第二真实置信度的差异得到第二损失函数。将第一损失函数、第二损失函数和位置损失函数加权求和得到目标损失函数,根据目标损失函数采用反向传播算法调整神经网络的参数,对神经网络进行训练。
采用训练好的神经网络对待拍摄图像进行识别时,神经网络输入层接收输入的待拍摄图像,提取待拍摄图像的特征,输入到分类网络层进行图像场景识别,在第一输出层通过softmax分类器输出背景图像所属各个指定场景类别的置信度,选取置信度最高且超过置信度阈值的图像场景作为该待拍摄图像的背景图像所属的场景分类标签。将提取的待拍摄图像的特征输入到目标检测网络层进行前景目标检测,在第二输出层通过softmax分类器输出前景目标所属指定目标类别的置信度及对应的位置,选取置信度最高且超过置信度阈值的目标类别作为该待拍摄图像中前景目标所属的目标分类标签,并输出该目标分类标签对应的位置。将得到的场景分类标签和目标分类标签作为图像的场景标签。
如图4所示,在一个实施例中,提供的图像处理方法还包括操作402至操作408。其中:
操作402,对待拍摄图像进行场景检测,得到待拍摄图像的多个场景标签。
操作404,当多个场景标签中包含预设标签时,获取预设标签对应的标签区域。
神经网络等图像检测模型对图像进行检测后可以输出图像的场景标签及场景标签对应的位置。待拍摄图像的场景标签可以是1个或多个,电子设备可以获取待拍摄图像中预 设标签对应的标签区域,对应地,预设标签对应的标签区域也可以是1个或多个。例如,当待拍摄图像中包含狗场景标签、蓝天场景标签时,若预设标签为狗场景标签时,则电子设备可以获取狗场景标签在待拍摄图像中对应的位置作为标签区域,待拍摄图像中狗场景标签对应的标签区域可以有多个。
操作406,当预设标签对应的标签区域的面积与待拍摄图像的面积的比值超过阈值时,启动快门优先模式。
电子设备可以根据标签区域在待拍摄图像中的位置检测标签区域的面积。具体地,预设标签对应的标签区域的面积可以是待拍摄图像中各个预设标签对应的标签区域的面积,也可以是待拍摄图像中所有预设标签对应的标签区域的面积相加的和。待拍摄图像的面积可以由待拍摄图像的高度和宽度计算得到。具体地,电子设备可以直接读取待拍摄图像的高度和宽度,计算得到待拍摄图像的面积。阈值可以根据实际需求来确定,例如可以是05、0.6、0.7等不限于此。
电子设备可以在待拍摄图像中预设标签对应的标签区域的面积与待拍摄图像的面积的比值超过阈值时,启动电子设备的快门优先模式。
操作408,获取快门速度,根据快门优先模式与快门速度对待拍摄图像进行拍摄。
在日常生活中,人们对目标物体拍摄时,会拉近目标物体与摄像头之间的距离,提高目标物体在图像中的占比,突出图像中的目标物体。因此,当待拍摄图像中标签区域的面积与待拍摄图像的面积超过阈值时,电子设备可以判定待拍摄图像的拍摄主体处于标签区域中,从而启动快门优先模式,获取快门速度,根据快门优先模式和快门速度对待拍摄图像进行拍摄,可以拍摄需要的清晰的图像,避免因需要手动设置高速拍摄模式而错过需要拍摄的图像。相对地,当待拍摄图像中标签区域的面积与待拍摄图像的面积小于阈值时,可以确定待拍摄图像的拍摄主体不处于标签区域中,不启动快门优先模式进行拍摄。
如图5所示,在一个实施例中,提供的图像处理方法还包括:
操作502,获取待拍摄图像中预设标签对应的标签区域。
操作504,对标签区域进行对焦,对焦后根据快门优先模式与快门速度对待拍摄图像进行拍摄。
对焦是指通过调整电子设备中成像设备与焦点的距离,使被拍摄物体成像清晰的过程。电子设备对标签区域进行对焦,具体地,可以采用激光对焦、相位对焦、反差对焦等方式进行对焦,对焦方式不限于此。
电子设备在待拍摄图像的场景标签包含预设标签时,获取预设标签对应的标签区域,对预设标签对应的标签区域进行对焦,对焦后根据启动的快门优先模式和快门速度对待拍摄图像进行拍摄,可以使拍摄到的图像中预设标签对应的区域更加清晰,提高了图像的拍摄效果。
如图6所示,在一个实施例中,提供的图像处理方法还包括操作602至操作604。其中:
操作602,获取待拍摄图像中面积最大的标签区域。
电子设备可以获取待拍摄图像中各场景标签对应的标签区域,计算各标签区域的面积大小,从中获取面积最大的标签区域。电子设备也可以获取待拍摄图像中预设标签对应的标签区域,计算各预设标签对应的标签区域的面积大小,从中获取面积最大的标签区域。
操作604,对面积最大的标签区域进行对焦,对焦后根据快门优先模式与快门速度对待拍摄图像进行拍摄。
电子设备获取待拍摄图像中面积最大的标签区域,对面积最大的标签区域进行对焦,对焦后根据快门优先模式与快门速度对待拍摄图像进行拍摄,可以在提高快门速度的同时对面积最大的标签区域对焦,可以拍摄到需要的图像,并使拍摄图像中面积最大的标签区域的拍摄效果更加清晰。
如图7所示,在一个实施例中,提供的图像处理方法还包括操作702至操作704。其中:
操作702,获取待拍摄图像中预设标签对应的标签区域。
操作704,当通过关键点检测到标签区域中包含眼睛时,对标签区域中的眼睛进行对焦,对焦后根据快门优先模式与快门速度对待拍摄图像进行拍摄。
电子设备可以获取待拍摄图像中预设标签对应的标签区域,对预设标签对应的标签区域进行关键点检测。具体地,电子设备可以采用dlib算法进行关键点检测,在关键点检测算法的训练过程中,可以获取训练图像中眼睛的点坐标,对点坐标进行关键点标记后采用dlib算法对训练图像进行训练,从而,电子设备在获取待拍摄图像中预设标签对应的标签区域,使用训练后的关键点检测算法对预设标签对应的标签区域进行检测,可以输出检测得到的眼睛关键点标记。在一个实施例中,电子设备还可以采用基于ASM(Active Shape Models,主动形状模型)模型、级联形状回归模型、深度学习算法如DCNN(Dynamic Convolutional Neural Network,动态卷积网络)等进行关键点检测。电子设备对待拍摄图像中预设标签对应的标签区域进行检测,可以提高关键点检测的效率。
当预设标签对应的标签区域中不包含眼睛时,电子设备对标签区域进行对焦,可以拍摄到标签区域更加清晰的图像。电子设备在检测到预设标签对应的标签区域中包含眼睛时,对标签区域中的眼睛进行对焦,对焦后根据快门优先模式和快门速度对待拍摄图像进行拍摄,获得以眼睛为焦点的图像,可以使拍摄的图像更加生动。例如,当待拍摄图像中包含的预设标签为婴儿场景标签时,电子设备通过关键点检测确定待拍摄图像中包含眼睛并获取对应的眼睛位置,对待拍摄图像的眼睛进行对焦并拍摄,得到的图像可以展现出婴儿的灵动。
在一个实施例中,提供的一种图像处理方法还包括:预设标签包括猫场景标签和狗场景标签中的至少一种。
随着人们生活水平的提高,猫和狗已经成为很多人日常生活中不可缺少的生活玩伴,拍摄猫狗也成了人们的娱乐方式之一。由于猫狗的运动速度很快,当人们采用摄像头之间进行拍摄时,拍摄的图像容易模糊,若对摄像头进行设置为高速模式再进行拍摄,则由于设置需要花费一定时间,容易错过设置过程猫和狗的一些精彩画面。本申请提供的实施例中,可以对待拍摄图像进行场景检测,得到待拍摄图像的场景标签,当待拍摄图像的场景标签中包含猫场景标签和狗场景标签中的至少一种时,自动启动快门优先模式,并获取设定的快门速度对待拍摄图像进行拍摄,由于不需要手动对拍摄模式进行设置,可以避免错过猫、狗的精彩画面,并获得清晰的图像。
在一个实施例中,电子设备在检测到待拍摄图像中包含猫场景标签和狗场景标签中的至少一种时,还可以获取场景标签对应的标签区域,检测标签区域中猫的眼睛或狗的眼睛所在的位置,对眼睛进行对焦后,再根据快门优先模式和快门速度对图像进行拍摄,从而可以使拍摄焦点位于猫、狗的眼睛上,获得展现猫、狗灵动的图像。
在一个实施例中,提供了一种图像处理方法,实现该方法的具体操作如下所述:
首先,电子设备对待拍摄图像进行场景检测,得到待拍摄图像的场景标签。待拍摄图像是指电子设备通过成像设备实时捕捉当前场景的画面生成的。电子设备对待拍摄图像进行场景识别,可以根据VGG、CNN、SSD、决策树等深度学习算法训练场景识别模型,根据场景识别模型对待拍摄图像进行场景识别。图像的场景可以是风景、海滩、蓝天、绿草、雪景、烟火、聚光灯、文本、人像、婴儿、猫、狗、美食等。电子设备可以在获取成像设备捕捉的待拍摄图像后,根据场景识别模型对待拍摄图像进行场景识别,并根据场景识别结果确定待拍摄图像的场景标签。
可选地,电子设备对待拍摄图像进行场景检测,得到待拍摄图像的多个场景标签。电子设备可以训练可同时实现场景分类和目标检测的神经网络,利用神经网络的基础网络 层对图像进行特征提取,将提取的图像特征输入到分类网络和目标检测网络层,通过分类网络进行分类检测输出图像背景区域所属指定分类类别的置信度,通过目标检测网络层进行目标检测得到前景区域所属指定目标类别的置信度,选取置信度最高且超过置信度阈值的目标类别作为该图像中前景目标所属的目标标签,并输出该目标标签对应的位置。将分类标签和目标标签作为待拍摄图像的场景标签。
接着,当场景标签中包含预设标签时,电子设备启动快门优先模式,预设标签为动态场景所对应的标签。动态场景是指包含可高速运动的物体的场景。预设标签是指预先设定的动态场景所对应的标签。场景标签中包含的预设标签可以是一个,也可以是多个。电子设备在待拍摄图像的场景标签中包含预设标签时,启动快门优先模式进行拍摄。
可选地,预设标签包括猫场景标签和狗场景标签中的至少一种。电子设备可以对待拍摄图像进行场景检测,得到待拍摄图像的场景标签,当待拍摄图像的场景标签中包含猫场景标签和狗场景标签中的至少一种时,自动启动快门优先模式,并获取设定的快门速度对待拍摄图像进行拍摄,由于不需要手动对拍摄模式进行设置,可以避免错过猫、狗的精彩画面,并获取清晰的图像。
可选地,当多个场景标签中包含预设标签时,电子设备获取预设标签对应的标签区域,当预设标签对应的标签区域的面积与待拍摄图像的面积的比值超过阈值时,启动快门优先模式。当待拍摄图像中标签区域的面积与待拍摄图像的面积超过阈值时,电子设备可以判定待拍摄图像的拍摄主体处于标签区域中,从而启动快门优先模式,获取快门速度,根据快门优先模式和快门速度对待拍摄图像进行拍摄,可以拍摄需要的清晰的图像,避免因需要手动设置高速拍摄模式而错过需要拍摄的图像。
接着,电子设备获取快门速度,根据快门优先模式与快门速度对待拍摄图像进行拍摄。电子设备可以获取由用户设定的快门速度,具体地,电子设备在启动快门优先模式后,可以在显示屏上生成快门速度选择滑动条,用户可以通过滑动条选择对应的快门速度,电子设备可以获取用户选定的用户速度。电子设备也可以获取预设的快门速度。具体地,电子设备可以根据不同动态场景的运动速度设定不同的预设标签对应的快门速度,当启动快门优先模式时,电子设备可以根据待拍摄图像包含的预设标签获取对应的快门速度。电子设备可以获取设定的快门速度,并根据启动快门优先模式时自动测光系统确定的曝光量和快门速度确定光圈的大小,对待拍摄图像进行拍摄。
可选地,电子设备对待拍摄图像中预设标签对应的标签区域进行对焦,对焦后根据快门优先模式与快门速度对待拍摄图像进行拍摄。电子设备在待拍摄图像的场景标签包含预设标签时,获取预设标签对应的标签区域,对预设标签对应的标签区域进行对焦,对焦后根据启动的快门优先模式和快门速度对待拍摄图像进行拍摄,可以使拍摄到的图像中预设标签对应的区域更加清晰,提高了图像的拍摄效果。
可选地,电子设备获取待拍摄图像中面积最大的标签区域,对面积最大的标签区域进行对焦,对焦后根据快门优先模式与快门速度对待拍摄图像进行拍摄。电子设备获取待拍摄图像中面积最大的标签区域,对面积最大的标签区域进行对焦,对焦后根据快门优先模式与快门速度对待拍摄图像进行拍摄,可以在提高快门速度的同时对面积最大的标签区域对焦,可以拍摄到需要的图像,并使拍摄图像中面积最大的标签区域的拍摄效果更加清晰。
可选地,当通过关键点检测到标签区域中包含眼睛时,电子设备对标签区域中的眼睛进行对焦,对焦后根据快门优先模式与快门速度对待拍摄图像进行拍摄。电子设备可以获取待拍摄图像中预设标签对应的标签区域,对预设标签对应的标签区域进行关键点检测,当检测到预设标签对应的标签区域中包含眼睛时,对标签区域中的眼睛进行对焦,对焦后根据快门优先模式和快门速度对待拍摄图像进行拍摄,获得以眼睛为焦点的图像,可以使拍摄的图像更加生动。
应该理解的是,虽然图2、4-7的流程图中的各个操作按照箭头的指示依次显示,但是这些操作并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些操作的执行并没有严格的顺序限制,这些操作可以以其它的顺序执行。而且,图2、4-7中的至少一部分操作可以包括多个子操作或者多个阶段,这些子操作或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子操作或者阶段的执行顺序也不必然是依次进行,而是可以与其它操作或者其它操作的子操作或者阶段的至少一部分轮流或者交替地执行。
图8为一个实施例的图像处理装置的结构框图。如图8所示,一种图像处理装置,包括:图像检测模块820、模式启动模块840和拍摄模块860。其中:
图像检测模块820,用于对待拍摄图像进行场景检测,得到待拍摄图像的场景标签。
模式启动模块840,用于当场景标签中包含预设标签时,启动快门优先模式,预设标签为动态场景所对应的标签。
拍摄模块860,用于获取快门速度,根据快门优先模式与快门速度对待拍摄图像进行拍摄。
在一个实施例中,图像检测模块820还可以用于对待拍摄图像进行场景检测,得到待拍摄图像的多个场景标签。
在一个实施例中,图像检测模块820还可以用于当多个场景标签中包含预设标签时,获取预设标签对应的标签区域;模式启动模块840还可以用于当预设标签对应的标签区域的面积与待拍摄图像的面积的比值超过阈值时,启动快门优先模式;拍摄模块860还可以用于获取快门速度,根据快门优先模式与快门速度对待拍摄图像进行拍摄。
在一个实施例中,图像检测模块820还可以用于获取待拍摄图像中预设标签对应的标签区域;拍摄模块860还可以用于对标签区域进行对焦,对焦后根据快门优先模式与快门速度对待拍摄图像进行拍摄。
在一个实施例中,图像检测模块820还可以用于获取待拍摄图像中面积最大的标签区域;拍摄模块860还可以用于对面积最大的标签区域进行对焦,对焦后根据快门优先模式与快门速度对待拍摄图像进行拍摄。
在一个实施例中,图像检测模块820还可以用于获取待拍摄图像中预设标签对应的标签区域;拍摄模块860还可以用于当通过关键点检测到标签区域中包含眼睛时,对标签区域中的眼睛进行对焦,对焦后根据快门优先模式与快门速度对待拍摄图像进行拍摄。
在一个实施例中,模式启动模块840还可以用于当场景标签中包含预设标签时,启动快门优先模式,预设标签包括猫场景标签和狗场景标签中的至少一种。
上述图像处理装置中各个模块的划分仅用于举例说明,在其他实施例中,可将图像处理装置按照需要划分为不同的模块,以完成上述图像处理装置的全部或部分功能。
关于图像处理装置的具体限定可以参见上文中对于图像处理方法的限定,在此不再赘述。上述图像处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
本申请实施例中提供的图像处理装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端或服务器上运行。该计算机程序构成的程序模块可存储在终端或服务器的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述方法的操作。
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行图像处理方法的操作。
一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行图像 处理方法。
本申请实施例还提供一种电子设备。上述电子设备中包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image Signal Processing,图像信号处理)管线的各种处理单元。图9为一个实施例中图像处理电路的示意图。如图9所示,为便于说明,仅示出与本申请实施例相关的图像处理技术的各个方面。
如图9所示,图像处理电路包括ISP处理器940和控制逻辑器950。成像设备910捕捉的图像数据首先由ISP处理器940处理,ISP处理器940对图像数据进行分析以捕捉可用于确定和/或成像设备910的一个或多个控制参数的图像统计信息。成像设备910可包括具有一个或多个透镜912和图像传感器914的照相机。图像传感器914可包括色彩滤镜阵列(如Bayer滤镜),图像传感器914可获取用图像传感器914的每个成像像素捕捉的光强度和波长信息,并提供可由ISP处理器940处理的一组原始图像数据。传感器920(如陀螺仪)可基于传感器920接口类型把采集的图像处理的参数(如防抖参数)提供给ISP处理器940。传感器920接口可以利用SMIA(Standard Mobile Imaging Architecture,标准移动成像架构)接口、其它串行或并行照相机接口或上述接口的组合。
此外,图像传感器914也可将原始图像数据发送给传感器920,传感器920可基于传感器920接口类型把原始图像数据提供给ISP处理器940,或者传感器920将原始图像数据存储到图像存储器930中。
ISP处理器940按多种格式逐个像素地处理原始图像数据。例如,每个图像像素可具有8、10、12或14比特的位深度,ISP处理器940可对原始图像数据进行一个或多个图像处理操作、收集关于图像数据的统计信息。其中,图像处理操作可按相同或不同的位深度精度进行。
ISP处理器940还可从图像存储器930接收图像数据。例如,传感器920接口将原始图像数据发送给图像存储器930,图像存储器930中的原始图像数据再提供给ISP处理器940以供处理。图像存储器930可为存储器装置的一部分、存储设备、或电子设备内的独立的专用存储器,并可包括DMA(Direct Memory Access,直接直接存储器存取)特征。
当接收到来自图像传感器914接口或来自传感器920接口或来自图像存储器930的原始图像数据时,ISP处理器940可进行一个或多个图像处理操作,如时域滤波。处理后的图像数据可发送给图像存储器930,以便在被显示之前进行另外的处理。ISP处理器940从图像存储器930接收处理数据,并对所述处理数据进行原始域中以及RGB和YCbCr颜色空间中的图像数据处理。ISP处理器940处理后的图像数据可输出给显示器970,以供用户观看和/或由图形引擎或GPU(Graphics Processing Unit,图形处理器)进一步处理。此外,ISP处理器940的输出还可发送给图像存储器930,且显示器970可从图像存储器930读取图像数据。在一个实施例中,图像存储器930可被配置为实现一个或多个帧缓冲器。此外,ISP处理器940的输出可发送给编码器/解码器960,以便编码/解码图像数据。编码的图像数据可被保存,并在显示于显示器970设备上之前解压缩。编码器/解码器960可由CPU或GPU或协处理器实现。
ISP处理器940确定的统计数据可发送给控制逻辑器950单元。例如,统计数据可包括自动曝光、自动白平衡、自动聚焦、闪烁检测、黑电平补偿、透镜912阴影校正等图像传感器914统计信息。控制逻辑器950可包括执行一个或多个例程(如固件)的处理器和/或微控制器,一个或多个例程可根据接收的统计数据,确定成像设备910的控制参数及ISP处理器940的控制参数。例如,成像设备910的控制参数可包括传感器920控制参数(例如增益、曝光控制的积分时间、防抖参数等)、照相机闪光控制参数、透镜912控制参数(例如聚焦或变焦用焦距)、或这些参数的组合。ISP控制参数可包括用于自动白平衡和颜色调整(例如,在RGB处理期间)的增益水平和色彩校正矩阵,以及透镜912阴影校正参数。
电子设备根据上述图像处理技术可以实现本申请实施例中所描述的图像处理方法。
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。合适的非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (19)

  1. 一种图像处理方法,包括:
    对待拍摄图像进行场景检测,得到所述待拍摄图像的场景标签;
    当所述场景标签中包含预设标签时,启动快门优先模式,所述预设标签为动态场景所对应的标签;及
    获取快门速度,根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄。
  2. 根据权利要求1所述的方法,其特征在于,所述对待拍摄图像进行场景检测,得到所述待拍摄图像的场景标签,包括:
    对待拍摄图像进行场景检测,得到所述待拍摄图像的多个场景标签。
  3. 根据权利要求2所述的方法,其特征在于,所述对待拍摄图像进行场景检测,得到所述待拍摄图像的多个场景标签,包括:
    将所述待拍摄图像输入至神经网络中;
    通过所述神经网络对所述待拍摄图像进行场景检测,得到所述图像的背景所属的场景分类标签;
    通过所述神经网络对所述图像进行目标检测,得到所述图像的前景所属的目标分类标签;及
    将所述场景分类标签和所述目标分类标签作为所述待拍摄图像的场景标签。
  4. 根据权利要求2所述的方法,其特征在于,还包括:
    当多个所述场景标签中包含预设标签时,获取所述预设标签对应的标签区域;
    当所述预设标签对应的标签区域的面积与待拍摄图像的面积的比值超过阈值时,启动快门优先模式;
    获取快门速度,根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄。
  5. 根据权利要求1至4中人任一项所述的方法,其特征在于,所述根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄,包括:
    获取所述待拍摄图像中所述预设标签对应的标签区域;及
    对所述标签区域进行对焦,对焦后根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄。
  6. 根据权利要求1所述的方法,其特征在于,还包括:
    获取所述待拍摄图像中面积最大的标签区域;及
    对所述面积最大的标签区域进行对焦,对焦后根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄。
  7. 根据权利要求1所述的方法,其特征在于,所述根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄,还包括:
    获取所述待拍摄图像中所述预设标签对应的标签区域;
    当通过关键点检测到所述标签区域中包含眼睛时,对所述标签区域中的眼睛进行对焦,对焦后根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄。
  8. 根据权利要求1所述的方法,其特征在于,所述预设标签包括猫场景标签和狗场景标签中的至少一种。
  9. 根据权利要求1所述的方法,其特征在于,所述获取快门速度,包括:
    根据预先设定的不同的预设标签对应的快门速度,获取所述场景标签中包含的所述预设标签对应的快门速度。
  10. 一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下操作:
    对待拍摄图像进行场景检测,得到所述待拍摄图像的场景标签;
    当所述场景标签中包含预设标签时,启动快门优先模式,所述预设标签为动态场景所对应的标签;及
    获取快门速度,根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄。
  11. 根据权利要求10所述的电子设备,其特征在于,所述处理器执行所述对待拍摄图像进行场景检测,得到所述待拍摄图像的场景标签时,还执行:
    对待拍摄图像进行场景检测,得到所述待拍摄图像的多个场景标签。
  12. 根据权利要求11所述的电子设备,其特征在于,所述处理器执行所述对待拍摄图像进行场景检测,得到所述待拍摄图像的多个场景标签时,还执行:
    将所述待拍摄图像输入至神经网络中;
    通过所述神经网络对所述待拍摄图像进行场景检测,得到所述图像的背景所属的场景分类标签;
    通过所述神经网络对所述图像进行目标检测,得到所述图像的前景所属的目标分类标签;及
    将所述场景分类标签和所述目标分类标签作为所述待拍摄图像的场景标签。
  13. 根据权利要求11所述的电子设备,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器还执行如下操作:
    当多个所述场景标签中包含预设标签时,获取所述预设标签对应的标签区域;
    当所述预设标签对应的标签区域的面积与待拍摄图像的面积的比值超过阈值时,启动快门优先模式;
    获取快门速度,根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄。
  14. 根据权利要求10至13中任一项所述的电子设备,其特征在于,所述处理器执行所述根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄时,还执行:
    获取所述待拍摄图像中所述预设标签对应的标签区域;及
    对所述标签区域进行对焦,对焦后根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄。
  15. 根据权利要求10所述的电子设备,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器还执行如下操作:
    获取所述待拍摄图像中面积最大的标签区域;及
    对所述面积最大的标签区域进行对焦,对焦后根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄。
  16. 根据权利要求10所述的电子设备,其特征在于,所述处理器执行所述根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄时,还执行:
    获取所述待拍摄图像中所述预设标签对应的标签区域;
    当通过关键点检测到所述标签区域中包含眼睛时,对所述标签区域中的眼睛进行对焦,对焦后根据所述快门优先模式与快门速度对所述待拍摄图像进行拍摄。
  17. 根据权利要求10所述的电子设备,其特征在于,所述处理器执行当所述场景标签中包含预设标签时,启动快门优先模式时,还执行:
    当所述场景标签中包含猫场景标签和狗场景标签中的至少一种时,启动快门优先模式。
  18. 根据权利要求10所述的电子设备,其特征在于,所述处理器执行所述获取快门速度时,还执行:
    根据预先设定的不同的预设标签对应的快门速度,获取所述场景标签中包含的所述预设标签对应的快门速度。
  19. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至9中任一项所述的方法的操作。
PCT/CN2019/087532 2018-06-15 2019-05-20 图像处理方法、电子设备、计算机可读存储介质 WO2019237887A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19819056.3A EP3793188A4 (en) 2018-06-15 2019-05-20 IMAGE PROCESSING PROCESS, ELECTRONIC DEVICE AND COMPUTER READABLE INFORMATION SUPPORT
US17/037,682 US20210014411A1 (en) 2018-06-15 2020-09-30 Method for image processing, electronic device, and computer readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810618628.6A CN108810413B (zh) 2018-06-15 2018-06-15 图像处理方法和装置、电子设备、计算机可读存储介质
CN201810618628.6 2018-06-15

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/037,682 Continuation US20210014411A1 (en) 2018-06-15 2020-09-30 Method for image processing, electronic device, and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2019237887A1 true WO2019237887A1 (zh) 2019-12-19

Family

ID=64086356

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/087532 WO2019237887A1 (zh) 2018-06-15 2019-05-20 图像处理方法、电子设备、计算机可读存储介质

Country Status (4)

Country Link
US (1) US20210014411A1 (zh)
EP (1) EP3793188A4 (zh)
CN (1) CN108810413B (zh)
WO (1) WO2019237887A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339046A (zh) * 2021-12-30 2022-04-12 中元汇吉生物技术股份有限公司 基于自动旋转试管的图像采集方法、装置、设备及介质

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108810413B (zh) * 2018-06-15 2020-12-01 Oppo广东移动通信有限公司 图像处理方法和装置、电子设备、计算机可读存储介质
CN109754009B (zh) * 2018-12-29 2021-07-13 北京沃东天骏信息技术有限公司 物品识别方法、装置、售货系统和存储介质
JP2020203546A (ja) * 2019-06-14 2020-12-24 株式会社シマノ 検出装置、検出方法、生成方法、コンピュータプログラム、および記憶媒体
CN112153296B (zh) * 2019-06-27 2022-04-05 杭州海康威视数字技术股份有限公司 一种自动曝光控制方法、装置及带有fpga的摄像机
CN112149476A (zh) * 2019-06-28 2020-12-29 北京海益同展信息科技有限公司 目标检测方法、装置、设备和存储介质
JP2021013117A (ja) * 2019-07-08 2021-02-04 キヤノン株式会社 集積回路チップ及び撮像装置
CN112860372B (zh) * 2020-12-31 2023-05-30 上海米哈游天命科技有限公司 拍摄图像的方法、装置、电子设备及存储介质
CN113033507B (zh) * 2021-05-20 2021-08-10 腾讯科技(深圳)有限公司 场景识别方法、装置、计算机设备和存储介质
KR20240011793A (ko) 2021-08-23 2024-01-26 삼성전자주식회사 장면의 자동 초점을 위한 방법 및 전자 디바이스
CN114125300B (zh) * 2021-11-29 2023-11-21 维沃移动通信有限公司 拍摄方法、拍摄装置、电子设备和可读存储介质
CN114419070A (zh) * 2022-01-21 2022-04-29 北京字跳网络技术有限公司 一种图像场景分割方法、装置、设备及存储介质
CN114881893B (zh) * 2022-07-05 2022-10-21 腾讯科技(深圳)有限公司 图像处理方法、装置、设备及计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215322A (zh) * 2010-04-09 2011-10-12 索尼公司 成像控制设备与成像控制方法
CN107222661A (zh) * 2017-06-26 2017-09-29 努比亚技术有限公司 一种自动拍摄运动物体的方法及对应的系统、终端设备
CN107925720A (zh) * 2015-08-20 2018-04-17 索尼公司 用于控制图像的捕获的系统和方法
CN108810413A (zh) * 2018-06-15 2018-11-13 Oppo广东移动通信有限公司 图像处理方法和装置、电子设备、计算机可读存储介质

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR940003934B1 (ko) * 1991-02-01 1994-05-09 삼성전자 주식회사 비데오 카메라의 자동셔터스피드 제어회로
JP4241709B2 (ja) * 2005-10-11 2009-03-18 ソニー株式会社 画像処理装置
US20070248330A1 (en) * 2006-04-06 2007-10-25 Pillman Bruce H Varying camera self-determination based on subject motion
JP5018828B2 (ja) * 2009-05-27 2012-09-05 カシオ計算機株式会社 画像撮影装置及び画像撮影プログラム
EP2402867B1 (en) * 2010-07-02 2018-08-22 Accenture Global Services Limited A computer-implemented method, a computer program product and a computer system for image processing
JP2012119858A (ja) * 2010-11-30 2012-06-21 Aof Imaging Technology Ltd 撮影装置、撮影方法、およびプログラム
JP5669549B2 (ja) * 2010-12-10 2015-02-12 オリンパスイメージング株式会社 撮像装置
CN103024165B (zh) * 2012-12-04 2015-01-28 华为终端有限公司 一种自动设置拍摄模式的方法和装置
JP2014123809A (ja) * 2012-12-20 2014-07-03 Canon Inc 撮像装置、撮像システム、および、撮像装置の制御方法
US10410096B2 (en) * 2015-07-09 2019-09-10 Qualcomm Incorporated Context-based priors for object detection in images
US11423651B2 (en) * 2016-02-09 2022-08-23 Hrl Laboratories, Llc System and method for the fusion of bottom-up whole-image features and top-down enttiy classification for accurate image/video scene classification
CN105554399A (zh) * 2016-02-24 2016-05-04 北京小米移动软件有限公司 拍摄方法、拍摄装置及终端设备
CN107820020A (zh) * 2017-12-06 2018-03-20 广东欧珀移动通信有限公司 拍摄参数的调整方法、装置、存储介质及移动终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215322A (zh) * 2010-04-09 2011-10-12 索尼公司 成像控制设备与成像控制方法
CN107925720A (zh) * 2015-08-20 2018-04-17 索尼公司 用于控制图像的捕获的系统和方法
CN107222661A (zh) * 2017-06-26 2017-09-29 努比亚技术有限公司 一种自动拍摄运动物体的方法及对应的系统、终端设备
CN108810413A (zh) * 2018-06-15 2018-11-13 Oppo广东移动通信有限公司 图像处理方法和装置、电子设备、计算机可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3793188A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339046A (zh) * 2021-12-30 2022-04-12 中元汇吉生物技术股份有限公司 基于自动旋转试管的图像采集方法、装置、设备及介质
CN114339046B (zh) * 2021-12-30 2023-10-03 中元汇吉生物技术股份有限公司 基于自动旋转试管的图像采集方法、装置、设备及介质

Also Published As

Publication number Publication date
EP3793188A4 (en) 2021-08-25
CN108810413A (zh) 2018-11-13
EP3793188A1 (en) 2021-03-17
CN108810413B (zh) 2020-12-01
US20210014411A1 (en) 2021-01-14

Similar Documents

Publication Publication Date Title
WO2019237887A1 (zh) 图像处理方法、电子设备、计算机可读存储介质
CN108764370B (zh) 图像处理方法、装置、计算机可读存储介质和计算机设备
WO2019233262A1 (zh) 视频处理方法、电子设备、计算机可读存储介质
WO2019233263A1 (zh) 视频处理方法、电子设备、计算机可读存储介质
WO2019233394A1 (zh) 图像处理方法和装置、存储介质、电子设备
WO2019233393A1 (zh) 图像处理方法和装置、存储介质、电子设备
WO2020015470A1 (zh) 图像处理方法、装置、移动终端及计算机可读存储介质
US11233933B2 (en) Method and device for processing image, and mobile terminal
WO2019233297A1 (zh) 数据集的构建方法、移动终端、可读存储介质
US10896323B2 (en) Method and device for image processing, computer readable storage medium, and electronic device
WO2020001197A1 (zh) 图像处理方法、电子设备、计算机可读存储介质
CN110248096B (zh) 对焦方法和装置、电子设备、计算机可读存储介质
WO2019233266A1 (zh) 图像处理方法、计算机可读存储介质和电子设备
CN108875619B (zh) 视频处理方法和装置、电子设备、计算机可读存储介质
CN108961302B (zh) 图像处理方法、装置、移动终端及计算机可读存储介质
WO2019233392A1 (zh) 图像处理方法、装置、电子设备和计算机可读存储介质
CN110580487A (zh) 神经网络的训练方法、构建方法、图像处理方法和装置
WO2019233260A1 (zh) 广告信息推送方法和装置、存储介质、电子设备
CN108897786B (zh) 应用程序的推荐方法、装置、存储介质及移动终端
WO2020001196A1 (zh) 图像处理方法、电子设备、计算机可读存储介质
CN109712177B (zh) 图像处理方法、装置、电子设备和计算机可读存储介质
WO2020001219A1 (zh) 图像处理方法和装置、存储介质、电子设备
CN110956679B (zh) 图像处理方法和装置、电子设备、计算机可读存储介质
WO2019223513A1 (zh) 图像识别方法、电子设备和存储介质
CN108848306B (zh) 图像处理方法和装置、电子设备、计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19819056

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019819056

Country of ref document: EP

Effective date: 20201211