WO2017067262A1 - 一种图像处理方法和装置 - Google Patents

一种图像处理方法和装置 Download PDF

Info

Publication number
WO2017067262A1
WO2017067262A1 PCT/CN2016/091821 CN2016091821W WO2017067262A1 WO 2017067262 A1 WO2017067262 A1 WO 2017067262A1 CN 2016091821 W CN2016091821 W CN 2016091821W WO 2017067262 A1 WO2017067262 A1 WO 2017067262A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
target
contour
area
processed
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2016/091821
Other languages
English (en)
French (fr)
Inventor
陈天龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shirui Electronics Co Ltd
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 Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shirui Electronics Co Ltd
Publication of WO2017067262A1 publication Critical patent/WO2017067262A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Definitions

  • the present application relates to the field of image processing technologies, and more particularly to an image processing method and apparatus.
  • the physical display stand can also be called a video physical display stand or a text camera. It is an information collecting device that converts documents, pictures or objects into high-definition image information through a camera based on photoelectric conversion technology. At the same time, through the physical display stand, the converted image information can also be output to a display device such as a projection screen or a computer display screen for display.
  • a display device such as a projection screen or a computer display screen for display.
  • the working principle of the physical display stand is: the user puts objects such as books and documents on the table of the display stand, and the camera on the physical display stand is aimed at the physical object on the table, and finally the physical picture is output.
  • the operator In the process of imaging, in order to enable the control module of the physical display stand to recognize the physical object to be ingested on the table, the operator needs to indicate the position of the physical object in real time, so that the image finally taken and imaged can completely and clearly display the physical object. .
  • the complexity of the physical display station is increased.
  • the present application provides an image processing method and apparatus for improving the convenience of image capturing of a physical object on a platform such as a countertop.
  • an image processing method including:
  • a target image for output is generated based on an image within the target contour region.
  • the generating a target image for output based on an image in the target contour region comprises:
  • the method further includes:
  • the method further includes:
  • generating, based on the image in the target contour region, a target image for output including:
  • a target image for output is generated based on the image in the target contour area.
  • the method before performing edge detection on the image to be processed, the method further includes:
  • Extracting the contour line in the image to be processed based on the result of the edge detection includes:
  • the contoured image is extracted from the binarized image to obtain an outline in the image to be processed.
  • an embodiment of the present application further provides an image processing apparatus, including:
  • An image obtaining unit configured to acquire a currently-processed image to be processed
  • An edge detecting unit configured to perform edge detection on the image to be processed
  • a contour extracting unit configured to extract an outline in the image to be processed based on a result of the edge detection
  • a region determining unit configured to determine a target contour region having the largest area from the plurality of contour regions in which the image to be processed is divided by the contour line;
  • a target extracting unit configured to generate a target image for output based on an image within the target contour region.
  • the target extraction unit includes:
  • a rectangular matching unit configured to determine a circumscribed rectangle of the target contour area
  • an image conversion unit configured to map an image in the target contour area into the circumscribed rectangle to generate a target image presented in the circumscribed rectangle.
  • the method further includes:
  • An image mapping unit configured to: after the image conversion unit maps an image in the target contour region to the circumscribed rectangle, map an image presented in the circumscribed rectangle to a specified rectangle to generate a target for output An image, wherein one side of the designated rectangle is parallel to a preset horizontal coordinate axis.
  • the method further includes:
  • a historical data collecting unit configured to acquire an area value of a historical contour area in a historical image acquired by the most recent M times before the current time after the target area with the largest area is determined, where the M is a preset number,
  • the historical contour area is the contour area having the largest area in the historical image;
  • the target extraction unit includes:
  • a target extraction subunit configured to generate a target image for output based on an image in the target contour region when an area value of the target contour region and an area value of the historical contour region satisfy a preset condition.
  • the method further includes:
  • a smoothing processing unit configured to perform smooth denoising on the image to be processed before the edge detecting unit performs edge detection on the image to be processed;
  • the contour extraction unit includes:
  • An intermediate processing unit is configured to perform expansion and etching processing on the image to be processed after the edge detection to obtain a binarized image
  • a contour extraction subunit configured to perform contour line extraction on the binarized image to obtain an outline in the image to be processed.
  • the embodiment of the present application performs edge detection on the image to be processed, and extracts an outline in the image to be processed, and then determines to be in a position to be processed.
  • the contour area with the largest area in the image is determined, and the image area to be ingested in the image to be processed should be the largest due to the normal imaging situation, and therefore, the target generated based on the image in the contour area having the largest area in the image to be processed.
  • the image is also an image of the object to be ingested, so that the user can extract the physical image from the acquired image without real-time indication of the physical location, and the convenience of image capturing is greatly simplified while accurately extracting the physical image.
  • FIG. 1 is a schematic flow chart of an embodiment of an image processing method of the present application.
  • FIG. 2 is a schematic flow chart of another embodiment of an image processing method according to the present application.
  • FIG. 3 is a schematic flow chart showing another embodiment of an image processing method according to the present application.
  • FIG. 4 is a block diagram showing an embodiment of an image processing apparatus of the present application.
  • FIG. 1 a schematic flowchart of an embodiment of an image processing method according to the present application is shown.
  • the method in this embodiment can be applied to any image processing device.
  • the method can be applied to a physical display platform to The camera in the display platform picks up an image containing a physical object on the table top and the counter surface for processing; for example, the method can also be applied to a terminal having an image capturing or image processing function such as a mobile terminal, so as to process the captured image.
  • the physical image contained in the image is extracted.
  • the method of this embodiment may include:
  • edge detection and the extraction contour can be any existing manner, and are not limited herein.
  • the image to be processed generally includes a plurality of contour lines, the plurality of contour lines divide the image to be processed into a plurality of contour regions, and an image of the object to be ingested during normal intake of the object to be ingested.
  • the area occupied by the image to be processed should be the largest. Therefore, the contour area with the largest area in the image to be processed is the location area where the physical image is located, and is also the target image area to be extracted.
  • the contour region having the largest area among the plurality of contour regions in the image to be processed is referred to as a target contour region.
  • the target image can be understood as the image to be ingested and finally imaged.
  • the physical display platform is taken as an example, and the target image finally generated can be understood as an image that needs to be output to a projection screen or an electronic display screen.
  • the target image may be stored after the target image is generated in an actual application, or may be directly output to the display device for display, which is not limited herein.
  • the edge of the image to be processed is edge-detected, and the contour line in the image to be processed is extracted, and then the contour region with the largest area in the image to be processed is determined, and the image is normal.
  • the image area to be ingested in the image to be processed should be the largest. Therefore, the target image generated based on the image in the contour area having the largest area in the image to be processed is the image to be ingested, thereby realizing automatic extraction of the object.
  • the image can be used to extract the physical image from the acquired image without the user indicating the physical position in real time, and the convenience of image capturing is greatly simplified while accurately extracting the physical image.
  • the position of the object in real time by the user during the imaging process also affects the quality of the captured image
  • the method of the embodiment of the present application does not require operator participation in the imaging and image generation process, and also reduces the operator's The action affects the quality of the captured image.
  • acquiring the currently-processed image to be processed may specifically perform image acquisition or ingestion for the camera that controls the physical display platform, and acquire the physical display platform.
  • the image to be processed collected by the camera.
  • the image in the target contour region can be directly used as the target image for output or storage.
  • the circumscribed rectangle of the target contour region may also be determined, and the image in the target contour region may be mapped to the circumscribed rectangle.
  • a target image rendered in the circumscribed rectangle is generated.
  • the circumscribed rectangle of the target contour area can be realized by performing contour moment matching on the target contour area.
  • FIG. 2 is a schematic flowchart diagram of another embodiment of an image processing method according to the present application.
  • the method in this embodiment may include:
  • one side of the designated rectangle is parallel to the preset horizontal coordinate axis.
  • the position of the object may move, so that the angles of the objects taken at different times may be different.
  • the angle of the currently ingested page is presented with the previously ingested page.
  • Angle Differently, if the image of the page is directly output, the user's viewing will be affected. For example, the user may need to adjust the viewing line of sight to adapt to the change of the page.
  • a specified rectangle is set as needed, and the rectangle is parallel to the preset horizontal coordinate axis, so that the designation The rectangle is at a specific angle.
  • the image in the target contour area is mapped to the circumscribing rectangle
  • the image in the circumscribed rectangle needs to be mapped into the specified rectangle, so as to achieve an angle adjustment on the image in the circumscribed rectangle, so that the generated image is generated.
  • the objects in the target image are at the same angle, and after the target image is output, the viewer does not need to constantly adjust the viewing angle.
  • FIG. 3 is a schematic flowchart diagram of another embodiment of an image processing method according to the present application.
  • the method in this embodiment may include:
  • the M is a preset number; the historical contour area is a contour area having the largest area in the historical image.
  • the specific value of the M can be set as needed, for example, the contour area with the largest area in each of the five consecutive frames of historical images before the current time can be obtained.
  • the preset condition is a condition for characterizing that the ingested object changes.
  • the area value of the target contour area and the area value of the historical contour area satisfy the preset condition, it indicates that the physical object in the image to be taken and the object in the image captured before the current time have a large change, and the platform can be characterized.
  • the object taken up has changed. For example, if the page of a book is still taken by the physical display platform, in the process of ingesting the page, if the user does not turn the page, the physical display platform will always take the content of the current page, and the image of the page is collected. The area in the image to be taken is almost unchanged. If the user turns the page, during the page turning process, due to the mutual occlusion of the user and the page, the extracted maximum contour area may be greatly changed.
  • the preset condition may be set as needed.
  • the preset condition may be that the difference between the area value of the target contour area and the area value of the historical contour area is greater than a preset value.
  • the area change amount is determined based on the area value of the target contour area and the area value of the historical contour area. If the area change amount of the target contour area and the latest historical contour area before the current time is greater than the area change amount determined before the current time, Then it is determined that the current time meets the preset condition.
  • the area value of the target contour area and the area value of the historical contour area do not satisfy the preset condition, it indicates that the current ingested object is the same as the previously ingested object, so that it is not necessary to repeatedly generate the target image of the same object, thus
  • the next frame of the image to be processed can be directly acquired and processed without generating a target image to be output based on the image within the target contour region.
  • the circumscribed rectangle of the target contour area may also be determined first, and An image within the target contour area is mapped to the circumscribed rectangle to generate a target image that is presented in the circumscribed rectangle. of course. Before the target image is generated, the object image may be angularly adjusted, and the image presented in the circumscribed rectangle may be mapped into the designated rectangle to generate a target image for output.
  • the method before performing edge detection on the image to be processed, the method further includes: performing smooth denoising on the image to be processed to obtain a smooth image; and then performing edge processing on the smooth image corresponding to the image to be processed. Detection.
  • the image to be processed after the edge detection may be expanded and etched to obtain a binarized image; and then binarized.
  • the image is contoured to obtain an outline in the image to be processed.
  • the image after the edge detection is expanded to make the image in the image to be processed highlighted
  • the area is gradually increased; and after the image to be processed is subjected to the expansion process, the image to be processed is subjected to a etching operation, thereby eliminating fine protrusions and eliminating the effect of causing the area.
  • an embodiment of the present application further provides an image processing apparatus.
  • FIG. 4 is a schematic structural diagram of another embodiment of an image processing apparatus according to the present application.
  • the apparatus of this embodiment may include:
  • An image obtaining unit 401 configured to acquire a currently-processed image to be processed
  • An edge detecting unit 402 configured to perform edge detection on the image to be processed
  • a contour extracting unit 403 configured to extract an outline in the image to be processed based on a result of the edge detection
  • the area determining unit 404 is configured to determine, from among the plurality of contour regions that are to be processed by the contour line, the target contour region with the largest area;
  • the target extraction unit 405 is configured to generate a target image for output based on the image in the target contour region.
  • the edge of the image to be processed is edge-detected, and the contour line in the image to be processed is extracted, and then the contour region with the largest area in the image to be processed is determined, and the image is normal.
  • the image area to be ingested in the image to be processed should be the largest, and therefore, the target image generated based on the image in the contour area having the largest area in the image to be processed may also be the image of the object to be ingested, thereby realizing automatic
  • the physical image is extracted, and the physical image can be extracted from the collected image without the user's real-time indication of the physical object, and the convenience of image capturing is greatly simplified while accurately extracting the physical image.
  • the position of the object in real time by the user during the imaging process also affects the quality of the captured image
  • the method of the embodiment of the present application does not require operator participation in the imaging and image generation process, and also reduces the operator's The action affects the quality of the captured image.
  • the target extraction unit in the foregoing device embodiment may include:
  • a rectangular matching unit configured to determine a circumscribed rectangle of the target contour area
  • an image conversion unit configured to map an image in the target contour area into the circumscribed rectangle to generate a target image presented in the circumscribed rectangle.
  • the device may further include:
  • An image mapping unit configured to: after the image conversion unit maps an image in the target contour region to the circumscribed rectangle, map an image presented in the circumscribed rectangle to a specified rectangle to generate a target for output An image, wherein one side of the designated rectangle is parallel to a preset horizontal coordinate axis.
  • the device may further include:
  • a historical data collecting unit configured to acquire an area value of a historical contour area in a historical image acquired by the most recent M times before the current time after the target area with the largest area is determined, where the M is a preset number,
  • the historical contour area is the contour area having the largest area in the historical image;
  • the target extraction unit includes:
  • a target extraction subunit configured to generate a target image for output based on an image in the target contour region when an area value of the target contour region and an area value of the historical contour region satisfy a preset condition.
  • the method may further include:
  • a smoothing processing unit configured to perform smooth denoising on the image to be processed before the edge detecting unit performs edge detection on the image to be processed;
  • the contour extraction unit includes:
  • An intermediate processing unit is configured to perform expansion and etching processing on the image to be processed after the edge detection to obtain a binarized image
  • a contour extraction subunit configured to perform contour line extraction on the binarized image to obtain an outline in the image to be processed.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Ultra Sonic Daignosis Equipment (AREA)
  • Alarm Systems (AREA)
  • Image Processing (AREA)

