WO2020034776A1 - 图像处理方法和装置、终端设备、计算机可读存储介质 - Google Patents

图像处理方法和装置、终端设备、计算机可读存储介质 Download PDF

Info

Publication number
WO2020034776A1
WO2020034776A1 PCT/CN2019/093460 CN2019093460W WO2020034776A1 WO 2020034776 A1 WO2020034776 A1 WO 2020034776A1 CN 2019093460 W CN2019093460 W CN 2019093460W WO 2020034776 A1 WO2020034776 A1 WO 2020034776A1
Authority
WO
WIPO (PCT)
Prior art keywords
area
terminal device
areas
image
target
Prior art date
Application number
PCT/CN2019/093460
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广东移动通信有限公司
Publication of WO2020034776A1 publication Critical patent/WO2020034776A1/zh

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • 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
    • 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

Definitions

  • the present application relates to the field of image processing technologies, and in particular, to an image processing method, apparatus, terminal device, and computer-readable storage medium.
  • terminal devices for example, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, etc.
  • the autofocus function of the terminal device is mainly aimed at the face area.
  • manual focusing is still required.
  • an image processing method and apparatus a terminal device, and a computer-readable storage medium are provided.
  • An image processing method includes:
  • Focus processing is performed on the target area.
  • An image processing device includes:
  • An identification module for identifying each object in the image captured by the terminal device and the area where each object is located;
  • a selection module configured to select a target area to be focused from each of the areas according to a distance between the geometric center of each of the areas and the geometric center of the captured image
  • a focusing module is configured to perform focusing processing on the target area.
  • a terminal device includes a memory and a processor.
  • the memory stores a computer program.
  • the processor causes the processor to perform the operations of the image processing method described above.
  • a computer-readable storage medium having stored thereon a computer program, the computer program being executed by a processor to perform the operations of the image processing method as described above.
  • the image processing method and device, terminal device, and computer-readable storage medium in the embodiments of the present application identify each object in the image captured by the terminal device and the area where each object is located, and then according to the geometric center of each area and the captured image. The distance between the geometric centers. Selecting a target area from each area and focusing the target area can automatically focus the target object corresponding to the target area in the captured image.
  • FIG. 1 is an application environment diagram of an image processing method in an embodiment.
  • FIG. 2 is a flowchart of an image processing method according to an embodiment.
  • FIG. 3 is a flowchart of an image processing method in another embodiment.
  • FIG. 4 is a structural block diagram of an image processing apparatus in an embodiment.
  • FIG. 5 is a schematic diagram of an image processing circuit in an embodiment.
  • FIG. 1 is a schematic diagram of an application environment of an application processing method in an embodiment.
  • the application processing method is applied to a terminal device, which 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 terminal 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 application processing method applicable to the terminal device provided in the embodiments of the present application.
  • the memory may include a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (ROM), or a random-access memory (RAM).
  • the memory includes 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, etc., and is used to communicate with external terminal equipment.
  • the terminal 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. As shown in FIG. 2, the image processing method includes operations 202 to 206.
  • Operation 202 Identify each object in the image captured by the terminal device and a region where each object is located.
  • the area where each object is located may be represented by a rectangular frame
  • the terminal device may store the position information of the rectangular frame on the captured image in the memory of the terminal device.
  • Operation 204 Select a target area from each area according to the distance between the geometric center of each area and the geometric center of the captured image.
  • the terminal device may set an area within a certain distance between the geometric center of the rectangular frame area and the geometric center of the captured image as the target area.
  • the terminal device can also set the closest area between the geometric center of each rectangular frame area and the geometric center of the captured image as the target area.
  • the terminal device can adjust the distance between the target rectangular frame area and the geometric center of the captured image according to the actual shooting scene. distance.
  • focus processing is performed on the target area.
  • focusing refers to the process in which the focusing mechanism of the camera of the terminal device adjusts the position between the object distance and the distance to make the imaged object clear.
  • the terminal device may perform the following operations: monitor the camera of the terminal device; and shoot the terminal device when it is detected that the camera is activated Each object in the image is identified.
  • the terminal device may identify each object in the image captured by the terminal device when detecting that the terminal device is no longer moving within a preset time, and the preset time may be appropriately adjusted according to actual needs.
  • each object in the image captured by the terminal device and the area where each object is located are identified, and then the geometric center of each area and the captured image are recognized.
  • the distance between the geometric centers of the camera select the target area from each area, and focus the target area, which can avoid the recognition of non-target objects during the movement of the terminal device, and achieve automatic detection when the terminal device is no longer moving.
  • the target object corresponding to the target area in the captured image is identified and focused.
  • operation 202 may include: identifying each object in the image captured by the terminal device and the area where each object is located according to a pre-trained model; wherein the model is based on the category of each object and the calibration of each object in the captured image The location data set is trained.
  • photographed images of tens of thousands of types of objects may be prepared in advance, where multiple photographed images of objects of each type may be prepared, and a data set for calibrating the positions of objects of each type in the photographed images is collected.
  • images of tens of thousands of types of objects such as flowers, trees, and drinking glasses, and you can prepare about 5,000 images of each type of object.
  • an object detection algorithm for example, a Single Shot MultiBox Detector (SSD) algorithm or a Convolutional Neural Network (Regions with Convolutional Neural Network) algorithm can be used to classify objects and objects. You can also identify the location of the data. You can also use the darknet deep learning training framework and use the network structure corresponding to the single view (You Only Look Once (YOLO) algorithm) to prepare the calibrated data set in a prescribed format. Perform training.
  • the trained model can be deployed on the terminal device, and it can be called when the terminal device shoots the target object to realize the classification of the target object and the location in the captured image.
  • a model is trained according to the target detection algorithm, each object in the image captured by the terminal device and the area where each object is located are recognized according to the trained model, and then the distance between the geometric center of each area and the geometric center of the captured image , Selecting a target area from each area and performing focus processing on the target area can automatically recognize and focus a target object corresponding to the target area in the captured image.
  • the following operations may be performed: obtaining the distance between the geometric center of each region and the geometric center of the captured image; selecting the closest region from each region as the target region .
  • the terminal device may obtain the height and width of the object, and use a rectangular frame to represent the area where the object is located according to the height and width of the object.
  • the terminal device can obtain the distance between the geometric center of the rectangular frame and the geometric center of the captured image.
  • the target object can be located near the center of the captured image.
  • the terminal device can closest the geometric center to the geometric center of the captured image.
  • the rectangular frame is set as the target area, and the corresponding object in the target area is the shooting target object.
  • each object in the image captured by the terminal device and the area where the object is located are identified, and then the closest area is selected from each area according to the distance between the geometric center of each area and the geometric center of the captured image.
  • focus processing is performed on the target area to automatically recognize and focus the target object corresponding to the target area near the central position in the captured image.
  • a region with the closest distance from each region can be selected as the target region by the following operations: a candidate region with an area that does not exceed the area threshold is selected from each region; a region with the closest distance from the candidate regions is selected as the target region.
  • the terminal device may set a value range of the candidate area area in advance, and set an area with an area within the value range of each area as a candidate area.
  • the terminal device can also set the proportion range of the rectangular frame corresponding to the target object to the total area of the captured image in advance. For example, the terminal device can set the proportion range to 25% to 70%, which will lower the proportion of the total area of the captured image.
  • a rectangular frame of 25% or higher is set as a non-candidate region. After excluding the non-candidate region, the terminal device selects a region closest to the geometric center of the captured image from the candidate region as the target region.
  • each object in the image captured by the terminal device and the area where each object is located are selected from each area, and a candidate area whose area does not exceed the area threshold is selected, and then the area closest to the candidate area is selected as the target area. Focusing on the target area can eliminate the area whose area exceeds the area threshold first, and can more accurately realize the automatic recognition and focusing of the target object corresponding to the target area in the captured image.
  • the target area may also be subjected to focus processing by the following operation: when the areas of the multiple target areas are equal in size, a region is randomly selected from the multiple target areas for the focus processing.
  • the terminal device may The target area with the largest area is selected from the multiple target areas for focusing. If the areas of the multiple target areas are also equal in size, the terminal device may randomly select an area from the multiple target areas for focusing processing.
  • each object in the image captured by the terminal device and the area where each object is located are selected from each area, and a candidate area whose area does not exceed the area threshold is selected, and then the area closest to the candidate area is selected as the target area.
  • the image processing method may include the following operations:
  • Operation 302 Determine whether the camera is activated by monitoring the camera of the terminal device; if so, perform operation 304 to identify each object in the image captured by the terminal device according to the pre-trained model; after identifying each object in the captured image Thereafter, operation 306 is performed to determine whether each area is a candidate area whose area does not exceed the area threshold; if not, operation 308 is performed to exclude non-candidate areas whose area exceeds the area threshold; if so, operation 310 is performed to determine the geometry of each area.
  • identifying each object in the image captured by the terminal device and the area where each object is located can avoid the process of moving the terminal device. Identification of non-target objects. From each area, select candidate areas whose area does not exceed the area threshold, and then select the closest area from the candidate areas as the target area. Focus processing on the target area can exclude the areas whose area exceeds the area threshold first. For each target area, select the area with the largest area for focusing. If the areas are equal in size, randomly select an area from the multiple target areas for focus processing, which can automatically select one from multiple target areas for the captured image. Focus.
  • FIG. 2 and FIG. 3 are sequentially displayed according to the directions of the arrows, these operations are not necessarily performed sequentially in the order indicated by the arrows. Unless explicitly stated in this article, the execution of these operations is not strictly limited, and these operations can be performed in other orders. Moreover, at least a part of the operations in FIG. 2 and FIG. 3 may include multiple sub-operations or multiple stages. These sub-operations or stages are not necessarily performed at the same time, but may be performed at different times. These sub-operations 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. 4 is a structural block diagram of an image processing apparatus according to an embodiment. As shown in FIG. 4, the image processing apparatus of this embodiment includes:
  • An identification module 402 configured to identify each object in the image captured by the terminal device and a region where each object is located;
  • a selection module 404 is configured to select a target area to be focused from each area according to the distance between the geometric center of each area and the geometric center of the captured image;
  • the focusing module 406 is configured to perform focusing processing on a target area.
  • the above image processing device recognizes each object in the image captured by the terminal device and the area where each object is located, and then selects a target area from each area based on the distance between the geometric center of each area and the geometric center of the captured image, and The target area is subjected to focus processing, which can automatically recognize and focus the target object corresponding to the target area in the captured image.
  • a monitoring module may be further included.
  • the monitoring module is configured to monitor the camera of the terminal device; when the camera is detected to be activated, each object in the image captured by the terminal device is identified.
  • the recognition module 402 is further configured to recognize each object in the image captured by the terminal device and the area where each object is located according to the pre-trained model; wherein the model is based on the category of each object and the calibration of each object in the captured image. Obtained from a dataset of object positions.
  • the selection module 404 is further configured to obtain the distance between the geometric center of each region and the geometric center of the captured image; and select the closest region from each region as the target region.
  • the selection module 404 is further configured to select a candidate region whose area does not exceed the area threshold from each region; and select a region closest to the candidate region as the target region.
  • the focusing module 406 is further configured to perform a focusing process on a target area having the largest area among the multiple target areas when there are multiple target areas that are closest to each other.
  • the focusing module 406 is further configured to randomly select an area from the plurality of target areas for focus processing when the areas of the plurality of target areas are equal in size.
  • 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 above 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 form 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 calls and performs 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 device or a server.
  • the program module constituted by the computer program can be stored in the memory of the terminal device or the 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.
  • the processor when the computer-executable instructions are executed by one or more processors, the processor is further caused to perform the following operations: monitor the camera of the terminal device; and when it is detected that the camera is started, the image captured by the terminal device Of each object.
  • the processors when the computer-executable instructions are executed by one or more processors, the processors are further caused to perform the following operations: according to a pre-trained model, photograph each object in the terminal device and the area where each object is located Recognition is performed; the model is trained according to the type of each object and the data set that calibrates the position of each object in the captured image.
  • the processor when the computer-executable instructions are executed by one or more processors, the processor is further caused to perform the following operations: obtaining the distance between the geometric center of each region and the geometric center of the captured image; from each region Select the closest area as the target area.
  • the processor when the computer-executable instructions are executed by one or more processors, the processor is further caused to perform the following operations: selecting candidate regions from each region whose area does not exceed the area threshold; selecting the closest distance from the candidate regions The area is set as the target area.
  • the processor when the computer-executable instructions are executed by one or more processors, the processor is further caused to perform the following operation: when there are multiple nearest target areas, the target with the largest area among the multiple target areas is executed. Area for focus processing.
  • the processors when the computer-executable instructions are executed by one or more processors, the processors are further caused to perform the following operations: when the area sizes of the multiple target areas are equal, randomly select one area from the multiple target areas Perform focus processing.
  • a computer program product containing instructions that, when run on a computer, causes the computer to:
  • a computer program product containing instructions, when run on a computer, further causes the computer to perform the following operations: monitor the camera of the terminal device; when the camera is detected to be activated, monitor the Each object is identified.
  • a computer program product containing instructions, when run on a computer, further causes the computer to perform the following operations: performing, based on a pre-trained model, each object in the image captured by the terminal device and the area where each object is located Recognition; where the model is trained based on the type of each object and the dataset that calibrates the position of each object in the captured image.
  • a computer program product containing instructions, when run on a computer, further causes the computer to perform the following operations: obtain the distance between the geometric center of each region and the geometric center of the captured image; select from each region The closest area is set as the target area.
  • a computer program product containing instructions, when run on a computer, further causes the computer to perform the following operations: selecting from each region candidate regions whose area does not exceed the area threshold; selecting the closest distance from the candidate regions The area is set as the target area.
  • a computer program product containing instructions, when run on a computer, further causes the computer to perform the following operations: when there are multiple nearest target areas, the target area having the largest area among the multiple target areas Perform focus processing.
  • a computer program product containing instructions, when run on a computer, further causes the computer to perform the following operations: when the area sizes of multiple target areas are equal, randomly select one area from the multiple target areas for Focus processing.
  • An embodiment of the present application further provides a terminal device.
  • the above-mentioned terminal device includes an image processing circuit.
  • the image processing circuit may be implemented by using hardware and / or software components, and may include various processing units that define an ISP (Image Signal Processing) pipeline.
  • FIG. 5 is a schematic diagram of an image processing circuit in an embodiment. As shown in FIG. 5, 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 540 and a control logic 550.
  • the image data captured by the imaging device 510 is first processed by the ISP processor 540, 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 510.
  • the imaging device 510 may include a camera having one or more lenses 512 and an image sensor 514.
  • the image sensor 514 may include a color filter array (such as a Bayer filter).
  • the image sensor 514 may obtain light intensity and wavelength information captured by each imaging pixel of the image sensor 514, and provide a set of raw data that can be processed by the ISP processor 540 Image data.
  • the sensor 520 may provide parameters (such as image stabilization parameters) of the acquired image processing to the ISP processor 540 based on the interface type of the sensor 520.
  • the sensor 520 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 514 may also send the original image data to the sensor 520.
  • the sensor 520 may provide the original image data to the ISP processor 540 based on the interface type of the sensor 520, or the sensor 520 stores the original image data in the image memory 530.
  • the ISP processor 540 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 540 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 540 may also receive image data from the image memory 530.
  • the sensor 520 interface sends the original image data to the image memory 530, and the original image data in the image memory 530 is then provided to the ISP processor 540 for processing.
  • the image memory 530 may be a part of a memory device, a storage device, or an independent dedicated memory in a terminal device, and may include a DMA (Direct Memory Access) feature.
  • DMA Direct Memory Access
  • the ISP processor 540 may perform one or more image processing operations, such as time-domain filtering.
  • the processed image data may be sent to the image memory 530 for further processing before being displayed.
  • the ISP processor 540 receives the processing data from the image memory 530, and performs processing on the image data in the original domain and in the RGB and YCbCr color spaces.
  • the image data processed by the ISP processor 540 may be output to the display 570 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 540 can also be sent to the image memory 530, and the display 570 can read image data from the image memory 530.
  • the image memory 530 may be configured to implement one or more frame buffers.
  • the output of the ISP processor 540 may be sent to an encoder / decoder 560 to encode / decode image data.
  • the encoded image data can be saved and decompressed before being displayed on the display 570 device.
  • the encoder / decoder 560 may be implemented by a CPU or a GPU or a coprocessor.
  • the statistical data determined by the ISP processor 540 may be sent to the control logic 550 unit.
  • the statistical data may include image sensor 514 statistical information such as auto exposure, auto white balance, auto focus, flicker detection, black level compensation, and lens 512 shading correction.
  • the control logic 550 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 510 and the ISP processing according to the received statistical data. Control parameters of the controller 540.
  • control parameters of the imaging device 510 may include sensor 520 control parameters (such as gain, integration time for exposure control, anti-shake parameters, etc.), camera flash control parameters, lens 512 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 512 shading correction parameters.
  • 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 SDRAM dual data rate SDRAM
  • ESDRAM enhanced SDRAM
  • 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)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