Abstract

本申请实施例提供了一种图像处理方法和装置,该方法包括:获取当前采集到的待处理图像;对该待处理图像进行边缘检测;基于该边缘检测的结果,提取该待处理图像中的轮廓线;从该待处理图像被轮廓线分割出的多个轮廓区域中,确定面积最大的目标轮廓区域;基于该目标轮廓区域内的图像,生成用于输出的目标图像。该方法和装置可以提高对台面等平台上的实物进行图像摄取的便捷性。

Description

一种图像处理方法和装置 技术领域
本申请涉及图像处理技术领域,更具体的说是涉及一种图像处理方法和装置。
背景技术
实物展示台也可以称为视频实物展示台或者文本摄像机,是以光电转换技术为基础,通过摄像机将文稿、图片或者实物等信息转换为高清晰的图像信息的信息采集设备。同时,通过实物展示台还可以将转换出的图像信息输出到投影屏幕、电脑显示屏等显示设备上进行展示。
实物展示台的工作原理为:用户将书本、文件等物体放到展示台的台面上,将该实物展示台上的摄像头对准台面上的实物进行摄像,并最终输出实物画面。在摄像过程中,为了能够使得实物展示台的控制模块能够识别出台面上待摄取的实物,需要操作者实时的指出实物所在的位置,以便使得最终摄取成像的图像可以完整清晰的显示出该实物。但是由于在摄像过程中需要操作者实时指出实物所在的位置,增加了实物展示台摄像的复杂度。
发明内容
有鉴于此,本申请提供了一种图像处理方法和装置,以提高对台面等平台上的实物进行图像摄取的便捷性。
为实现上述目的,本申请提供如下技术方案:一种图像处理方法,包括:
获取当前采集到的待处理图像;
对所述待处理图像进行边缘检测;
基于所述边缘检测的结果,提取所述待处理图像中的轮廓线;
从所述待处理图像被轮廓线分割出的多个轮廓区域中,确定面积最大的目标轮廓区域;
基于所述目标轮廓区域内的图像,生成用于输出的目标图像。
优选的,所述基于所述目标轮廓区域内的图像,生成用于输出的目标图像,包括:
确定出所述目标轮廓区域的外接矩形;
将所述目标轮廓区域内的图像映射到所述外接矩形中,生成呈现在所述外接矩形中的目标图像。
优选的,所述将所述目标轮廓区域内的图像映射到所述外接矩形之后,还包括:
将所述外接矩形内呈现的图像映射到指定矩形内,生成用于输出的目标图像,其中,所述指定矩形的一边与预设的水平坐标轴平行。
优选的,在所述确定面积最大的目标轮廓区域之后,还包括:
获取当前时刻之前最近M次采集到的历史图像中历史轮廓区域的面积值,其中,所述M为预设数,所述历史轮廓区域为所述历史图像中面积最大的轮廓区域;
则所述基于所述目标轮廓区域内的图像,生成用于输出的目标图像,包括:
当所述目标轮廓区域的面积值与所述历史轮廓区域的面积值满足预设条件时,基于所述目标轮廓区域内的图像,生成用于输出的目标图像。
优选的,在所述对所述待处理图像进行边缘检测之前,还包括:
对所述待处理图像进行平滑去噪;
所述基于所述边缘检测的结果,提取所述待处理图像中的轮廓线,包括:
对边缘检测后的待处理图像进行膨胀和腐蚀处理,得到二值化图像;
对所述二值化图像进行轮廓线提取,得到所述待处理图像中的轮廓线。
另一方面,本申请实施例还提供了一种图像处理装置,包括:
图像获取单元,用于获取当前采集到的待处理图像;
边缘检测单元,用于对所述待处理图像进行边缘检测;
轮廓提取单元,用于基于所述边缘检测的结果,提取所述待处理图像中的轮廓线;
区域确定单元,用于从所述待处理图像被轮廓线分割出的多个轮廓区域中,确定面积最大的目标轮廓区域;
目标提取单元,用于基于所述目标轮廓区域内的图像,生成用于输出的目标图像。
优选的,所述目标提取单元,包括:
矩形匹配单元,用于确定出所述目标轮廓区域的外接矩形;
图像转换单元,用于将所述目标轮廓区域内的图像映射到所述外接矩形中,生成呈现在所述外接矩形中的目标图像。
优选的,还包括:
图像映射单元,用于在所述图像转换单元将所述目标轮廓区域内的图像映射到所述外接矩形之后,将所述外接矩形内呈现的图像映射到指定矩形内,生成用于输出的目标图像,其中,所述指定矩形的一边与预设的水平坐标轴平行。
优选的,还包括:
历史数据采集单元,用于在所述确定面积最大的目标轮廓区域之后,获取当前时刻之前最近M次采集到的历史图像中历史轮廓区域的面积值,其中,所述M为预设数,所述历史轮廓区域为所述历史图像中面积最大的轮廓区域;
则所述目标提取单元,包括:
目标提取子单元,用于当所述目标轮廓区域的面积值与所述历史轮廓区域的面积值满足预设条件时,基于所述目标轮廓区域内的图像,生成用于输出的目标图像。
优选的,还包括:
平滑处理单元,用于在所述边缘检测单元对所述待处理图像进行边缘检测之前,对所述待处理图像进行平滑去噪;
所述轮廓提取单元,包括:
中间处理单元,用于对边缘检测后的待处理图像进行膨胀和腐蚀处理,得到二值化图像;
轮廓提取子单元,用于对所述二值化图像进行轮廓线提取,得到所述待处理图像中的轮廓线。
经由上述的技术方案可知,本申请实施例在获取到待处理图像后,对待处理图像进行边缘检测,并提取该待处理图像中的轮廓线,然后确定出待处 理图像中面积最大的轮廓区域,而由于正常摄像情况下,待摄取实物在该待处理图像中的图像区域应该最大,因此,基于该待处理图像中面积最大的轮廓区域内的图像生成的目标图像也就是待摄取实物的图像,从而无需用户实时指示实物位置,就可以实现从采集到的图像中提取实物图像,在准确提取实物图像的同时,大大简化了图像摄取的便捷性。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1示出了本申请一种图像处理方法一个实施例的流程示意图;
图2示出了本申请一种图像处理方法另一个实施例的流程示意图;
图3示出了本申请一种图像处理方法另一个实施例的流程示意图
图4示出了本申请一种图像处理装置一个实施例的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
参见图1,其示出了本申请一种图像处理方法一个实施例的流程示意图,本实施例的方法可以应用于任意图像处理设备中,如,该方法可以应用于实物展示平台,以对实物展示平台中的摄像头摄取到包含台面和台面上实物的图像进行处理;又如,该方法也可以应用于移动终端等具备图像摄取或者图像处理功能的终端中,以便对摄取到的图像进行处理,提取出该图像中包含的实物图像。本实施例的方法可以包括:
101,获取当前采集到的待处理图像。
102,对该待处理图像进行边缘检测。
103,基于该边缘检测的结果,提取该待处理图像中的轮廓线。
其中,边缘检测和提取轮廓线可以采用现有的任意方式,在此不加以限制。
104,从该待处理图像被轮廓线分割出的多个轮廓区域中,确定面积最大的目标轮廓区域。
可以理解的是,待处理图像一般会包括多条轮廓线,这多条轮廓线将该待处理图像分割为多个轮廓区域,而在对待摄取实物进行正常摄取的过程中,待摄取实物的图像在该待处理图像所占区域应该是最大的,因此,该待处理图像中面积最大的轮廓区域也就是该实物图像所在位置区域,也是待提取出的目标图像区域。
其中,为了便于区分,将该待处理图像中的多个轮廓区域中面积最大的轮廓区域称为目标轮廓区域。
105,基于该目标轮廓区域内的图像,生成用于输出的目标图像。
其中,该目标图像可以理解为最终待摄取成像的图像,如以实物展示平台为例,最终生成的该目标图像可以理解为需要输出至投影屏幕或电子显示屏上的图像。当然,在实际应用中生成该目标图像后可以存储该目标图像,也可以直接输出至显示设备进行显示,在此并不限制。
本申请实施例中,获取到待处理图像后,对待处理图像进行边缘检测,并提取该待处理图像中的轮廓线,然后确定出待处理图像中面积最大的轮廓区域,而由于正常摄像情况下,待摄取实物在该待处理图像中的图像区域应该最大,因此,基于该待处理图像中面积最大的轮廓区域内的图像生成的目标图像也就是待摄取实物的图像,从而实现了自动提取实物图像,无需用户实时指示实物位置,就可以实现从采集到的图像中提取实物图像,在准确提取实物图像的同时,大大简化了图像摄取的便捷性。
同时,摄像头在摄像过程中由用户实时指出实物的位置也会影响到摄取到的图像质量,而本申请实施例的方法在摄像以及图像生成过程都无需操作者参与,也减少了因操作者的动作而影响到摄取的图像质量的情况。
需要说明的是,当本申请实施例的方法应用于实物展示平台时,获取当前采集到的待处理图像则具体可以为控制实物展示平台的摄像头进行图像采集或摄取,并获取该实物展示平台的摄像头采集到的待处理图像。
可以理解的是,在实际应用中,从待处理图像中确定出面积最大的目标轮廓区域后,可以将目标轮廓区域内的图像直接作为用于输出或存储的目标图像。
考虑到目标轮廓区域的轮廓可能会存在不规则的问题,则在确定出目标轮廓区域之后,还可以确定出该目标轮廓区域的外接矩形,并将该目标轮廓区域内的图像映射到该外接矩形中,生成呈现在该外接矩形中的目标图像。
其中,目标轮廓区域的外接矩形可以通过对该目标轮廓区域进行轮廓矩匹配来实现。
参见图2,其示出了本申请一种图像处理方法另一个实施例的流程示意图,本实施例的方法可以包括:
201,获取当前采集到的待处理图像。
202,对该待处理图像进行边缘检测。
203,基于该边缘检测的结果,提取该待处理图像中的轮廓线。
204,从该待处理图像被轮廓线分割出的多个轮廓区域中,确定面积最大的目标轮廓区域。
205,确定出该目标轮廓区域的外接矩形。
206,将该目标轮廓区域内的图像映射到该外接矩形内。
以上步骤可以参见前面实施例的相关介绍。
207,将该外接矩形内呈现的图像映射到指定矩形内,生成用于输出的目标图像。
其中,该指定矩形的一边与预设的水平坐标轴平行。
在对实物进行摄像的过程中,该实物的位置可能会发生移动,这样,不同时刻拍摄出的实物所呈现的角度就可能会不同。以通过实物展示平台依次摄取一本书中各个页面为例,如果在摄取某书页的过程中,书的位置发生改变后,当前摄取到的页面所呈现的角度就与之前摄取到的页面所呈现的角度 不同,这样如果直接输出该页面的图像就会影响到用户的观看,例如,用户可能需要调整观看视线以适应页面的改变等。
为了避免不同时刻摄取到的图像中该实物所呈现的角度不一致的情况,在本申请实施例中,根据需要设定了指定的矩形,该矩形与预设的水平面坐标轴平行,以使得该指定矩形处于特定的角度。同时,在将该目标轮廓区域内的图像映射到外接矩形之后,还需要将该外接矩形中的图像映射到该指定矩形中,以实现对该外接矩形内的图像进行角度调整,以使生成的所有目标图像中该实物处于相同的角度,进而在输出该目标图像后,观看者也无需不断调整观看视角。
参见图3,其示出了本申请一种图像处理方法另一个实施例的流程示意图,本实施例的方法可以包括:
301,获取当前采集到的待处理图像。
302,对该待处理图像进行边缘检测。
303,基于该边缘检测的结果,提取该待处理图像中的轮廓线。
304,从该待处理图像被轮廓线分割出的多个轮廓区域中,确定面积最大的目标轮廓区域。
305,获取当前时刻之前最近M次采集到的历史图像中历史轮廓区域的面积值。
其中,该M为预设数;该历史轮廓区域为所述历史图像中面积最大的轮廓区域。该M具体的数值可以根据需要设定,如,可以获取当前时刻之前连续五帧历史图像中各自面积最大的轮廓区域。
306,当该目标轮廓区域的面积值与该历史轮廓区域的面积值满足预设条件时,基于该目标轮廓区域内的图像,生成用于输出的目标图像。
其中,该预设条件为表征摄取对象发生改变的条件。当该目标轮廓区域的面积值与该历史轮廓区域的面积值满足该预设条件,则说明该待摄取图像中实物与当前时刻之前摄取到的图像中的实物有很大变化,则可以表征平台上摄取的对象发生改变。例如,仍以实物展示平台对一本书的页面进行摄取为例,在摄取页面的过程中,如果用户不翻页,则该实物展示平台会一直摄取当前页面的内容,且页面的图像在采集到的待摄取图像中的面积几乎不变, 而如果用户翻页,则在翻页过程中,由于用户与页面的相互遮挡等原因,就会导致提取出的最大轮廓区域发生较大改变。
该预设条件可以根据需要设定,如,该预设条件可以为目标轮廓区域的面积值与历史轮廓区域的面积值之差大于预设值。
又如,基于目标轮廓区域的面积值与历史轮廓区域的面积值确定面积变化量,如果目标轮廓区域与当前时刻之前最近一次历史轮廓区域的面积变化量大于当前时刻之前确定出的面积变化量,则确定当前时刻满足该预设条件。例如,历史轮廓区域可以有2个,按照生成顺序依次为历史轮廓区域1和历史轮廓区域2,假设历史轮廓区域2与历史轮廓区域1的面积差值为a1,而该目标轮廓区域与该历史轮廓区域2的面积差值为a2,如果a2是a1的1.5倍,则说明实物改变,当前满足预设条件。
进一步的,当该目标轮廓区域的面积值与该历史轮廓区域的面积值不满足预设条件,则说明当前摄取的实物与之前摄取的实物相同,从而无需重复生成相同实物的目标图像,这样就可以直接采集并处理下一帧待处理图像,而无需基于该目标轮廓区域内的图像来生成待输出的目标图像。
可以理解的是,在图3的实施例中,当该目标轮廓区域的面积值与该历史轮廓区域的面积值满足预设条件时,也可以先确定出该目标轮廓区域的外接矩形,并将该目标轮廓区域内的图像映射到该外接矩形,从而生成以该外接矩形来展现的目标图像。当然。在生成该目标图像之前,也可以对实物图像进行角度调整,则可以将该外接矩形内呈现的图像映射到指定矩形内,生成用于输出的目标图像。
可以理解的是,在以上任意一个实施例中,在对待处理图像进行边缘检测之前,还包括:对该待处理图像进行平滑去噪,以得到平滑图像;然后对待处理图像对应的平滑图像进行边缘检测。
进一步的,在以上任意一个实施例中,对该待处理图像进行边缘检测之后,还可以对边缘检测后的待处理图像进行膨胀和腐蚀处理,得到二值化图像;然后,再对二值化图像进行轮廓线提取,得到该待处理图像中的轮廓线。其中,对边缘检测后的图像进行膨胀操作,可以使得该待处理图像中的高亮 区域逐渐增加;而在对待处理图像进行膨胀处理之后,对该待处理图像进行腐蚀操作,则可以消除细小的凸起,起到消除造成引起区域的作用。
对应本申请的一种图像处理方法,本申请实施例还提供了一种图像处理装置。
参见图4,其示出了本申请一种图像处理装置另一个实施例的结构示意图,本实施例的装置可以包括:
图像获取单元401,用于获取当前采集到的待处理图像;
边缘检测单元402,用于对所述待处理图像进行边缘检测;
轮廓提取单元403,用于基于所述边缘检测的结果,提取所述待处理图像中的轮廓线;
区域确定单元404,用于从所述待处理图像被轮廓线分割出的多个轮廓区域中,确定面积最大的目标轮廓区域;
目标提取单元405,用于基于所述目标轮廓区域内的图像,生成用于输出的目标图像。
本申请实施例中,获取到待处理图像后,对待处理图像进行边缘检测,并提取该待处理图像中的轮廓线,然后确定出待处理图像中面积最大的轮廓区域,而由于正常摄像情况下,待摄取实物在该待处理图像中的图像区域应该最大,因此,基于该待处理图像中面积最大的轮廓区域内的图像生成的目标图像也可以是该待摄取实物的图像,从而实现了自动提取实物图像,在无需用户实时指示实物位置,就可以实现从采集到的图像中提取实物图像,在准确提取实物图像的同时,大大简化了图像摄取的便捷性。
同时,摄像头在摄像过程中由用户实时指出实物的位置也会影响到摄取到的图像质量,而本申请实施例的方法在摄像以及图像生成过程都无需操作者参与,也减少了因操作者的动作而影响到摄取的图像质量的情况。
可选的,在以上装置实施例中所述目标提取单元,可以包括:
矩形匹配单元,用于确定出所述目标轮廓区域的外接矩形;
图像转换单元,用于将所述目标轮廓区域内的图像映射到所述外接矩形中,生成呈现在所述外接矩形中的目标图像。
进一步的,所述装置还可以包括:
图像映射单元,用于在所述图像转换单元将所述目标轮廓区域内的图像映射到所述外接矩形之后,将所述外接矩形内呈现的图像映射到指定矩形内,生成用于输出的目标图像,其中,所述指定矩形的一边与预设的水平坐标轴平行。
可选的,在本申请以上任意一个装置的实施例中,该装置还可以包括:
历史数据采集单元,用于在所述确定面积最大的目标轮廓区域之后,获取当前时刻之前最近M次采集到的历史图像中历史轮廓区域的面积值,其中,所述M为预设数,所述历史轮廓区域为所述历史图像中面积最大的轮廓区域;
则所述目标提取单元,包括:
目标提取子单元,用于当所述目标轮廓区域的面积值与所述历史轮廓区域的面积值满足预设条件时,基于所述目标轮廓区域内的图像,生成用于输出的目标图像。
可选的,在以上任意一个装置的实施例中,还可以包括:
平滑处理单元,用于在所述边缘检测单元对所述待处理图像进行边缘检测之前,对所述待处理图像进行平滑去噪;
所述轮廓提取单元,包括:
中间处理单元,用于对边缘检测后的待处理图像进行膨胀和腐蚀处理,得到二值化图像;
轮廓提取子单元,用于对所述二值化图像进行轮廓线提取,得到所述待处理图像中的轮廓线。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易 见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。

Claims (10)

  1. 一种图像处理方法,其特征在于,包括:
    获取当前采集到的待处理图像;
    对所述待处理图像进行边缘检测;
    基于所述边缘检测的结果,提取所述待处理图像中的轮廓线;
    从所述待处理图像被轮廓线分割出的多个轮廓区域中,确定面积最大的目标轮廓区域;
    基于所述目标轮廓区域内的图像,生成用于输出的目标图像。
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述目标轮廓区域内的图像,生成用于输出的目标图像,包括:
    确定出所述目标轮廓区域的外接矩形;
    将所述目标轮廓区域内的图像映射到所述外接矩形中,生成呈现在所述外接矩形中的目标图像。
  3. 根据权利要求2所述的方法,其特征在于,所述将所述目标轮廓区域内的图像映射到所述外接矩形之后,还包括:
    将所述外接矩形内呈现的图像映射到指定矩形内,生成用于输出的目标图像,其中,所述指定矩形的一边与预设的水平坐标轴平行。
  4. 根据权利要求1所述的方法,其特征在于,在所述确定面积最大的目标轮廓区域之后,还包括:
    获取当前时刻之前最近M次采集到的历史图像中历史轮廓区域的面积值,其中,所述M为预设数,所述历史轮廓区域为所述历史图像中面积最大的轮廓区域;
    则所述基于所述目标轮廓区域内的图像,生成用于输出的目标图像,包括:
    当所述目标轮廓区域的面积值与所述历史轮廓区域的面积值满足预设条件时,基于所述目标轮廓区域内的图像,生成用于输出的目标图像。
  5. 根据权利要求1所述的方法,其特征在于,在所述对所述待处理图像进行边缘检测之前,还包括:
    对所述待处理图像进行平滑去噪;
    所述基于所述边缘检测的结果,提取所述待处理图像中的轮廓线,包括: 对边缘检测后的待处理图像进行膨胀和腐蚀处理,得到二值化图像;
    对所述二值化图像进行轮廓线提取,得到所述待处理图像中的轮廓线。
  6. 一种图像处理装置,其特征在于,包括:
    图像获取单元,用于获取当前采集到的待处理图像;
    边缘检测单元,用于对所述待处理图像进行边缘检测;
    轮廓提取单元,用于基于所述边缘检测的结果,提取所述待处理图像中的轮廓线;
    区域确定单元,用于从所述待处理图像被轮廓线分割出的多个轮廓区域中,确定面积最大的目标轮廓区域;
    目标提取单元,用于基于所述目标轮廓区域内的图像,生成用于输出的目标图像。
  7. 根据权利要求6所述的装置,其特征在于,所述目标提取单元,包括:
    矩形匹配单元,用于确定出所述目标轮廓区域的外接矩形;
    图像转换单元,用于将所述目标轮廓区域内的图像映射到所述外接矩形中,生成呈现在所述外接矩形中的目标图像。
  8. 根据权利要求7所述的装置,其特征在于,还包括:
    图像映射单元,用于在所述图像转换单元将所述目标轮廓区域内的图像映射到所述外接矩形之后,将所述外接矩形内呈现的图像映射到指定矩形内,生成用于输出的目标图像,其中,所述指定矩形的一边与预设的水平坐标轴平行。
  9. 根据权利要求6所述的装置,其特征在于,还包括:
    历史数据采集单元,用于在所述确定面积最大的目标轮廓区域之后,获取当前时刻之前最近M次采集到的历史图像中历史轮廓区域的面积值,其中,所述M为预设数,所述历史轮廓区域为所述历史图像中面积最大的轮廓区域;
    则所述目标提取单元,包括:
    目标提取子单元,用于当所述目标轮廓区域的面积值与所述历史轮廓区域的面积值满足预设条件时,基于所述目标轮廓区域内的图像,生成用于输出的目标图像。
  10. 根据权利要求6所述的装置,其特征在于,还包括:
    平滑处理单元,用于在所述边缘检测单元对所述待处理图像进行边缘检测之前,对所述待处理图像进行平滑去噪;
    所述轮廓提取单元,包括:
    中间处理单元,用于对边缘检测后的待处理图像进行膨胀和腐蚀处理,得到二值化图像;
    轮廓提取子单元,用于对所述二值化图像进行轮廓线提取,得到所述待处理图像中的轮廓线。