一种图像处理方法,包括:识别终端设备拍摄图像中的各个物体及各个物体所在的区域;根据各个区域的几何中心与拍摄图像的几何中心之间的距离,从各个区域中选取目标区域;对目标区域进行对焦处理。

Description

图像处理方法和装置、终端设备、计算机可读存储介质
相关申请的交叉引用
本申请要求于2018年08月14日提交中国专利局、申请号为201810922523X、发明名称为“图像处理方法和装置、终端设备、计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理技术领域,特别是涉及一种图像处理方法、装置、终端设备、计算机可读存储介质。
背景技术
随着移动通信技术的发展,终端设备(例如,各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备等)得到了广泛的应用。利用终端设备对物体进行拍摄时,终端设备的自动对焦功能主要针对人脸区域,当拍摄其他物体时仍然需要进行手动对焦。
发明内容
根据本申请的各种实施例,提供一种图像处理方法和装置、终端设备、计算机可读存储介质。
一种图像处理方法,包括:
识别终端设备拍摄图像中的各个物体及各个物体所在的区域;
根据各个所述区域的几何中心与拍摄图像的几何中心之间的距离,从各个所述区域中选取目标区域;及
对所述目标区域进行对焦处理。
一种图像处理装置,包括:
识别模块,用于识别终端设备拍摄图像中的各个物体及各个物体所在的区域;
选取模块,用于根据各个所述区域的几何中心与拍摄图像的几何中心之间的距离,从各个所述区域中选取待对焦的目标区域;
对焦模块,用于对所述目标区域进行对焦处理。
一种终端设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如上所述的图像处理方法的操作。
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行如上所述的图像处理方法的操作。
本申请实施例中的图像处理方法和装置、终端设备、计算机可读存储介质,对终端设备拍摄图像中的各个物体及各个物体所在的区域进行识别,再根据各个区域的几何中心与拍摄图像的几何中心之间的距离,从各个区域中选取目标区域,对目标区域进行对焦处理,可以实现自动对拍摄图像中目标区域对应的目标物体进行对焦。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一个实施例中图像处理方法的应用环境图。
图2为一个实施例中图像处理方法的流程图。
图3为另一个实施例中图像处理方法的流程图。
图4为一个实施例中图像处理装置的结构框图。
图5为一个实施例中图像处理电路的示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
图1为一个实施例中应用处理方法的应用环境示意图。如图1所示,应用处理方法应用于终端设备中,该终端设备包括通过***总线连接的处理器、存储器和网络接口。其中,该处理器用于提供计算和控制能力,支撑整个终端设备的运行。存储器用于存储数据、程序等,存储器上存储至少一个计算机程序,该计算机程序可被处理器执行,以实现本申请实施例中提供的适用于终端设备的应用处理方法。存储器可包括磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random-Access-Memory,RAM)等。例如,在一个实施例中,存储器包括非易失性存储介质及内存储器。非易失性存储介质存储有操作***和计算机程序。该计算机程序可被处理器所执行,以用于实现以下各个实施例所提供的一种图像处理方法。内存储器为非易失性存储介质中的操作***计算机程序提供高速缓存的运行环境。网络接口可以是以太网卡或无线网卡等,用于与外部的终端设备进行通信。该终端设备可以是手机、平板电脑或者个人数字助理或穿戴式设备等。
图2为一个实施例中图像处理方法的流程图。如图2所示,图像处理方法包括操作202至操作206。
操作202,识别终端设备拍摄图像中的各个物体及各个物体所在的区域。
具体地,各个物体所在的区域可以用矩形框表示,终端设备可以将拍摄图像上矩形框的位置信息存储在终端设备的内存中。
操作204,根据各个区域的几何中心与拍摄图像的几何中心之间的距离,从各个区域中选取目标区域。
在本操作中,当各个物体所在的区域用矩形框表示时,终端设备可以将各个矩形框区域中几何中心与拍摄图像的几何中心之间的距离在一定范围内的区域设为目标区域。终端设备也可以将各个矩形框区域中几何中心与拍摄图像的几何中心之间距离最近的区域设为目标区域,终端设备可以根据实际的拍摄场景调整目标矩形框区域与拍摄图像的几何中心之间的距离。
操作206,对目标区域进行对焦处理。
对于操作206,对焦是指终端设备摄像头的对焦机构通过调整物距和相距之间的位置,使被拍摄的物体成像清晰的过程。
在一个实施例中,在识别终端设备拍摄图像中的各个物体及各个物体所在的区域之前,终端设备可以执行以下操作:对终端设备的摄像头进行监测;当监测到摄像头启动时,对终端设备拍摄图像中的各个物体进行识别。
在上述实施例中,终端设备可以在检测到终端设备在预设时间内不再移动时,对终端设备拍摄图像中的各个物体进行识别,其中,预设时间可以根据实际需要进行适当的调整。
上述实施例,在监测到摄像头启动且终端设备在预设时间内不再移动时,对终端设备拍摄图像中的各个物体及各个物体所在的区域进行识别,再根据各个区域的几何中心与拍摄图像的几何中心之间的距离,从各个区域中选取目标区域,对目标区域进行对焦处理,可以避免在终端设备移动的过程中对非目标物体的识别,实现在终端设备不再移动时,自动对拍摄图像中目标区域对应的目标物体进行识别和对焦。
在一个实施例中,操作202可以包括:根据预先训练的模型,对终端设备拍摄图像中的 各个物体及各个物体所在的区域进行识别;其中,模型根据各个物体的类别及标定拍摄图像中各个物***置的数据集训练得到的。
在上述实施例中,在训练模型时,可以预先准备上万类别物体的拍摄图像,其中,每类别物体的拍摄图像可以准备多张,采集拍摄图像中标定各类别物***置的数据集。比方说,可以准备花朵、树木、水杯等上万类别物体的拍摄图像,每类物体的拍摄图像可以准备5000张左右,例如,准备5000张花朵的拍摄图像,采集各张花朵拍摄图像中标定花朵位置的数据集。其中,在训练模型时,可以运用目标检测算法(例如,单发多箱探测器(Single Shot MultiBox Detector,SSD)算法或卷积神经网络区域(Regions with Convolutional Neural Network)算法对物体的类别及物体的位置进行识别,也可以基于黑网(darknet)深度学习训练框架,采用单次查看(You Only Look Once,YOLO)算法对应的网络结构,将标定好的数据集按规定的格式准备好,再执行训练。训练好的模型可以部署到终端设备上,在终端设备对目标物体进行拍摄时可以调用该模型,实现对目标物体类别以及在拍摄图像中所在位置的识别。
上述实施例,根据目标检测算法训练模型,根据训练的模型对终端设备拍摄图像中的各个物体及各个物体所在的区域进行识别,再根据各个区域的几何中心与拍摄图像的几何中心之间的距离,从各个区域中选取目标区域,对目标区域进行对焦处理,可以实现自动对拍摄图像中目标区域对应的目标物体进行识别和对焦。
在一个实施例中,从各个区域中选取目标区域时,可以执行以下操作:获取各个区域的几何中心与拍摄图像的几何中心之间的距离;从各个区域中选取距离最近的区域设为目标区域。
在上述实施例中,终端设备可以获取物体的高度和宽度,根据物体的高度和宽度将物体所在的区域用矩形框来表示。终端设备可以获取矩形框的几何中心与拍摄图像的几何中心之间的距离,拍摄图像时,目标物体可以处在拍摄图像正中央位置的附近,终端设备可以将几何中心与拍摄图像的几何中心最近的矩形框设为目标区域,目标区域中对应的物体即为拍摄的目标物体。
上述实施例,对终端设备拍摄图像中的各个物体及各个物体所在的区域进行识别,再根据各个区域的几何中心与拍摄图像的几何中心之间的距离,从各个区域中选取距离最近的区域设为目标区域,对目标区域进行对焦处理,可以实现自动对拍摄图像中,中央位置附近的目标区域对应的目标物体进行识别和对焦。
在一个实施例中,可以通过以下操作从各个区域中选取距离最近的区域设为目标区域:从各个区域中选取面积不超过面积阈值的候选区域;从候选区域中选取距离最近的区域设为目标区域。
在上述实施例中,终端设备可以预先设定候选区域面积的取值范围,将各个区域中面积在取值范围内的区域设为候选区域。终端设备也可以预先设定目标物体对应的矩形框占拍摄图像的总面积的比例范围,例如,终端设备可以将比例范围设为25%至70%,将占拍摄图像的总面积的比例范围低于25%或高于70%的矩形框设为非候选区域,在排除非候选区域之后,终端设备从候选区域中选取距离拍摄图像的几何中心最近的区域设为目标区域。
上述实施例,对终端设备拍摄图像中的各个物体及各个物体所在的区域进行识别,从各个区域中选取面积不超过面积阈值的候选区域,再从候选区域中选取距离最近的区域设为目标区域,对目标区域进行对焦处理,可以先排除掉面积超过面积阈值的区域,可以更精确地实现自动对拍摄图像中目标区域对应的目标物体进行识别和对焦。
在一个实施例中,还可以通过以下操作对目标区域进行对焦处理:当多个目标区域的面积大小相等时,从多个目标区域中随机选取一个区域进行对焦处理。
在上述实施例中,若几何中心与拍摄图像几何中心的距离最近的区域有多个时,该拍摄图像就存在多个目标区域,若多个目标区域的面积大小不相等,则终端设备可以从多个目标区域中选取面积最大的目标区域进行对焦,若多个目标区域的面积大小也相等,则终端设备 可以从多个目标区域中随机选取一个区域进行对焦处理。
上述实施例,对终端设备拍摄图像中的各个物体及各个物体所在的区域进行识别,从各个区域中选取面积不超过面积阈值的候选区域,再从候选区域中选取距离最近的区域设为目标区域,对目标区域进行对焦处理,可以先排除掉面积超过面积阈值的区域,若存在多个目标区域,则选择面积最大的区域进行对焦,若多个面积大小相等,则从多个目标区域中随机选取一个区域进行对焦处理,可以实现自动从拍摄图像的多个目标区域中选择一个进行对焦。
在一个实施例中,如图3所示,图像处理方法可以包括以下操作:
操作302,通过对终端设备的摄像头进行监测判断摄像头是否启动;若是,则执行操作304,根据预先训练的模型,对终端设备拍摄图像中的各个物体进行识别;在识别了拍摄图像中的各个物体之后,执行操作306,判断各个区域是否是面积不超过面积阈值的候选区域;若否,则执行操作308,排除面积超过面积阈值的非候选区域;若是,则执行操作310,判断各个区域中几何中心与拍摄图像的几何中心之间的距离最近的目标区域是否多个;若否,则执行操作312,对距离最近的目标区域进行对焦处理;若是,则执行操作314,判断与拍摄图像的几何中心之间的距离最近的多个目标区域的面积是否相等;若否,则执行操作316,在多个目标区域中选择面积最大的目标区域进行对焦处理;若是,则执行操作318,从多个目标区域中随机选取一个区域进行对焦处理。
上述实施例,在监测到摄像头启动,并且终端设备在预设时间内不再移动时,对终端设备拍摄图像中的各个物体及各个物体所在的区域进行识别,可以避免在终端设备移动的过程中对非目标物体的识别。从各个区域中选取面积不超过面积阈值的候选区域,再从候选区域中选取距离最近的区域设为目标区域,对目标区域进行对焦处理,可以先排除掉面积超过面积阈值的区域,若存在多个目标区域,则选择面积最大的区域进行对焦,若多个面积大小相等,则从多个目标区域中随机选取一个区域进行对焦处理,可以实现自动从拍摄图像的多个目标区域中选择一个进行对焦。
应该理解的是,虽然图2和图3的流程图中的各个操作按照箭头的指示依次显示,但是这些操作并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些操作的执行并没有严格的顺序限制,这些操作可以以其它的顺序执行。而且,图2和图3中的至少一部分操作可以包括多个子操作或者多个阶段,这些子操作或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子操作或者阶段的执行顺序也不必然是依次进行,而是可以与其它操作或者其它操作的子操作或者阶段的至少一部分轮流或者交替地执行。
图4为一个实施例的图像处理装置的结构框图。如图4所示,本实施例的图像处理装置包括:
识别模块402,用于识别终端设备拍摄图像中的各个物体及各个物体所在的区域;
选取模块404,用于根据各个区域的几何中心与拍摄图像的几何中心之间的距离,从各个区域中选取待对焦的目标区域;
对焦模块406,用于对目标区域进行对焦处理。
上述图像处理装置,对终端设备拍摄图像中的各个物体及各个物体所在的区域进行识别,再根据各个区域的几何中心与拍摄图像的几何中心之间的距离,从各个区域中选取目标区域,对目标区域进行对焦处理,可以实现自动对拍摄图像中目标区域对应的目标物体进行识别和对焦。
在一个实施例中,还可以包括监测模块,监测模块用于对终端设备的摄像头进行监测;当监测到摄像头启动时,对终端设备拍摄图像中的各个物体进行识别。
在一个实施例中,识别模块402还用于根据预先训练的模型,对终端设备拍摄图像中的各个物体及各个物体所在的区域进行识别;其中,模型根据各个物体的类别及标定拍摄图像中各个物***置的数据集训练得到的。
在一个实施例中,选取模块404还用于获取各个区域的几何中心与拍摄图像的几何中心之间的距离;从各个区域中选取距离最近的区域设为目标区域。
在一个实施例中,选取模块404还用于从各个区域中选取面积不超过面积阈值的候选区域;从候选区域中选取距离最近的区域设为目标区域。
在一个实施例的图像处理装置中,对焦模块406还用于当距离最近的目标区域有多个时,对多个目标区域中面积最大的目标区域进行对焦处理。
在一个实施例的图像处理装置中,对焦模块406还用于当多个目标区域的面积大小相等时,从多个目标区域中随机选取一个区域进行对焦处理。
上述图像处理装置中各个模块的划分仅用于举例说明,在其他实施例中,可将图像处理装置按照需要划分为不同的模块,以完成上述图像处理装置的全部或部分功能。
关于图像处理装置的具体限定可以参见上文中对于图像处理方法的限定,在此不再赘述。上述图像处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
本申请实施例中提供的图像处理装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端设备或服务器上运行。该计算机程序构成的程序模块可存储在终端设备或服务器的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述方法的操作。
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当计算机可执行指令被一个或多个处理器执行时,使得处理器执行以下操作:
识别终端设备拍摄图像中的各个物体及各个物体所在的区域;
根据各个区域的几何中心与拍摄图像的几何中心之间的距离,从各个区域中选取目标区域;
对目标区域进行对焦处理。
在一个实施例中,当计算机可执行指令被一个或多个处理器执行时,还使得处理器执行以下操作:对终端设备的摄像头进行监测;当监测到摄像头启动时,对终端设备拍摄图像中的各个物体进行识别。
在一个实施例中,当计算机可执行指令被一个或多个处理器执行时,还使得处理器执行以下操作:根据预先训练的模型,对终端设备拍摄图像中的各个物体及各个物体所在的区域进行识别;其中,模型根据各个物体的类别及标定拍摄图像中各个物***置的数据集训练得到的。
在一个实施例中,当计算机可执行指令被一个或多个处理器执行时,还使得处理器执行以下操作:获取各个区域的几何中心与拍摄图像的几何中心之间的距离;从各个区域中选取距离最近的区域设为目标区域。
在一个实施例中,当计算机可执行指令被一个或多个处理器执行时,还使得处理器执行以下操作:从各个区域中选取面积不超过面积阈值的候选区域;从候选区域中选取距离最近的区域设为目标区域。
在一个实施例中,当计算机可执行指令被一个或多个处理器执行时,还使得处理器执行以下操作:当距离最近的目标区域有多个时,对多个目标区域中面积最大的目标区域进行对焦处理。
在一个实施例中,当计算机可执行指令被一个或多个处理器执行时,还使得处理器执行以下操作:当多个目标区域的面积大小相等时,从多个目标区域中随机选取一个区域进行对焦处理。
一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行以下操作:
识别终端设备拍摄图像中的各个物体及各个物体所在的区域;
根据各个区域的几何中心与拍摄图像的几何中心之间的距离,从各个区域中选取目标区域;
对目标区域进行对焦处理。
在一个实施例中,包含指令的计算机程序产品,当其在计算机上运行时,还使得计算机执行以下操作:对终端设备的摄像头进行监测;当监测到摄像头启动时,对终端设备拍摄图像中的各个物体进行识别。
在一个实施例中,包含指令的计算机程序产品,当其在计算机上运行时,还使得计算机执行以下操作:根据预先训练的模型,对终端设备拍摄图像中的各个物体及各个物体所在的区域进行识别;其中,模型根据各个物体的类别及标定拍摄图像中各个物***置的数据集训练得到的。
在一个实施例中,包含指令的计算机程序产品,当其在计算机上运行时,还使得计算机执行以下操作:获取各个区域的几何中心与拍摄图像的几何中心之间的距离;从各个区域中选取距离最近的区域设为目标区域。
在一个实施例中,包含指令的计算机程序产品,当其在计算机上运行时,还使得计算机执行以下操作:从各个区域中选取面积不超过面积阈值的候选区域;从候选区域中选取距离最近的区域设为目标区域。
在一个实施例中,包含指令的计算机程序产品,当其在计算机上运行时,还使得计算机执行以下操作:当距离最近的目标区域有多个时,对多个目标区域中面积最大的目标区域进行对焦处理。
在一个实施例中,包含指令的计算机程序产品,当其在计算机上运行时,还使得计算机执行以下操作:当多个目标区域的面积大小相等时,从多个目标区域中随机选取一个区域进行对焦处理。
本申请实施例还提供一种终端设备。上述终端设备中包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image Signal Processing,图像信号处理)管线的各种处理单元。图5为一个实施例中图像处理电路的示意图。如图5所示,为便于说明,仅示出与本申请实施例相关的图像处理技术的各个方面。
如图5所示,图像处理电路包括ISP处理器540和控制逻辑器550。成像设备510捕捉的图像数据首先由ISP处理器540处理,ISP处理器540对图像数据进行分析以捕捉可用于确定和/或成像设备510的一个或多个控制参数的图像统计信息。成像设备510可包括具有一个或多个透镜512和图像传感器514的照相机。图像传感器514可包括色彩滤镜阵列(如Bayer滤镜),图像传感器514可获取用图像传感器514的每个成像像素捕捉的光强度和波长信息,并提供可由ISP处理器540处理的一组原始图像数据。传感器520(如陀螺仪)可基于传感器520接口类型把采集的图像处理的参数(如防抖参数)提供给ISP处理器540。传感器520接口可以利用SMIA(Standard Mobile Imaging Architecture,标准移动成像架构)接口、其它串行或并行照相机接口或上述接口的组合。
此外,图像传感器514也可将原始图像数据发送给传感器520,传感器520可基于传感器520接口类型把原始图像数据提供给ISP处理器540,或者传感器520将原始图像数据存储到图像存储器530中。
ISP处理器540按多种格式逐个像素地处理原始图像数据。例如,每个图像像素可具有8、10、12或14比特的位深度,ISP处理器540可对原始图像数据进行一个或多个图像处理操作、收集关于图像数据的统计信息。其中,图像处理操作可按相同或不同的位深度精度进行。
ISP处理器540还可从图像存储器530接收图像数据。例如,传感器520接口将原始图像数据发送给图像存储器530,图像存储器530中的原始图像数据再提供给ISP处理器540以供处理。图像存储器530可为存储器装置的一部分、存储设备、或终端设备内的独立的专用存储器,并可包括DMA(Direct Memory Access,直接直接存储器存取)特征。
当接收到来自图像传感器514接口或来自传感器520接口或来自图像存储器530的原始图像数据时,ISP处理器540可进行一个或多个图像处理操作,如时域滤波。处理后的图像数据可发送给图像存储器530,以便在被显示之前进行另外的处理。ISP处理器540从图像存储器530接收处理数据,并对处理数据进行原始域中以及RGB和YCbCr颜色空间中的图像数 据处理。ISP处理器540处理后的图像数据可输出给显示器570,以供用户观看和/或由图形引擎或GPU(Graphics Processing Unit,图形处理器)进一步处理。此外,ISP处理器540的输出还可发送给图像存储器530,且显示器570可从图像存储器530读取图像数据。在一个实施例中,图像存储器530可被配置为实现一个或多个帧缓冲器。此外,ISP处理器540的输出可发送给编码器/解码器560,以便编码/解码图像数据。编码的图像数据可被保存,并在显示于显示器570设备上之前解压缩。编码器/解码器560可由CPU或GPU或协处理器实现。
ISP处理器540确定的统计数据可发送给控制逻辑器550单元。例如,统计数据可包括自动曝光、自动白平衡、自动聚焦、闪烁检测、黑电平补偿、透镜512阴影校正等图像传感器514统计信息。控制逻辑器550可包括执行一个或多个例程(如固件)的处理器和/或微控制器,一个或多个例程可根据接收的统计数据,确定成像设备510的控制参数及ISP处理器540的控制参数。例如,成像设备510的控制参数可包括传感器520控制参数(例如增益、曝光控制的积分时间、防抖参数等)、照相机闪光控制参数、透镜512控制参数(例如聚焦或变焦用焦距)、或这些参数的组合。ISP控制参数可包括用于自动白平衡和颜色调整(例如,在RGB处理期间)的增益水平和色彩校正矩阵,以及透镜512阴影校正参数。
以下为运用图5中图像处理技术实现图像处理方法的操作:
识别终端设备拍摄图像中的各个物体及各个物体所在的区域;
根据各个区域的几何中心与拍摄图像的几何中心之间的距离,从各个区域中选取目标区域;
对目标区域进行对焦处理。
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。合适的非易失性存储器可包括只读存储器(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 (16)

  1. 一种图像处理方法,包括:
    识别终端设备拍摄图像中的各个物体及各个物体所在的区域;
    根据各个所述区域的几何中心与拍摄图像的几何中心之间的距离,从各个所述区域中选取目标区域;及
    对所述目标区域进行对焦处理。
  2. 根据权利要求1所述的图像处理方法,其特征在于,所述识别终端设备拍摄图像中的各个物体及各个物体所在的区域之前,包括:
    对终端设备的摄像头进行监测;及
    当监测到所述摄像头启动时,对终端设备拍摄图像中的各个物体进行识别。
  3. 根据权利要求1或2所述的图像处理方法,其特征在于,所述识别终端设备拍摄图像中的各个物体及各个物体所在的区域,包括:
    根据预先训练的模型,对终端设备拍摄图像中的各个物体及各个物体所在的区域进行识别;其中,所述模型根据各个物体的类别及标定拍摄图像中各个物***置的数据集训练得到的。
  4. 根据权利要求1或2所述的图像处理方法,其特征在于,所述根据各个所述区域的几何中心与拍摄图像的几何中心之间的距离,从各个所述区域中选取目标区域,包括:
    获取各个所述区域的几何中心与拍摄图像的几何中心之间的距离;及
    从各个所述区域中选取所述距离最近的区域设为目标区域。
  5. 根据权利要求4所述的图像处理方法,其特征在于,所述从各个所述区域中选取所述距离最近的区域设为目标区域,包括:
    从各个所述区域中选取面积不超过面积阈值的候选区域;及
    从候选区域中选取所述距离最近的区域设为目标区域。
  6. 根据权利要求4所述的图像处理方法,其特征在于,所述对所述目标区域进行对焦处理,包括:
    当距离最近的目标区域有多个时,对多个目标区域中面积最大的目标区域进行对焦处理。
  7. 根据权利要求6所述的图像处理方法,其特征在于,所述对所述目标区域进行对焦处理,还包括:
    当多个目标区域的面积大小相等时,从所述多个目标区域中随机选取一个区域进行对焦处理。
  8. 一种图像处理装置,其特征在于,包括:
    识别模块,用于识别终端设备拍摄图像中的各个物体及各个物体所在的区域;
    选取模块,用于根据各个所述区域的几何中心与拍摄图像的几何中心之间的距离,从各个所述区域中选取待对焦的目标区域;
    对焦模块,用于对所述目标区域进行对焦处理。
  9. 一种终端设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下操作:
    识别终端设备拍摄图像中的各个物体及各个物体所在的区域;
    根据各个所述区域的几何中心与拍摄图像的几何中心之间的距离,从各个所述区域中选取目标区域;及
    对所述目标区域进行对焦处理。
  10. 根据权利要求9所述的终端设备,其特征在于,所述处理器执行所述识别终端设备拍摄图像中的各个物体及各个物体所在的区域之前,还执行如下操作:
    对终端设备的摄像头进行监测;及
    当监测到所述摄像头启动时,对终端设备拍摄图像中的各个物体进行识别。
  11. 根据权利要求9或10所述的终端设备,其特征在于,所述处理器执行所述识别终端设备拍摄图像中的各个物体及各个物体所在的区域时,还执行如下操作:
    根据预先训练的模型,对终端设备拍摄图像中的各个物体及各个物体所在的区域进行识别;其中,所述模型根据各个物体的类别及标定拍摄图像中各个物***置的数据集训练得到的。
  12. 根据权利要求9或10所述的终端设备,其特征在于,所述处理器执行所述根据各个所述区域的几何中心与拍摄图像的几何中心之间的距离,从各个所述区域中选取目标区域时,还执行如下操作:
    获取各个所述区域的几何中心与拍摄图像的几何中心之间的距离;及
    从各个所述区域中选取所述距离最近的区域设为目标区域。
  13. 根据权利要求12所述的终端设备,其特征在于,所述处理器执行所述从各个所述区域中选取所述距离最近的区域设为目标区域时,还执行如下操作:
    从各个所述区域中选取面积不超过面积阈值的候选区域;及
    从候选区域中选取所述距离最近的区域设为目标区域。
  14. 根据权利要求12所述的终端设备,其特征在于,所述处理器执行所述对所述目标区域进行对焦处理时,还执行如下操作:
    当距离最近的目标区域有多个时,对多个目标区域中面积最大的目标区域进行对焦处理。
  15. 根据权利要求14所述的终端设备,其特征在于,所述处理器执行所述对所述目标区域进行对焦处理时,还执行如下操作:
    当多个目标区域的面积大小相等时,从所述多个目标区域中随机选取一个区域进行对焦处理。
  16. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7中任一项所述的图像处理方法的操作。
PCT/CN2019/093460 2018-08-14 2019-06-28 图像处理方法和装置、终端设备、计算机可读存储介质 WO2020034776A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810922523.X 2018-08-14
CN201810922523.XA CN110830709A (zh) 2018-08-14 2018-08-14 图像处理方法和装置、终端设备、计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2020034776A1 true WO2020034776A1 (zh) 2020-02-20

Family

ID=69525106

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/093460 WO2020034776A1 (zh) 2018-08-14 2019-06-28 图像处理方法和装置、终端设备、计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN110830709A (zh)
WO (1) WO2020034776A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112801008B (zh) * 2021-02-05 2024-05-31 电子科技大学中山学院 行人重识别方法、装置、电子设备及可读存储介质
CN114565897B (zh) * 2022-01-19 2023-04-28 北京深睿博联科技有限责任公司 一种红绿灯路口导盲方法及装置
CN114554086B (zh) * 2022-02-10 2024-06-25 支付宝(杭州)信息技术有限公司 一种辅助拍摄方法、装置及电子设备
CN115644933B (zh) * 2022-11-17 2023-08-22 深圳微创踪影医疗装备有限公司 导管冲刷控制方法、装置、计算机设备、存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004246160A (ja) * 2003-02-14 2004-09-02 Sanyo Electric Co Ltd オートフォーカスカメラ
CN104270562A (zh) * 2014-08-15 2015-01-07 广东欧珀移动通信有限公司 一种拍照对焦方法和拍照对焦装置
CN106874954A (zh) * 2017-02-20 2017-06-20 佛山市络思讯科技有限公司 一种信息获取的方法以及相关装置
CN107566731A (zh) * 2017-09-28 2018-01-09 努比亚技术有限公司 一种对焦方法及终端、计算机存储介质
CN108076278A (zh) * 2016-11-10 2018-05-25 阿里巴巴集团控股有限公司 一种自动对焦方法、装置及电子设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4207980B2 (ja) * 2006-06-09 2009-01-14 ソニー株式会社 撮像装置、および撮像装置制御方法、並びにコンピュータ・プログラム
JP4218720B2 (ja) * 2006-09-22 2009-02-04 ソニー株式会社 撮像装置、および撮像装置制御方法、並びにコンピュータ・プログラム
JP5990951B2 (ja) * 2012-03-15 2016-09-14 オムロン株式会社 撮影装置、撮影装置の制御方法、撮影装置制御プログラム、および該プログラムを記録したコンピュータ読み取り可能な記録媒体
JP2016075653A (ja) * 2014-10-09 2016-05-12 シャープ株式会社 画像認識処理装置及びプログラム
CN104333748A (zh) * 2014-11-28 2015-02-04 广东欧珀移动通信有限公司 获取图像主体对象的方法、装置及终端
CN105898135A (zh) * 2015-11-15 2016-08-24 乐视移动智能信息技术(北京)有限公司 相机成像方法及相机装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004246160A (ja) * 2003-02-14 2004-09-02 Sanyo Electric Co Ltd オートフォーカスカメラ
CN104270562A (zh) * 2014-08-15 2015-01-07 广东欧珀移动通信有限公司 一种拍照对焦方法和拍照对焦装置
CN108076278A (zh) * 2016-11-10 2018-05-25 阿里巴巴集团控股有限公司 一种自动对焦方法、装置及电子设备
CN106874954A (zh) * 2017-02-20 2017-06-20 佛山市络思讯科技有限公司 一种信息获取的方法以及相关装置
CN107566731A (zh) * 2017-09-28 2018-01-09 努比亚技术有限公司 一种对焦方法及终端、计算机存储介质

Also Published As

Publication number Publication date
CN110830709A (zh) 2020-02-21

Similar Documents

Publication Publication Date Title
WO2020001197A1 (zh) 图像处理方法、电子设备、计算机可读存储介质
WO2019233394A1 (zh) 图像处理方法和装置、存储介质、电子设备
WO2019233393A1 (zh) 图像处理方法和装置、存储介质、电子设备
WO2019233263A1 (zh) 视频处理方法、电子设备、计算机可读存储介质
WO2020034776A1 (zh) 图像处理方法和装置、终端设备、计算机可读存储介质
WO2019233341A1 (zh) 图像处理方法、装置、计算机可读存储介质和计算机设备
WO2019237887A1 (zh) 图像处理方法、电子设备、计算机可读存储介质
CN107886484B (zh) 美颜方法、装置、计算机可读存储介质和电子设备
US11233933B2 (en) Method and device for processing image, and mobile terminal
CN110536068B (zh) 对焦方法和装置、电子设备、计算机可读存储介质
CN108024107B (zh) 图像处理方法、装置、电子设备及计算机可读存储介质
WO2019233392A1 (zh) 图像处理方法、装置、电子设备和计算机可读存储介质
WO2020259474A1 (zh) 追焦方法、装置、终端设备、计算机可读存储介质
WO2020001196A1 (zh) 图像处理方法、电子设备、计算机可读存储介质
CN108717530B (zh) 图像处理方法、装置、计算机可读存储介质和电子设备
WO2019223594A1 (zh) 神经网络模型处理方法和装置、图像处理方法、移动终端
CN108897786B (zh) 应用程序的推荐方法、装置、存储介质及移动终端
WO2019233271A1 (zh) 图像处理方法、计算机可读存储介质和电子设备
US20220222830A1 (en) Subject detecting method and device, electronic device, and non-transitory computer-readable storage medium
CN108848306B (zh) 图像处理方法和装置、电子设备、计算机可读存储介质
CN109712177B (zh) 图像处理方法、装置、电子设备和计算机可读存储介质
CN108804658B (zh) 图像处理方法和装置、存储介质、电子设备
CN110956679B (zh) 图像处理方法和装置、电子设备、计算机可读存储介质
WO2019223513A1 (zh) 图像识别方法、电子设备和存储介质
CN109068060B (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: 19850328

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19850328

Country of ref document: EP

Kind code of ref document: A1