PCT/CN2016/091821 2015-10-23 2016-07-27 一种图像处理方法和装置 Ceased WO2017067262A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510701433.4A CN105335976A (zh) 2015-10-23 2015-10-23 一种图像处理方法和装置
CN201510701433.4 2015-10-23

Publications (1)

Publication Number Publication Date
WO2017067262A1 true WO2017067262A1 (zh) 2017-04-27

Family

ID=55286481

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/091821 Ceased WO2017067262A1 (zh) 2015-10-23 2016-07-27 一种图像处理方法和装置

Country Status (2)

Country Link
CN (1) CN105335976A (zh)
WO (1) WO2017067262A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112164064A (zh) * 2020-10-30 2021-01-01 北京建工资源循环利用投资有限公司 物料投放方法、装置、电子设备及存储介质
CN115258865A (zh) * 2022-08-08 2022-11-01 成都鹏业软件股份有限公司 电梯门的识别方法及装置
CN116721120A (zh) * 2023-04-28 2023-09-08 上海脊影慧智能科技有限公司 图像处理方法、系统、电子设备和存储介质

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335976A (zh) * 2015-10-23 2016-02-17 广州视睿电子科技有限公司 一种图像处理方法和装置
CN107101598B (zh) * 2017-03-10 2023-11-03 华南理工大学 一种压电陶瓷银片同心度质量自动检测方法和装置
CN107909579B (zh) * 2017-10-31 2019-12-03 征图新视(江苏)科技股份有限公司 视觉检测中的产品轮廓自动提取方法
WO2019090691A1 (zh) * 2017-11-10 2019-05-16 华为技术有限公司 Monkey测试方法及终端
CN111325220B (zh) 2020-02-17 2023-04-07 腾讯科技(深圳)有限公司 图像生成方法、装置、设备及存储介质
CN112258659B (zh) * 2020-12-23 2021-04-13 恒信东方文化股份有限公司 一种虚拟穿衣图像的处理方法及其系统
CN115131223A (zh) * 2021-03-29 2022-09-30 深圳开立生物医疗科技股份有限公司 一种图像边缘平滑方法、装置以及相关设备
CN113282999B (zh) * 2021-06-25 2023-12-22 广东都市建筑规划设计有限公司 一种电气照明图纸自动修改生成方法、装置及计算机设备
CN115359030B (zh) * 2022-08-31 2026-03-24 南京慧尔视智能科技有限公司 基于雷达图的地面异物检测方法、装置、设备和介质
CN117058663A (zh) * 2023-07-24 2023-11-14 北京小米移动软件有限公司 目标物检测方法、目标物检测装置及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103198444A (zh) * 2011-11-11 2013-07-10 株式会社Pfu 图像处理装置和矩形检测方法
CN103729632A (zh) * 2014-01-22 2014-04-16 哈尔滨工业大学 一种基于连通区域滤波的圆形Mark点的定位方法
CN103955499A (zh) * 2014-04-22 2014-07-30 北京航空航天大学 一种基于即时计算与动态追踪的视觉体验增强方法
CN105335976A (zh) * 2015-10-23 2016-02-17 广州视睿电子科技有限公司 一种图像处理方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101169579B (zh) * 2007-10-30 2010-08-25 圆展科技股份有限公司 实物投影机及其部份影像轮廓明显化的方法
CN103268590B (zh) * 2013-05-06 2015-09-23 西南大学 一种可旋转取景框的拍照处理方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103198444A (zh) * 2011-11-11 2013-07-10 株式会社Pfu 图像处理装置和矩形检测方法
CN103729632A (zh) * 2014-01-22 2014-04-16 哈尔滨工业大学 一种基于连通区域滤波的圆形Mark点的定位方法
CN103955499A (zh) * 2014-04-22 2014-07-30 北京航空航天大学 一种基于即时计算与动态追踪的视觉体验增强方法
CN105335976A (zh) * 2015-10-23 2016-02-17 广州视睿电子科技有限公司 一种图像处理方法和装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112164064A (zh) * 2020-10-30 2021-01-01 北京建工资源循环利用投资有限公司 物料投放方法、装置、电子设备及存储介质
CN115258865A (zh) * 2022-08-08 2022-11-01 成都鹏业软件股份有限公司 电梯门的识别方法及装置
CN116721120A (zh) * 2023-04-28 2023-09-08 上海脊影慧智能科技有限公司 图像处理方法、系统、电子设备和存储介质

Also Published As

Publication number Publication date
CN105335976A (zh) 2016-02-17

Similar Documents

Publication Publication Date Title
WO2017067262A1 (zh) 一种图像处理方法和装置
US11055829B2 (en) Picture processing method and apparatus
CN105844256B (zh) 一种全景视频帧图像处理方法和装置
CN106934777B (zh) 扫描图像获取方法及装置
WO2018176938A1 (zh) 红外光斑中心点提取方法、装置和电子设备
CN105005964B (zh) 基于视频序列影像的地理场景全景图快速生成方法
JP5886242B2 (ja) 画像処理装置、画像処理方法及び画像処理プログラム
US20160050372A1 (en) Systems and methods for depth enhanced and content aware video stabilization
US9613404B2 (en) Image processing method, image processing apparatus and electronic device
WO2017080237A1 (zh) 相机成像方法及相机装置
CN106264537B (zh) 图像中人体姿态高度的测量系统及方法
CN108961182B (zh) 针对视频图像的竖直方向灭点检测方法及视频扭正方法
CN103379267A (zh) 三维空间图像的获取系统及方法
WO2022127491A1 (zh) 图像处理方法及装置、存储介质、终端
US10397540B2 (en) Method for obtaining and merging multi-resolution data
CN107734207B (zh) 视频对象变换处理方法、装置及计算设备
WO2017128646A1 (zh) 一种图像处理的方法及装置
CN105180802B (zh) 一种物体尺寸信息识别方法和装置
WO2021008205A1 (zh) 图像处理
CN113840083A (zh) 一种相机控制方法、装置以及存储介质
TW201342303A (zh) 三維空間圖像的獲取系統及方法
CN106713762A (zh) 图像处理方法及装置
CN104933430B (zh) 一种用于移动终端的交互式图像处理方法及系统
WO2019117472A1 (ko) 아날로그 계기판의 측정값 인식 시스템 및 방법
JP2020088646A (ja) 三次元形状モデル生成支援装置、三次元形状モデル生成支援方法、及びプログラム

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: 16856697

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: 16856697

Country of ref document: EP

Kind code of ref document: A1