
















本申请是申请日为2021年6月15日、申请号为“202110661393.0”、名称为“扫描控制方法、系统、电子设备和存储介质”的发明专利的分案申请。This application is a divisional application for an invention patent with an application date of June 15, 2021, an application number of "202110661393.0", and a title of "scanning control method, system, electronic device, and storage medium".
技术领域technical field
本发明涉及扫描处理技术领域,特别涉及一种扫描控制方法、系统、电子设备和存储介质。The present invention relates to the technical field of scan processing, in particular to a scan control method, system, electronic equipment and storage medium.
背景技术Background technique
以往扫描文件或证件时需要使用专业的扫描仪,然而现在只要拥有带摄像头的手机即可完成,且可以自动去除背景。但是,很难保证手机摄像头与扫描文本之间是平行的,所扫描的文本很容易倾斜且内容不全(倾斜扫描影响文本识别的精度且影响后期矫正)。In the past, a professional scanner was required to scan documents or certificates, but now it can be done with a mobile phone with a camera, and the background can be automatically removed. However, it is difficult to ensure that the mobile phone camera is parallel to the scanned text, and the scanned text is easily skewed and incomplete (slanted scanning affects the accuracy of text recognition and post-correction).
目前,手机扫描软件后期矫正仅提供手动矫正,即人眼调节扫描效果。往往由于手机拍摄平面与文本不保持平行,给后期矫正带来困难(本来文本为矩形,结果拍摄为不规则四边形)。此时,为了保证文本内容的完整性,后期矫正可能手动将文本调节为梯形或者为了保证文本的形状,缩减文本内容,但是,基于手动调节的方式存在调节精度低且不及时等缺陷,不能满足实际扫描需求。At present, the post-correction of mobile phone scanning software only provides manual correction, that is, the human eye adjusts the scanning effect. Often because the mobile phone shooting plane is not parallel to the text, it brings difficulties in post-correction (the original text is a rectangle, but the result is a trapezoid). At this time, in order to ensure the integrity of the text content, post-correction may manually adjust the text into a trapezoid or reduce the text content in order to ensure the shape of the text. However, the manual adjustment method has defects such as low adjustment accuracy and untimely adjustment, which cannot meet Actual scanning needs.
发明内容Contents of the invention
本发明要解决的技术问题是为了克服现有技术中为文本扫描方式基于手动调节的方式存在调节精度低且不及时等缺陷,不能满足实际扫描需求的缺陷,提供一种扫描控制方法、系统、电子设备和存储介质。The technical problem to be solved by the present invention is to provide a scanning control method, system, Electronic devices and storage media.
本发明是通过下述技术方案来解决上述技术问题:The present invention solves the above technical problems through the following technical solutions:
本发明提供一种扫描控制方法,所述方法应用于设有摄像模组的智能终端中,所述摄像模组包括TOF摄像头(深度摄像头)和多个图像采集摄像头,所述方法包括:The present invention provides a scan control method, the method is applied to an intelligent terminal provided with a camera module, the camera module includes a TOF camera (depth camera) and a plurality of image acquisition cameras, and the method includes:
获取待扫描对象对应的被摄平面和所述摄像模组对应的拍摄平面;Obtain the photographed plane corresponding to the object to be scanned and the photographing plane corresponding to the camera module;
判断所述被摄平面和所述拍摄平面之间是否平行,若否,则生成调节指令以调整所述被摄平面和所述拍摄平面两者至平行位置;judging whether the subject plane and the photographing plane are parallel, if not, generating an adjustment instruction to adjust both the subject plane and the photographing plane to a parallel position;
采用所述TOF摄像头获取多个所述图像采集摄像头与所述待扫描对象之间的第二距离信息;Obtaining second distance information between a plurality of image acquisition cameras and the object to be scanned by using the TOF camera;
在所述摄像模组的成像范围未覆盖整个所述待扫描对象的文本范围且所述第二距离信息大于第二设定阈值时,则确定所述待扫描对象尺寸大于设定尺寸,并对所述待扫描对象进行分段扫描处理以获取目标扫描文本图像。When the imaging range of the camera module does not cover the entire text range of the object to be scanned and the second distance information is greater than a second set threshold, it is determined that the size of the object to be scanned is greater than the set size, and The object to be scanned is subjected to segmental scanning processing to obtain a target scanned text image.
较佳地,所述判断所述被摄平面和所述拍摄平面之间是否平行,若否,则生成调节指令以调整所述被摄平面和所述拍摄平面两者至平行位置的步骤包括:Preferably, the step of judging whether the subject plane and the photographing plane are parallel, if not, generating an adjustment instruction to adjust both the subject plane and the photographing plane to a parallel position includes:
采集所述待扫描对象对应的文本图像;Acquiring a text image corresponding to the object to be scanned;
提取出所述文本图像中文本区域对应的边界形状信息;Extracting boundary shape information corresponding to the text region in the text image;
判断所述边界形状信息是否满足参考矩形信息,若满足,则确定所述被摄平面和所述拍摄平面之间平行;Judging whether the boundary shape information satisfies the reference rectangle information, and if so, determining that the subject plane is parallel to the shooting plane;
若否,则确定所述被摄平面和所述拍摄平面之间不平行,将所述边界形状信息透视变换处理至所述参考矩形信息以获取变换参数,并根据所述变换参数调整所述被摄平面和所述拍摄平面两者至平行位置。If not, determine that the subject plane is not parallel to the shooting plane, perform perspective transformation processing of the boundary shape information into the reference rectangle information to obtain transformation parameters, and adjust the subject plane according to the transformation parameters. Both the photographing plane and the photographing plane are brought to a parallel position.
较佳地,所述摄像模组包括一个第一图像采集摄像头和三个围绕所述第一图像采集摄像头设置的第二图像采集摄像头;Preferably, the camera module includes a first image acquisition camera and three second image acquisition cameras arranged around the first image acquisition camera;
所述判断所述被摄平面和所述拍摄平面之间是否平行,若否,则生成调节指令以调整所述被摄平面和所述拍摄平面两者至平行位置的步骤包括:The step of judging whether the subject plane and the shooting plane are parallel, if not, generating an adjustment instruction to adjust both the subject plane and the shooting plane to a parallel position includes:
采用三角测距技术基于所述第一图像采集摄像头和所述第二图像采集摄像头,获取三个所述第二图像采集摄像头所在的所述拍摄平面与所述被摄平面之间的第一距离信息;Based on the first image acquisition camera and the second image acquisition camera, using triangulation distance measurement technology to obtain a first distance between the shooting plane where the three second image acquisition cameras are located and the photographed plane information;
判断每两个所述第一距离信息之间的第一差值是否均小于第一设定阈值,若是,则确定所述被摄平面和所述拍摄平面之间平行;Judging whether the first difference between each two pieces of the first distance information is smaller than a first set threshold, and if so, determining that the subject plane and the shooting plane are parallel;
若否,确定所述被摄平面和所述拍摄平面之间不平行,选取一个第一距离信息作为参考距离信息,并生成调节指令以调整剩余的所有第一距离信息至所述参考距离信息,以使得所述被摄平面和所述拍摄平面两者达到平行位置。If not, determining that the subject plane is not parallel to the shooting plane, selecting a first distance information as the reference distance information, and generating an adjustment instruction to adjust all remaining first distance information to the reference distance information, so that both the subject plane and the photographing plane reach a parallel position.
较佳地,所述选取一个距离信息作为参考距离信息的步骤包括:Preferably, the step of selecting a distance information as the reference distance information includes:
选取所有第一距离信息中的最大值作为所述参考距离信息。A maximum value among all first distance information is selected as the reference distance information.
较佳地,所述判断所述被摄平面和所述拍摄平面之间是否平行的步骤之前还包括:Preferably, before the step of judging whether the subject plane is parallel to the shooting plane, the step further includes:
判断是否每个所述图像采集摄像头的垂直入射点对应的标注位置信息均处于所述待扫描对象的文本范围内,若是,则执行所述判断所述被摄平面和所述拍摄平面之间是否平行的步骤;Judging whether the marked position information corresponding to the vertical incidence point of each of the image acquisition cameras is within the text range of the object to be scanned, and if so, performing the judgment whether the distance between the photographed plane and the shooting plane is parallel steps;
若否,则控制所述摄像模组在水平方向上移动,直至每个所述图像采集摄像头的垂直入射点对应的标注位置信息均落入所述待扫描对象的文本范围内。If not, the camera module is controlled to move in the horizontal direction until the marked position information corresponding to the vertical incident point of each image capture camera falls within the text range of the object to be scanned.
较佳地,所述方法还包括:Preferably, the method also includes:
获取所述摄像模组的成像范围;Obtain the imaging range of the camera module;
判断所述成像范围是否覆盖整个所述待扫描对象的文本范围,若否,则控制所述摄像模组在垂直方向上移动,直至所述成像范围覆盖整个所述待扫描对象的文本范围。Judging whether the imaging range covers the entire text range of the object to be scanned, if not, controlling the camera module to move in the vertical direction until the imaging range covers the entire text range of the object to be scanned.
较佳地,所述根据所述扫描尺寸和设定扫描路径对所述待扫描对象进行分段扫描处理,以获取若干个分段扫描图像的步骤包括:Preferably, the step of performing segmental scanning processing on the object to be scanned according to the scanning size and the set scanning path to obtain several segmental scanning images includes:
采用所述TOF摄像头获取采集每个所述分段扫描图像时,多个所述图像采集摄像头与所述待扫描对象之间的第三距离信息;When the TOF camera is used to acquire and acquire each of the segmented scanning images, the third distance information between a plurality of the image acquisition cameras and the object to be scanned;
获取每个所述分段扫描图像对应的预留配准区域;Acquiring a reserved registration area corresponding to each of the segmented scan images;
在当前分段扫描图像与上一张分段扫描图像中的预留配准区域的重合度满足第三设定阈值,且两张分段扫描图像对应的第三距离信息之间的第二差值小于第四设定阈值时,则确定分段扫描成功,并继续获取下一张分段扫描图像,直至获取所述待扫描对象对应的所有分段扫描图像。The coincidence degree of the reserved registration area in the current segment scan image and the previous segment scan image satisfies the third set threshold, and the second difference between the third distance information corresponding to the two segment scan images When the value is less than the fourth set threshold, it is determined that the segment scanning is successful, and the next segment scan image is continuously acquired until all the segment scan images corresponding to the object to be scanned are acquired.
较佳地,在分段扫描失败时,所述方法还包括:Preferably, when segment scanning fails, the method further includes:
根据所述第二差值对当前分段扫描图像进行缩放变换处理,以将相邻的分段扫描图像缩放至同一文本缩放比例下;Scaling and transforming the current segmented scanned image according to the second difference, so as to scale adjacent segmented scanned images to the same text scaling ratio;
对缩放处理后的当前分段扫描图像进行平移旋转处理,直至当前分段扫描图像与上一张分段扫描图像中的预留配准区域的重合度满足所述第三设定阈值。Translating and rotating the current segmented scan image after scaling processing, until the coincidence degree between the current segmented scan image and the reserved registration area in the previous segmented scan image satisfies the third set threshold.
较佳地,所述方法还包括:Preferably, the method also includes:
当所述待扫描对象对应若干行横向分段扫描图像时,且当前分段扫描图像达到所述待扫描对象的文本横向边界,则控制换行扫描;When the object to be scanned corresponds to several lines of horizontal segmented scanning images, and the current segmented scanning image reaches the text lateral boundary of the object to be scanned, control line feed scanning;
当所述待扫描对象对应若干列纵向分段扫描图像时,且当前分段扫描图像达到所述待扫描对象的文本纵向边界,则控制换列扫描。When the to-be-scanned object corresponds to several columns of vertically segmented scanned images, and the current segmented scanned image reaches the text longitudinal boundary of the to-be-scanned object, then the row-changing scan is controlled.
较佳地,所述预留配准区域对应每个分段扫描图像与其他分段扫描图像衔接处对应的横向预留配准区域和纵向预留配准区域。Preferably, the reserved registration area corresponds to the horizontal reserved registration area and the vertical reserved registration area corresponding to the connection between each segmented scan image and other segmented scan images.
本发明还提供一种扫描控制系统,所述扫描控制系统应用于设有摄像模组的智能终端中,所述摄像模组包括TOF摄像头和多个图像采集摄像头,所述系统包括:The present invention also provides a scanning control system. The scanning control system is applied to an intelligent terminal provided with a camera module. The camera module includes a TOF camera and a plurality of image acquisition cameras. The system includes:
平面获取模块,用于获取待扫描对象对应的被摄平面和所述摄像模组对应的拍摄平面;A plane acquiring module, configured to acquire the photographed plane corresponding to the object to be scanned and the photographing plane corresponding to the camera module;
控制模块,用于判断所述被摄平面和所述拍摄平面之间是否平行,若否,则生成调节指令以调整所述被摄平面和所述拍摄平面两者至平行位置;A control module, configured to determine whether the subject plane and the photographing plane are parallel, and if not, generate an adjustment instruction to adjust both the subject plane and the photographing plane to a parallel position;
距离信息获取模块,用于采用所述TOF摄像头获取多个所述图像采集摄像头与待扫描对象之间的第二距离信息;A distance information acquisition module, configured to acquire a plurality of second distance information between the image acquisition cameras and the object to be scanned by using the TOF camera;
文本尺寸确定模块,用于在所述摄像模组的成像范围未覆盖整个所述待扫描对象的文本范围且第二距离信息大于第二设定阈值时,则确定待扫描对象尺寸大于设定尺寸;A text size determination module, configured to determine that the size of the object to be scanned is larger than the set size when the imaging range of the camera module does not cover the entire text range of the object to be scanned and the second distance information is greater than a second set threshold ;
分段扫描处理模块,用于对待扫描对象进行分段扫描处理以获取目标扫描文本图像。The segment scanning processing module is configured to perform segment scanning processing on the object to be scanned to obtain a target scanned text image.
较佳地,所述控制模块包括:Preferably, the control module includes:
文本图像采集单元,用于采集所述待扫描对象对应的文本图像;a text image acquisition unit, configured to acquire a text image corresponding to the object to be scanned;
信息提取单元,用于提取出所述文本图像中文本区域对应的边界形状信息;an information extraction unit, configured to extract boundary shape information corresponding to a text region in the text image;
第一判断单元,用于判断所述边界形状信息是否满足参考矩形信息,若满足,则调用第一确定单元确定所述被摄平面和所述拍摄平面之间平行;若否,则调用所述第一确定单元确定所述被摄平面和所述拍摄平面之间不平行;The first judging unit is used to judge whether the boundary shape information satisfies the reference rectangle information, if so, call the first determining unit to determine the parallelism between the subject plane and the shooting plane; if not, call the The first determining unit determines that the subject plane and the shooting plane are not parallel;
变换处理单元,用于在所述被摄平面和所述拍摄平面之间不平行时,将所述边界形状信息透视变换处理至所述参考矩形信息以获取变换参数;a transformation processing unit, configured to perform perspective transformation processing of the boundary shape information to the reference rectangle information to obtain transformation parameters when the photographed plane and the photographing plane are not parallel;
第一调整单元,用于根据所述变换参数调整所述被摄平面和所述拍摄平面两者至平行位置。A first adjustment unit, configured to adjust both the subject plane and the shooting plane to parallel positions according to the transformation parameters.
较佳地,所述摄像模组包括一个第一图像采集摄像头和三个围绕所述第一图像采集摄像头设置的第二图像采集摄像头;Preferably, the camera module includes a first image acquisition camera and three second image acquisition cameras arranged around the first image acquisition camera;
所述控制模块包括:The control module includes:
第一距离信息采集单元,用于采用三角测距技术基于所述第一图像采集摄像头和所述第二图像采集摄像头,获取三个所述第二图像采集摄像头所在的所述拍摄平面与所述被摄平面之间的第一距离信息;The first distance information collection unit is configured to use triangulation distance measurement technology to obtain the shooting plane where the three second image collection cameras are based on the first image collection camera and the second image collection camera. the first distance information between the photographed planes;
第二判断单元,用于判断每两个所述第一距离信息之间的第一差值是否均小于第一设定阈值,若是,则调用第二确定单元确定所述被摄平面和所述拍摄平面之间平行;若否,调用所述第二确定单元确定所述被摄平面和所述拍摄平面之间不平行;The second judging unit is used to judge whether the first difference between each two pieces of the first distance information is smaller than the first set threshold, and if so, call the second determining unit to determine the subject plane and the The shooting planes are parallel; if not, calling the second determining unit to determine that the shooting plane and the shooting plane are not parallel;
参考信息选取单元,用于选取一个第一距离信息作为参考距离信息;a reference information selection unit, configured to select a first distance information as the reference distance information;
第二调整单元,用于生成调节指令以调整剩余的所有第一距离信息至所述参考距离信息,以使得所述被摄平面和所述拍摄平面两者达到平行位置。The second adjustment unit is configured to generate an adjustment instruction to adjust all remaining first distance information to the reference distance information, so that both the subject plane and the shooting plane reach a parallel position.
较佳地,所述参考信息选取单元用于选取所有第一距离信息中的最大值作为所述参考距离信息。Preferably, the reference information selection unit is configured to select a maximum value among all first distance information as the reference distance information.
较佳地,所述系统还包括:Preferably, the system also includes:
第一判断模块,用于判断是否每个所述图像采集摄像头的垂直入射点对应的标注位置信息均处于所述待扫描对象的文本范围内,若是,则调用所述控制模块判断所述被摄平面和所述拍摄平面之间是否平行;The first judging module is used to judge whether the marked position information corresponding to the vertical incidence point of each of the image acquisition cameras is within the text range of the object to be scanned, and if so, call the control module to judge the subject Whether the plane is parallel to the shooting plane;
若否,则调用所述控制模块控制所述摄像模组在水平方向上移动,直至每个所述图像采集摄像头的垂直入射点对应的标注位置信息均落入所述待扫描对象的文本范围内。If not, call the control module to control the camera module to move in the horizontal direction until the marked position information corresponding to the vertical incident point of each image acquisition camera falls within the text range of the object to be scanned .
较佳地,所述分段扫描处理模块包括:Preferably, the segment scanning processing module includes:
扫描尺寸预设单元,用于预设分段扫描的扫描尺寸;A scanning size preset unit, used to preset the scanning size of segmented scanning;
分段扫描图像获取单元,用于根据所述扫描尺寸和设定扫描路径控制所述摄像模组对所述待扫描对象进行分段扫描处理,以获取若干个分段扫描图像;A segmented scanning image acquisition unit, configured to control the camera module to perform segmented scanning processing on the object to be scanned according to the scanning size and the set scanning path, so as to obtain several segmented scanning images;
目标图像获取单元,用于获取每个所述分段扫描图像对应的时序信息,并按照所述时序信息对所有所述分段扫描图像进行拼接处理以获取目标扫描文本图像。The target image acquiring unit is configured to acquire timing information corresponding to each of the segmented scanned images, and perform splicing processing on all the segmented scanned images according to the timing information to acquire a target scanned text image.
较佳地,所述分段扫描图像获取单元包括:Preferably, the segment scan image acquisition unit includes:
距离信息采集子单元,用于采用所述TOF摄像头获取采集每个所述分段扫描图像时,多个所述图像采集摄像头与所述待扫描对象之间的第三距离信息;A distance information collection subunit, configured to use the TOF camera to acquire third distance information between multiple image collection cameras and the object to be scanned when each of the segmented scanning images is collected;
预留配准区域获取子单元,用于获取每个所述分段扫描图像对应的预留配准区域;A reserved registration area obtaining subunit, configured to obtain a reserved registration area corresponding to each of the segmented scan images;
分段扫描子单元,用于在当前分段扫描图像与上一张分段扫描图像中的预留配准区域的重合度满足第三设定阈值,且两张分段扫描图像对应的第三距离信息之间的第二差值小于第四设定阈值时,则确定分段扫描成功,并继续获取下一张分段扫描图像,直至获取所述待扫描对象对应的所有分段扫描图像。The segment scanning subunit is used to meet the third set threshold when the coincidence degree between the current segment scan image and the reserved registration area in the previous segment scan image meets the third set threshold, and the corresponding third threshold of the two segment scan images When the second difference between the distance information is smaller than the fourth set threshold, it is determined that the segment scanning is successful, and continue to acquire the next segment scan image until all the segment scan images corresponding to the object to be scanned are acquired.
较佳地,在分段扫描失败时,所述系统还包括:Preferably, when segment scanning fails, the system also includes:
缩放变换处理模块,用于根据所述第二差值对当前分段扫描图像进行缩放变换处理,以将相邻的分段扫描图像缩放至同一文本缩放比例下;A scaling transformation processing module, configured to perform scaling transformation processing on the current segmented scanned image according to the second difference, so as to scale adjacent segmented scanned images to the same text scaling ratio;
平移旋转处理模块,用于对缩放处理后的当前分段扫描图像进行平移旋转处理,直至当前分段扫描图像与上一张分段扫描图像中的预留配准区域的重合度满足所述第三设定阈值。The translation and rotation processing module is used to perform translation and rotation processing on the zoomed current segment scan image until the coincidence degree between the current segment scan image and the reserved registration area in the previous segment scan image satisfies the first 3. Set the threshold.
较佳地,所述分段扫描处理模块还包括:Preferably, the segment scanning processing module also includes:
换行扫描控制单元,用于当所述待扫描对象对应若干行横向分段扫描图像时,且当前分段扫描图像达到所述待扫描对象的文本横向边界,则控制换行扫描;A newline scanning control unit, configured to control linefeed scanning when the object to be scanned corresponds to several lines of horizontal segmented scan images, and the current segmented scanned image reaches the text lateral boundary of the object to be scanned;
换列扫描控制单元,用于当所述待扫描对象对应若干列纵向分段扫描图像时,且当前分段扫描图像达到所述待扫描对象的文本纵向边界,则控制换列扫描。A row-changing scanning control unit, configured to control row-changing scanning when the object to be scanned corresponds to several columns of vertically segmented images and the current segmented image reaches the text longitudinal boundary of the object to be scanned.
较佳地,所述预留配准区域对应每个分段扫描图像与其他分段扫描图像衔接处对应的横向预留配准区域和纵向预留配准区域。Preferably, the reserved registration area corresponds to the horizontal reserved registration area and the vertical reserved registration area corresponding to the connection between each segmented scan image and other segmented scan images.
本发明还提供一种智能终端,所述智能终端包括上述的扫描控制系统。The present invention also provides an intelligent terminal, which includes the above scanning control system.
本发明还提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行计算机程序时实现上述的扫描控制方法。The present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and operable on the processor. The processor implements the above scan control method when executing the computer program.
本发明还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述的扫描控制方法。The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above scan control method is realized.
在符合本领域常识的基础上,所述各优选条件,可任意组合,即得本发明各较佳实施例。On the basis of conforming to common knowledge in the field, the various preferred conditions can be combined arbitrarily to obtain various preferred embodiments of the present invention.
本发明的积极进步效果在于:The positive progress effect of the present invention is:
本发明中,在采用智能终端中的摄像模组进行拍摄扫描时,实时检测摄像模组的拍摄平面与被摄平面(如文本或证件等所在平面)两者是否平行,并在不平行时及时调节矫正直至使得两平面达到一致水平,以保证高质量的扫描效果,继而提升了拍摄过程中对被拍摄对象中文本内容的识别率及精度,也便于对扫描或拍摄文本后期的矫正或裁剪;在被扫描文本的尺寸过大时,则采用分段扫描以获取若干分段扫描图像,通过将所有分段扫描图像拼接处理以得到目标扫描文本图像,达到对超大文本的精确扫描和后期还原的效果,更好地满足用户的使用需求,提升了用户的使用体验。In the present invention, when the camera module in the smart terminal is used for shooting and scanning, it is detected in real time whether the shooting plane of the camera module is parallel to the plane to be photographed (such as the plane where the text or documents are located), and when they are not parallel, Adjust the correction until the two planes reach the same level to ensure a high-quality scanning effect, and then improve the recognition rate and accuracy of the text content in the subject during the shooting process, and also facilitate the correction or cropping of the scanned or photographed text in the later stage; When the size of the scanned text is too large, segmental scanning is used to obtain several segmental scanned images, and all segmental scanned images are spliced to obtain the target scanned text image, so as to achieve accurate scanning and later restoration of super large texts. The effect is to better meet the needs of users and improve the user experience.
附图说明Description of drawings
图1为本发明实施例1的扫描控制方法的流程图。FIG. 1 is a flowchart of a scanning control method according to
图2为本发明实施例2中三摄摄像头模组的结构示意图。FIG. 2 is a schematic structural diagram of a three-camera camera module in
图3为本发明实施例2的扫描控制方法的第一流程图。FIG. 3 is a first flow chart of the scan control method according to
图4为本发明实施例2中双目摄像头模组的结构示意图。FIG. 4 is a schematic structural diagram of a binocular camera module in
图5为本发明实施例2的扫描控制方法的第二流程图。FIG. 5 is a second flowchart of the scan control method according to
图6为本发明实施例2中双目摄像头模组对应的第一场景示意图。FIG. 6 is a schematic diagram of the first scene corresponding to the binocular camera module in
图7为本发明实施例2中双目摄像头模组对应的第二场景示意图。FIG. 7 is a schematic diagram of a second scene corresponding to the binocular camera module in
图8为本发明实施例2中双目摄像头模组对应的第三场景示意图。FIG. 8 is a schematic diagram of a third scene corresponding to the binocular camera module in
图9为本发明实施例3的扫描控制方法的流程图。FIG. 9 is a flowchart of a scan control method according to
图10为本发明实施例3的扫描控制方法中分段扫描的第一示意图。FIG. 10 is a first schematic diagram of segmented scanning in the scanning control method according to
图11为本发明实施例3的扫描控制方法中分段扫描的第二示意图。FIG. 11 is a second schematic diagram of segmented scanning in the scanning control method according to
图12为本发明实施例3的扫描控制方法中分段扫描的第三示意图。FIG. 12 is a third schematic diagram of segmented scanning in the scanning control method according to
图13为本发明实施例3的扫描控制方法中分段扫描的第四示意图。FIG. 13 is a fourth schematic diagram of segmented scanning in the scanning control method according to
图14为本发明实施例4的扫描控制系统的模块示意图。FIG. 14 is a block diagram of a scan control system according to
图15为本发明实施例5的扫描控制系统的模块示意图。FIG. 15 is a block diagram of a scan control system according to
图16为本发明实施例6的扫描控制系统的模块示意图。FIG. 16 is a block diagram of a scan control system according to
图17为本发明实施例7的实现扫描控制方法的电子设备的结构示意图。FIG. 17 is a schematic structural diagram of an electronic device implementing a scanning control method according to
具体实施方式detailed description
下面通过实施例的方式进一步说明本发明,但并不因此将本发明限制在所述的实施例范围之中。The present invention is further illustrated below by means of examples, but the present invention is not limited to the scope of the examples.
实施例1Example 1
本实施例的方法应用于设有摄像模组的智能终端中。The method of this embodiment is applied to a smart terminal equipped with a camera module.
如图1所示,本实施例的扫描控制方法包括:As shown in Figure 1, the scan control method of this embodiment includes:
S101、获取待扫描对象对应的被摄平面和摄像模组对应的拍摄平面;S101. Acquiring the photographed plane corresponding to the object to be scanned and the photographing plane corresponding to the camera module;
S102、判断被摄平面和拍摄平面之间是否平行,若否,则生成调节指令以调整被摄平面和拍摄平面两者至平行位置。S102. Determine whether the subject plane and the photographing plane are parallel, if not, generate an adjustment instruction to adjust the subject plane and the photographing plane to a parallel position.
本实施例中无需将待扫描对象(如文本或证件)放置在与地面平行的桌面等平面上,即使被摄文本或证件等倾斜方式扫描效果也不会发生倾斜,减弱了对扫描场景的限制,有效地提高了扫描效率与精度,同时也提升了用户的使用体验。In this embodiment, there is no need to place the object to be scanned (such as text or certificate) on a plane parallel to the ground, such as a desktop, even if the scanned text or certificate is tilted, the scanning effect will not be tilted, which weakens the restriction on the scanning scene , effectively improving the scanning efficiency and accuracy, and also improving the user experience.
本实施例中,实时检测摄像模组的拍摄平面与被摄平面是否平行,并在不平行时及时调节矫正以保证高质量的扫描效果,提升了拍摄过程中对被拍摄对象中文本内容的识别率及精度,便于对扫描或拍摄文本后期的矫正或裁剪,能够更好地满足用户的使用需求,提升了用户的使用体验。In this embodiment, it is detected in real time whether the photographing plane of the camera module is parallel to the photographed plane, and when it is not parallel, the correction is adjusted in time to ensure a high-quality scanning effect, which improves the recognition of the text content in the photographed object during the photographing process It is easy to correct or crop the scanned or photographed text in the later stage, which can better meet the needs of users and improve the user experience.
实施例2Example 2
本实施例的扫描控制方法是对实施例1的进一步改进,具体地:The scan control method of this embodiment is a further improvement on
在一可实施例的方案中,摄像模组包括N个图像采集摄像头,N≥3且取整数。In a solution that can be implemented, the camera module includes N image acquisition cameras, where N≥3 and rounded to an integer.
以三摄即N=3为例,当采用智能终端(如智能手机)的摄像头模组进行拍摄或扫描,如图2所示,该摄像头模组为三摄(即三个图像采集摄像头)且三摄不处于同一直线上。其中,为了保证达到更好的扫描效果,可以通过程序设置或控制三摄同时出图,以提高三摄扫描的识别效率以及精度。Taking the three-camera (N=3) as an example, when the camera module of an intelligent terminal (such as a smart phone) is used for shooting or scanning, as shown in FIG. The three shots are not on the same straight line. Among them, in order to ensure a better scanning effect, you can set or control the three-camera image output at the same time through the program to improve the recognition efficiency and accuracy of the three-camera scan.
如图3所示,步骤S101之后、步骤S102之前还包括:As shown in Figure 3, after step S101, before step S102 also includes:
S10101、判断是否每个图像采集摄像头的垂直入射点对应的标注位置信息均处于待扫描对象的文本范围内,若是,则执行步骤S102;若否,则执行S10102;S10101. Determine whether the marked position information corresponding to the vertical incident point of each image acquisition camera is within the text range of the object to be scanned, if yes, execute step S102; if not, execute S10102;
S10102、控制摄像模组在水平方向上移动,直至每个图像采集摄像头的垂直入射点对应的标注位置信息均落入待扫描对象的文本范围内。S10102. Control the camera module to move in the horizontal direction until the marked position information corresponding to the vertical incidence point of each image acquisition camera falls within the text range of the object to be scanned.
为了保证对被拍摄文本的扫描质量,需要保证三摄的垂直入射点均在文本范围内,如若识别出不全在文本范围内,则需要自动调整摄像头模组位置直至全部在文本范围内;或生成提醒信息以提示用户移动智能终端直至全部在文本范围内。其中,三摄在终端设备上同时出图时,会在成像区域自动标注出三摄的中心位置,以便于自动识别处三摄的垂直入射点是否均在文本范围内,同时也便于用户手动调整三摄的中心位置全部落入文本范围内。In order to ensure the scanning quality of the photographed text, it is necessary to ensure that the vertical incident points of the three cameras are all within the text range. If it is not recognized that they are all within the text range, it is necessary to automatically adjust the position of the camera module until all are within the text range; or generate Reminder information to prompt the user to move the smart terminal until all within the text range. Among them, when the three cameras are simultaneously output on the terminal device, the center position of the three cameras will be automatically marked in the imaging area, so as to automatically identify whether the vertical incident points of the three cameras are within the text range, and it is also convenient for users to manually adjust The center positions of the three shots all fall within the text range.
在一可实施例的方案中,本实施例的方法还包括:In an exemplary solution, the method of this embodiment also includes:
获取摄像模组的成像范围;Obtain the imaging range of the camera module;
判断成像范围是否覆盖整个待扫描对象的文本范围,若否,则控制摄像模组在垂直方向上移动,直至成像范围覆盖整个待扫描对象的文本范围。It is judged whether the imaging range covers the entire text range of the object to be scanned, and if not, the camera module is controlled to move in the vertical direction until the imaging range covers the entire text range of the object to be scanned.
本实施例的扫描控制方法适用于待扫描对象如证件或文本处于三摄的成像范围内的场景,包括证件或文本较小,或证件或文本较大时通过调节智能终端与文本之间的垂直距离以保证证件或文本处于三摄的成像范围内。The scanning control method of this embodiment is applicable to the scene where the object to be scanned, such as a certificate or text, is within the imaging range of the three-camera, including a small certificate or text, or a large certificate or text by adjusting the vertical distance between the smart terminal and the text. Distance to ensure that the document or text is within the imaging range of the three cameras.
进一步地,步骤S102包括:Further, step S102 includes:
S1021、采集待扫描对象对应的文本图像;S1021. Collect a text image corresponding to the object to be scanned;
S1022、提取出文本图像中文本区域对应的边界形状信息;S1022. Extract boundary shape information corresponding to the text region in the text image;
S1023、判断边界形状信息是否满足参考矩形信息,若满足,则执行步骤S1024;若不满足,则执行步骤S1025;S1023. Determine whether the boundary shape information satisfies the reference rectangle information, if so, execute step S1024; if not, execute step S1025;
S1024、确定被摄平面和拍摄平面之间平行;S1024. Determine the parallelism between the photographed plane and the shooting plane;
S1025、确定被摄平面和拍摄平面之间不平行,将边界形状信息透视变换处理至参考矩形信息以获取变换参数,并根据变换参数调整被摄平面和拍摄平面两者至平行位置。S1025. Determine that the subject plane and the photographing plane are not parallel, perform perspective transformation processing of the boundary shape information into the reference rectangle information to obtain transformation parameters, and adjust both the subject plane and the photographing plane to parallel positions according to the transformation parameters.
其中,对拍摄扫描对应的梯形或者其他不规则图形采用透视变换处理,将其变换为对应参考矩形(或者其他预设图形),获取对应的变换参数(包括但不限于旋转参数、平移参数),根据该变换参数自动调整被摄平面和拍摄平面两者至平行位置;或者生成提醒信息以提示用户根据这些变化参数进行手动调节被摄平面和拍摄平面两者至平行位置。其中,根据变换参数自动调整被摄平面和拍摄平面两者之间的距离,依赖于硬件结构上对智能终端或被拍摄文本的位置驱动调整,硬件结构上具体的实现属于本领域的常规技术,因此此处就不再赘述。Among them, the trapezoid or other irregular graphics corresponding to the shooting scan is processed by perspective transformation, and it is transformed into a corresponding reference rectangle (or other preset graphics), and corresponding transformation parameters (including but not limited to rotation parameters and translation parameters) are obtained. Automatically adjust both the photographed plane and the shooting plane to parallel positions according to the transformation parameters; or generate reminder information to prompt the user to manually adjust both the photographed plane and the photographing plane to parallel positions according to these changing parameters. Among them, the automatic adjustment of the distance between the photographed plane and the photographed plane according to the transformation parameters depends on the driving adjustment of the position of the smart terminal or the photographed text on the hardware structure, and the specific implementation on the hardware structure belongs to the conventional technology in this field. Therefore, it will not be repeated here.
在一可实施例的方案中,如图4所示,摄像模组包括一个第一图像采集摄像头和三个围绕第一图像采集摄像头设置的第二图像采集摄像头,即双目摄像头,外围的三摄具有分时轮换拍摄图像的能力。In a possible embodiment, as shown in FIG. 4 , the camera module includes a first image acquisition camera and three second image acquisition cameras arranged around the first image acquisition camera, that is, a binocular camera. The camera has the ability to take images in time-sharing rotation.
如图5所示,步骤S102包括:As shown in Figure 5, step S102 includes:
S1026、采用三角测距技术基于第一图像采集摄像头和第二图像采集摄像头,获取三个第二图像采集摄像头所在的拍摄平面与被摄平面之间的第一距离信息;S1026. Obtain the first distance information between the shooting plane where the three second image capturing cameras are located and the photographed plane based on the first image capturing camera and the second image capturing camera by using triangular distance measurement technology;
S1027、判断每两个第一距离信息之间的第一差值是否均小于第一设定阈值,若是,则执行步骤S1028;若否,则执行S1029;S1027. Determine whether the first difference between each two pieces of first distance information is smaller than the first set threshold, if yes, execute step S1028; if not, execute S1029;
S1028、确定被摄平面和拍摄平面之间平行;S1028. Determine the parallelism between the photographed plane and the shooting plane;
S1029、确定被摄平面和拍摄平面之间不平行,选取一个第一距离信息作为参考距离信息,并生成调节指令以调整剩余的所有第一距离信息至参考距离信息,以使得被摄平面和拍摄平面两者达到平行位置。S1029. Determine that the subject plane and the shooting plane are not parallel, select a first distance information as the reference distance information, and generate an adjustment instruction to adjust all remaining first distance information to the reference distance information, so that the subject plane and the shooting plane The two planes reach a parallel position.
优选地,选取所有第一距离信息中的最大值作为参考距离信息,以保证调节过程中,摄像头的垂直入射点始终在文本范围内;当然也可以根据实际区需求选取其他的距离信息作为参考距离信息。Preferably, the maximum value of all first distance information is selected as the reference distance information to ensure that the vertical incidence point of the camera is always within the text range during the adjustment process; of course, other distance information can also be selected as the reference distance according to the actual area requirements information.
下面结合实例具体说明:The following is a specific description with examples:
如图6所示,L1、L2、L3分别表示三个第二图像采集摄像头到被摄文本的垂直距离,在L1、L2、L3两两之间的垂直距离相等或差值小于一定阈值时,则确定被摄平面和拍摄平面之间平行;否则,被摄平面和拍摄平面之间不平行,即平行情况下三条线等长,非平行情况下三条线不等长。As shown in Figure 6, L1, L2, and L3 respectively represent the vertical distances from the three second image acquisition cameras to the text to be photographed. When the vertical distances between L1, L2, and L3 are equal or the difference is less than a certain threshold, It is determined that the subject plane and the shooting plane are parallel; otherwise, the subject plane and the shooting plane are not parallel, that is, the three lines are equal in length in the parallel case, and the three lines are not equal in length in the non-parallel case.
如图7所示,此时需要自动调整被摄平面和拍摄平面之间的位置直至使得L1、L2、L3两两之间的垂直距离均相等或差值小于一定阈值。As shown in FIG. 7 , it is necessary to automatically adjust the positions between the subject plane and the shooting plane until the vertical distances between L1 , L2 , and L3 are equal or the difference is smaller than a certain threshold.
具体地,如图8所示,识别出三摄中距离被摄文本或证件的垂直距离最远的摄像头作为基准距离,并识别此摄像头。假设摄像头1为最远距离,则依次按摄像头2和3的箭头方向调整手机位置(会在取景框中标出调整方向),调整依据摄像头2和3与摄像头1到文本的距离相同或小于一定误差。Specifically, as shown in FIG. 8 , the camera with the longest vertical distance from the photographed text or certificate among the three shots is identified as the reference distance, and this camera is identified. Assuming that
本实施例中,实时检测摄像模组的拍摄平面与被摄平面是否平行,并在不平行时及时调节矫正以保证高质量的扫描效果,提升了拍摄过程中对被拍摄对象中文本内容的识别率及精度,便于对扫描或拍摄文本后期的矫正或裁剪,能够更好地满足用户的使用需求,提升了用户的使用体验。In this embodiment, it is detected in real time whether the photographing plane of the camera module is parallel to the photographed plane, and when it is not parallel, the correction is adjusted in time to ensure a high-quality scanning effect, which improves the recognition of the text content in the photographed object during the photographing process It is easy to correct or crop the scanned or photographed text in the later stage, which can better meet the needs of users and improve the user experience.
实施例3Example 3
本实施例的扫描控制方法是对实施例2的进一步改进,具体地:The scan control method of this embodiment is a further improvement on
本实施例的扫描控制方法适用于待扫描对象如证件或文本的尺寸过大的情况,此时智能终端与文本之间的垂直距离过远导致拍摄文本不清晰,需要进行分段扫描、测距、后期图像拼接以完成对超大文本扫描。The scanning control method of this embodiment is applicable to the situation where the size of the object to be scanned, such as a certificate or a text, is too large. At this time, the vertical distance between the smart terminal and the text is too long, so that the photographed text is not clear, and segmental scanning and distance measurement are required. , Post-stage image stitching to complete the scanning of super-large texts.
本实施例的摄像模组还包括TOF摄像头(如图2所示),用于采集或记录被摄平面和拍摄平面之间的拍摄距离,以便于对超大文本进行矫正。The camera module of this embodiment also includes a TOF camera (as shown in FIG. 2 ), which is used to collect or record the shooting distance between the subject plane and the shooting plane, so as to correct the oversized text.
具体地,如图9所示,步骤S102之后还包括:Specifically, as shown in FIG. 9, after step S102, it also includes:
S103、采用TOF摄像头获取多个图像采集摄像头与待扫描对象之间的第二距离信息;S103. Obtain second distance information between multiple image acquisition cameras and the object to be scanned by using the TOF camera;
S104、在成像范围未覆盖整个待扫描对象的文本范围且第二距离信息大于第二设定阈值时,则确定待扫描对象尺寸大于设定尺寸;S104. When the imaging range does not cover the entire text range of the object to be scanned and the second distance information is greater than a second set threshold, determine that the size of the object to be scanned is greater than the set size;
S105、对待扫描对象进行分段扫描处理以获取目标扫描文本图像。S105. Perform segmental scanning processing on the object to be scanned to obtain a target scanned text image.
具体地,步骤S105包括:Specifically, step S105 includes:
预设分段扫描的扫描尺寸;Preset scan size for segment scan;
根据扫描尺寸和设定扫描路径控制摄像模组对待扫描对象进行分段扫描处理,以获取若干个分段扫描图像;According to the scanning size and the set scanning path, the camera module is controlled to perform segmental scanning processing on the object to be scanned, so as to obtain several segmental scanning images;
获取每个分段扫描图像对应的时序信息,并按照时序信息对所有分段扫描图像进行拼接处理以获取目标扫描文本图像。The timing information corresponding to each segmented scanned image is obtained, and all the segmented scanned images are spliced according to the timing information to obtain the target scanned text image.
在一可实施的方案中,根据扫描尺寸和设定扫描路径对待扫描对象进行分段扫描处理,以获取若干个分段扫描图像的步骤包括:In an implementable solution, the step of segment scanning the object to be scanned according to the scan size and the set scan path to obtain several segment scan images includes:
采用TOF摄像头获取采集每个分段扫描图像时,多个图像采集摄像头与待扫描对象之间的第三距离信息;The third distance information between multiple image acquisition cameras and the object to be scanned is obtained when the TOF camera is used to acquire and acquire each segmented scanning image;
获取每个分段扫描图像对应的预留配准区域;Obtain the reserved registration area corresponding to each segmented scan image;
在当前分段扫描图像与上一张分段扫描图像中的预留配准区域的重合度满足第三设定阈值,且两张分段扫描图像对应的第三距离信息之间的第二差值小于第四设定阈值时,则确定分段扫描成功,并继续获取下一张分段扫描图像,直至获取待扫描对象对应的所有分段扫描图像。The coincidence degree of the reserved registration area in the current segment scan image and the previous segment scan image satisfies the third set threshold, and the second difference between the third distance information corresponding to the two segment scan images When the value is less than the fourth set threshold, it is determined that the segment scanning is successful, and continue to acquire the next segment scan image until all the segment scan images corresponding to the object to be scanned are acquired.
其中,当所述待扫描对象对应若干行横向分段扫描图像时,且当前分段扫描图像达到所述待扫描对象的文本横向边界,则控制换行扫描;Wherein, when the object to be scanned corresponds to a plurality of rows of horizontal segmented scan images, and the current segmented scan image reaches the text lateral boundary of the object to be scanned, then line feed scanning is controlled;
当所述待扫描对象对应若干列纵向分段扫描图像时,且当前分段扫描图像达到所述待扫描对象的文本纵向边界,则控制换列扫描。When the to-be-scanned object corresponds to several columns of vertically segmented scanned images, and the current segmented scanned image reaches the text longitudinal boundary of the to-be-scanned object, then the row-changing scan is controlled.
预留配准区域对应每个分段扫描图像与其他分段扫描图像衔接处对应的横向预留配准区域和纵向预留配准区域。The reserved registration area corresponds to the horizontal reserved registration area and the vertical reserved registration area corresponding to the connection between each segmented scan image and other segmented scan images.
在一可实施例的方案中,方法还包括:In an embodiment, the method also includes:
根据第二差值对当前分段扫描图像进行缩放变换处理,以将相邻的分段扫描图像缩放至同一文本缩放比例下;Scaling and transforming the current segmented scanned image according to the second difference, so as to scale adjacent segmented scanned images to the same text scaling ratio;
对缩放处理后的当前分段扫描图像进行平移旋转处理,直至当前分段扫描图像与上一张分段扫描图像中的预留配准区域的重合度满足第三设定阈值。Perform translation and rotation processing on the current segmented scan image after scaling processing, until the coincidence degree between the current segmented scan image and the reserved registration area in the last segmented scan image satisfies the third set threshold.
下面以横向分段扫描为例具体说明上述分段扫描的工作原理:The following takes horizontal segment scanning as an example to illustrate the working principle of the above segment scanning:
(1)参见图10和图11,根据预设的分段扫描的扫描尺寸从被拍摄文本的左上角开始扫描第一张图片A,拍摄即扫描时需使用平行拍摄方案即使用TOF摄像头进行距离检测,记录获取多个图像采集摄像头与待扫描对象之间的距离数据,同时记录当前图像的时序信息,以及提取出拍摄照片即分段扫描图像的右侧的10%区域作为横向预留配准区域S1,为下一张横向扫描拍摄图像提供参考,同时也为后期图像配准及拼接提供信息;需要拍摄扫描第二张分段扫描B时,右移手机,根据TOF提供的距离信息及第一张分段扫描提出的右侧10%照片作为参考(用户拍摄时须尽可能包含第一张右侧10%的图像);当横向相邻两张的分段扫描图像的距离信息差值小于一定范围且横向预留配准区域的重合度满足设定值,如对重叠区域S2(S2≤S1)的配准近似满足如下变换矩阵,则确定当前分段扫描拍摄完成,并继续下一分段图像的扫描。(1) Referring to Figure 10 and Figure 11, the first picture A is scanned from the upper left corner of the text to be photographed according to the preset scan size of the segmented scan. When shooting or scanning, a parallel shooting scheme is required, that is, a TOF camera is used to measure the distance Detect, record and obtain the distance data between multiple image acquisition cameras and the object to be scanned, record the timing information of the current image at the same time, and extract the 10% area on the right side of the captured photo, that is, the segmented scanning image, as a horizontal reserved registration Area S1 provides reference for the next horizontal scanning image, and also provides information for later image registration and splicing; when it is necessary to shoot and scan the second segmented scan B, move the mobile phone to the right, according to the distance information provided by TOF and the first A 10% photo on the right side proposed by a segmented scan is used as a reference (the user must try to include the first 10% image on the right side when shooting); when the distance information difference between two adjacent segmented scanned images in the horizontal direction is The coincidence degree of the horizontally reserved registration area within a certain range meets the set value. If the registration of the overlapping area S2 (S2≤S1) approximately satisfies the following transformation matrix, it is determined that the current segmental scan shooting is completed, and continue to the next segment. Segment image scanning.
[1 0 0 0 1 0 0 0 1][1 0 0 0 1 0 0 0 1]
依次类推,直至当横向分段扫描时出现当前分段扫描图像到达被拍摄文本的横向边界时,如图12所示,则控制换行扫描;当然其中的预留配准区域的占比、重合度需要满足的设定值、相邻两张分段扫描图像的距离差值等可以根据实际情况进行具体设定与调整。By analogy, until when the current segmented scanning image reaches the horizontal boundary of the text to be photographed during horizontal segmental scanning, as shown in Figure 12, control line feed scanning; of course, the proportion and coincidence of the reserved registration area The setting values that need to be satisfied, the distance difference between two adjacent segmented scanning images, etc. can be specifically set and adjusted according to the actual situation.
参见图13,对于下一行扫描,上下相邻的两个分段扫描图像的纵向衔接处也需预先提取出纵向预留配准区域;当上下相邻两张的分段扫描图像的距离信息差值小于一定范围且纵向预留配准区域S3的重合度满足设定值,则确定当前分段扫描拍摄完成,并继续当前行的下一分段图像的扫描。依次类推,直至获取待扫描文本对应的所有分段扫描图像。Referring to Fig. 13, for the next line of scanning, the vertically reserved registration area needs to be pre-extracted at the vertical junction of the two adjacent segmented scan images; when the distance information of the two adjacent segmented scan images is different If the value is less than a certain range and the coincidence degree of the vertical reserved registration area S3 satisfies the set value, it is determined that the current segment scanning is completed, and the scanning of the next segment image of the current row is continued. And so on, until all the segmented scanned images corresponding to the text to be scanned are obtained.
另外,当相邻的两张分段扫描图像之间的距离信息的差值以及配合结果不满足要求时,则对当前分段扫描图像进行缩放变换,以将相邻的分段扫描图像缩放至同一文本缩放比例下;然后对其进行平移旋转处理,直至当前分段扫描图像与上一张分段扫描图像中的预留配准区域的重合度满足要求。In addition, when the difference in distance information between two adjacent segmented scan images and the matching result do not meet the requirements, the current segmental scan image is scaled and transformed to scale the adjacent segmented scan images to Under the same text zoom ratio; and then perform translation and rotation processing on it until the coincidence degree between the current segment scan image and the reserved registration area in the previous segment scan image meets the requirements.
基于上述过程,根据时序信息对时序相邻的两张分段扫描图像进行依次拼接(按行从左到右进行横向拼接、切换下一行从左到右进行纵向拼接),即以时序信息在前的图像作为基准,将时序信息在后的分段扫描图像进行拼接处理;另外,根据需求对时序信息在后的分段扫描图像进行变换处理,根据两张分段扫描图像的距离信息的差值进行缩放变换,再根据拍摄得到的平移旋转变换矩阵进行精确配准;直至完成所有的分段扫描图像的矫正、配准、拼接,最终完成超大文本对应的扫描结果。Based on the above process, according to the timing information, the two sequentially adjacent segmented scanned images are sequentially spliced (horizontal splicing from left to right by row, vertical splicing from left to right after switching the next row), that is, the timing information is first The image of the sequence information is used as a reference, and the segmented scanning image with the timing information is spliced; in addition, the segmented scanning image with the timing information is transformed according to the requirements, and the difference between the distance information of the two segmented scanning images is used. Scale and transform, and then perform precise registration according to the translation and rotation transformation matrix obtained from shooting; until the correction, registration, and splicing of all segmented scanned images are completed, and finally the scanning results corresponding to super-large texts are completed.
对于纵向分段扫描,其对应的分段扫描的工作原理与上述横向分段扫描类似,因此此处就不再赘述。For vertical segment scanning, the corresponding working principle of the segment scanning is similar to that of the above-mentioned horizontal segment scanning, so details will not be repeated here.
本实施例中的超大文本扫描方法在拍摄时对应的扫描质量高、后期矫正速度快、且全自动生成,无需人为矫正,保证了矫正效率以及精确度;另外,在配准图像过程中无需将两幅完整图像纳入配准,而是将相邻两张分段扫描图像的部分配准区域进行配准即可,以及仅须配准得到平移旋转变量,提高了配准速度。The ultra-large text scanning method in this embodiment corresponds to high scanning quality during shooting, fast post-correction speed, and fully automatic generation without manual correction, which ensures correction efficiency and accuracy; in addition, there is no need to Two complete images are included in the registration, but only part of the registration areas of two adjacent segmented scanning images can be registered, and only registration is required to obtain the translation and rotation variables, which improves the registration speed.
本实施例中,在采用智能终端中的摄像模组进行拍摄扫描时,实时检测摄像模组的拍摄平面与被摄平面(如文本或证件等所在平面)两者是否平行,并在不平行时及时调节矫正直至使得两平面达到一致水平,以保证高质量的扫描效果,继而提升了拍摄过程中对被拍摄对象中文本内容的识别率及精度,也便于对扫描或拍摄文本后期的矫正或裁剪;在被扫描文本的尺寸过大时,则采用分段扫描以获取若干分段扫描图像,通过将所有分段扫描图像拼接处理以得到目标扫描文本图像,达到对超大文本的精确扫描和后期还原的效果,更好地满足用户的使用需求,提升了用户的使用体验。In this embodiment, when the camera module in the smart terminal is used for shooting and scanning, it is detected in real time whether the shooting plane of the camera module is parallel to the plane to be photographed (such as the plane where text or certificates are located), and when they are not parallel, Adjust the correction in time until the two planes reach the same level to ensure a high-quality scanning effect, and then improve the recognition rate and accuracy of the text content in the subject during the shooting process, and also facilitate the correction or cropping of the scanned or photographed text in the later stage ; When the size of the scanned text is too large, use segmented scanning to obtain several segmented scanned images, and stitch all the segmented scanned images to obtain the target scanned text image, so as to achieve accurate scanning and later restoration of super large texts The effect can better meet the needs of users and improve the user experience.
实施例4Example 4
本实施例的扫描控制系统应用于设有摄像模组的智能终端中。The scanning control system of this embodiment is applied to an intelligent terminal equipped with a camera module.
如图14所示,本实施例的扫描控制系统包括:As shown in Figure 14, the scan control system of this embodiment includes:
平面获取模块1,用于获取待扫描对象对应的被摄平面和摄像模组对应的拍摄平面;Plane acquiring
控制模块2,用于判断被摄平面和拍摄平面之间是否平行,若否,则生成调节指令以调整被摄平面和拍摄平面两者至平行位置。The
本实施例中无需将待扫描对象(如文本或证件)放置在与地面平行的桌面等平面上,即使被摄文本或证件等倾斜方式扫描效果也不会发生倾斜,减弱了对扫描场景的限制,有效地提高了扫描效率与精度,同时也提升了用户的使用体验。In this embodiment, there is no need to place the object to be scanned (such as text or certificate) on a plane parallel to the ground, such as a desktop, even if the scanned text or certificate is tilted, the scanning effect will not be tilted, which weakens the restriction on the scanning scene , effectively improving the scanning efficiency and accuracy, and also improving the user experience.
本实施例中,实时检测摄像模组的拍摄平面与被摄平面是否平行,并在不平行时及时调节矫正以保证高质量的扫描效果,提升了拍摄过程中对被拍摄对象中文本内容的识别率及精度,便于对扫描或拍摄文本后期的矫正或裁剪,能够更好地满足用户的使用需求,提升了用户的使用体验。In this embodiment, it is detected in real time whether the photographing plane of the camera module is parallel to the photographed plane, and when it is not parallel, the correction is adjusted in time to ensure a high-quality scanning effect, which improves the recognition of the text content in the photographed object during the photographing process It is easy to correct or crop the scanned or photographed text in the later stage, which can better meet the needs of users and improve the user experience.
实施例5Example 5
本实施例的扫描控制系统是对实施例4的进一步改进,具体地:The scanning control system of this embodiment is a further improvement to
在一可实施例的方案中,摄像模组包括N个图像采集摄像头,N≥3且取整数。In a solution that can be implemented, the camera module includes N image acquisition cameras, where N≥3 and rounded to an integer.
以三摄即N=3为例,当采用智能终端(如智能手机)的摄像头模组进行拍摄或扫描,如图2所示,该摄像头模组为三摄(即三个图像采集摄像头)且三摄不处于同一直线上。其中,为了保证达到更好的扫描效果,可以通过程序设置或控制三摄同时出图,以提高三摄扫描的识别效率以及精度。Taking the three-camera (N=3) as an example, when the camera module of an intelligent terminal (such as a smart phone) is used for shooting or scanning, as shown in FIG. The three shots are not on the same straight line. Among them, in order to ensure a better scanning effect, you can set or control the three-camera image output at the same time through the program to improve the recognition efficiency and accuracy of the three-camera scan.
如图15所示,本实施例的系统还包括:As shown in Figure 15, the system of this embodiment also includes:
第一判断模块3,用于判断是否每个图像采集摄像头的垂直入射点对应的标注位置信息均处于待扫描对象的文本范围内,若是,则调用控制模块2判断被摄平面和拍摄平面之间是否平行;The
若否,则调用控制模块2控制摄像模组在水平方向上移动,直至每个图像采集摄像头的垂直入射点对应的标注位置信息均落入待扫描对象的文本范围内。If not, call the
为了保证对被拍摄文本的扫描质量,需要保证三摄的垂直入射点均在文本范围内,如若识别出不全在文本范围内,则需要自动调整摄像头模组位置直至全部在文本范围内;或生成提醒信息以提示用户移动智能终端直至全部在文本范围内。其中,三摄在终端设备上同时出图时,会在成像区域自动标注出三摄的中心位置,以便于自动识别处三摄的垂直入射点是否均在文本范围内,同时也便于用户手动调整三摄的中心位置全部落入文本范围内。In order to ensure the scanning quality of the photographed text, it is necessary to ensure that the vertical incident points of the three cameras are all within the text range. If it is not recognized that they are all within the text range, it is necessary to automatically adjust the position of the camera module until all are within the text range; or generate Reminder information to prompt the user to move the smart terminal until all within the text range. Among them, when the three cameras are simultaneously output on the terminal device, the center position of the three cameras will be automatically marked in the imaging area, so as to automatically identify whether the vertical incident points of the three cameras are within the text range, and it is also convenient for users to manually adjust The center positions of the three shots all fall within the text range.
在一可实施例的方案中,本实施例的系统还包括:In an exemplary solution, the system of this embodiment also includes:
成像范围获取模块4,用于获取摄像模组的成像范围;The imaging
第二判断模块5,用于判断成像范围是否覆盖整个待扫描对象的文本范围,若否,则调用控制模块2控制摄像模组在垂直方向上移动,直至成像范围覆盖整个待扫描对象的文本范围。The
本实施例的扫描控制方法适用于待扫描对象如证件或文本处于三摄的成像范围内的场景,包括证件或文本较小,或证件或文本较大时通过调节智能终端与文本之间的垂直距离以保证证件或文本处于三摄的成像范围内。The scanning control method of this embodiment is applicable to the scene where the object to be scanned, such as a certificate or text, is within the imaging range of the three-camera, including a small certificate or text, or a large certificate or text by adjusting the vertical distance between the smart terminal and the text. Distance to ensure that the document or text is within the imaging range of the three cameras.
在一可实施例的方案中,本实施例的控制模块2包括:In an exemplary solution, the
文本图像采集单元,用于采集待扫描对象对应的文本图像;A text image acquisition unit, configured to acquire a text image corresponding to the object to be scanned;
信息提取单元,用于提取出文本图像中文本区域对应的边界形状信息;an information extraction unit, configured to extract boundary shape information corresponding to a text region in the text image;
第一判断单元,用于判断边界形状信息是否满足参考矩形信息,若满足,则调用第一确定单元确定被摄平面和拍摄平面之间平行;若否,则调用第一确定单元确定被摄平面和拍摄平面之间不平行;The first judging unit is used to judge whether the boundary shape information satisfies the reference rectangle information, if so, call the first determining unit to determine the parallelism between the photographed plane and the shooting plane; if not, call the first determining unit to determine the photographed plane Not parallel to the shooting plane;
变换处理单元,用于在被摄平面和拍摄平面之间不平行时,将边界形状信息透视变换处理至参考矩形信息以获取变换参数;A transformation processing unit, configured to process the perspective transformation of the boundary shape information into the reference rectangle information to obtain transformation parameters when the photographed plane and the photographing plane are not parallel;
第一调整单元,用于根据变换参数调整被摄平面和拍摄平面两者至平行位置。The first adjustment unit is configured to adjust both the subject plane and the shooting plane to parallel positions according to the transformation parameters.
其中,对拍摄扫描对应的梯形或者其他不规则图形采用透视变换处理,将其变换为对应参考矩形(或者其他预设图形),获取对应的变换参数(包括但不限于旋转参数、平移参数),根据该变换参数自动调整被摄平面和拍摄平面两者至平行位置;或者生成提醒信息以提示用户根据这些变化参数进行手动调节被摄平面和拍摄平面两者至平行位置。其中,根据变换参数自动调整被摄平面和拍摄平面两者之间的距离,依赖于硬件结构上对智能终端或被拍摄文本的位置驱动调整,硬件结构上具体的实现属于本领域的常规技术,因此此处就不再赘述。Among them, the trapezoid or other irregular graphics corresponding to the shooting scan is processed by perspective transformation, and it is transformed into a corresponding reference rectangle (or other preset graphics), and corresponding transformation parameters (including but not limited to rotation parameters and translation parameters) are obtained. Automatically adjust both the photographed plane and the shooting plane to parallel positions according to the transformation parameters; or generate reminder information to prompt the user to manually adjust both the photographed plane and the photographing plane to parallel positions according to these changing parameters. Among them, the automatic adjustment of the distance between the photographed plane and the photographed plane according to the transformation parameters depends on the driving adjustment of the position of the smart terminal or the photographed text on the hardware structure, and the specific implementation on the hardware structure belongs to the conventional technology in this field. Therefore, it will not be repeated here.
在一可实施例的方案中,如图4所示,摄像模组包括一个第一图像采集摄像头和三个围绕第一图像采集摄像头设置的第二图像采集摄像头,即双目摄像头,外围的三摄具有分时轮换拍摄图像的能力。In a possible embodiment, as shown in FIG. 4 , the camera module includes a first image acquisition camera and three second image acquisition cameras arranged around the first image acquisition camera, that is, a binocular camera. The camera has the ability to take images in time-sharing rotation.
本实施例中的控制模块2包括:
第一距离信息采集单元,用于采用三角测距技术基于第一图像采集摄像头和第二图像采集摄像头,获取三个第二图像采集摄像头对应的拍摄平面与被摄平面之间的第一距离信息;The first distance information acquisition unit is used to obtain the first distance information between the shooting plane and the photographed plane corresponding to the three second image acquisition cameras based on the first image acquisition camera and the second image acquisition camera by using the triangulation distance measurement technology ;
第二判断单元,用于判断每两个第一距离信息之间的第一差值是否均小于第一设定阈值,若是,则调用第二确定单元确定被摄平面和拍摄平面之间平行;若否,调用第二确定单元确定被摄平面和拍摄平面之间不平行;The second judging unit is used to judge whether the first difference between each two pieces of first distance information is smaller than the first set threshold, and if so, call the second determining unit to determine the parallelism between the photographed plane and the shooting plane; If not, call the second determination unit to determine that the subject plane and the shooting plane are not parallel;
参考信息选取单元,用于选取一个第一距离信息作为参考距离信息;a reference information selection unit, configured to select a first distance information as the reference distance information;
第二调整单元,用于生成调节指令以调整剩余的所有第一距离信息至参考距离信息,以使得被摄平面和拍摄平面两者达到平行位置。The second adjustment unit is configured to generate an adjustment instruction to adjust all the remaining first distance information to the reference distance information, so that both the subject plane and the shooting plane reach a parallel position.
参考信息选取单元用于选取所有第一距离信息中的最大值作为参考距离信息,以保证调节过程中,摄像头的垂直入射点始终在文本范围内;当然也可以根据实际区需求选取其他的距离信息作为参考距离信息。The reference information selection unit is used to select the maximum value of all the first distance information as the reference distance information, so as to ensure that the vertical incident point of the camera is always within the text range during the adjustment process; of course, other distance information can also be selected according to the actual area requirements as a reference distance.
下面结合实例具体说明:The following is a specific description with examples:
如图6所示,L1、L2、L3分别表示三个第二图像采集摄像头到被摄文本的垂直距离,在L1、L2、L3两两之间的垂直距离相等或差值小于一定阈值时,则确定被摄平面和拍摄平面之间平行;否则,被摄平面和拍摄平面之间不平行。As shown in Figure 6, L1, L2, and L3 respectively represent the vertical distances from the three second image acquisition cameras to the text to be photographed. When the vertical distances between L1, L2, and L3 are equal or the difference is less than a certain threshold, Then it is determined that the subject plane and the shooting plane are parallel; otherwise, the subject plane and the shooting plane are not parallel.
如图7所示,此时需要自动调整被摄平面和拍摄平面之间的位置直至使得L1、L2、L3两两之间的垂直距离均相等或差值小于一定阈值。具体地,如图8所示,识别出三摄中距离被摄文本或证件的垂直距离最远的摄像头作为基准距离,并识别此摄像头。假设摄像头1为最远距离,则依次按摄像头2和3的箭头方向调整手机位置(会在取景框中标出调整方向),调整依据摄像头2和3与摄像头1到文本的距离相同或小于一定误差。As shown in FIG. 7 , it is necessary to automatically adjust the positions between the subject plane and the shooting plane until the vertical distances between L1 , L2 , and L3 are equal or the difference is smaller than a certain threshold. Specifically, as shown in FIG. 8 , the camera with the longest vertical distance from the photographed text or certificate among the three shots is identified as the reference distance, and this camera is identified. Assuming that
本实施例中,实时检测摄像模组的拍摄平面与被摄平面是否平行,并在不平行时及时调节矫正以保证高质量的扫描效果,提升了拍摄过程中对被拍摄对象中文本内容的识别率及精度,便于对扫描或拍摄文本后期的矫正或裁剪,能够更好地满足用户的使用需求,提升了用户的使用体验。In this embodiment, it is detected in real time whether the photographing plane of the camera module is parallel to the photographed plane, and when it is not parallel, the correction is adjusted in time to ensure a high-quality scanning effect, which improves the recognition of the text content in the photographed object during the photographing process It is easy to correct or crop the scanned or photographed text in the later stage, which can better meet the needs of users and improve the user experience.
实施例6Example 6
本实施例的扫描控制系统是对实施例5的进一步改进,具体地:The scanning control system of this embodiment is a further improvement to
本实施例的扫描控制系统适用于待扫描对象如证件或文本的尺寸过大的情况,此时智能终端与文本之间的垂直距离过远导致拍摄文本不清晰,需要进行分段扫描、测距、后期图像拼接以完成对超大文本扫描。The scanning control system of this embodiment is suitable for situations where the size of the object to be scanned, such as a certificate or a text, is too large. At this time, the vertical distance between the smart terminal and the text is too far to cause the text to be photographed to be unclear, and segmental scanning and distance measurement are required. , Post-stage image stitching to complete the scanning of super-large texts.
本实施例的摄像模组还包括TOF摄像头,用于采集或记录被摄平面和拍摄平面之间的拍摄距离,以便于对超大文本进行矫正。The camera module of this embodiment also includes a TOF camera, which is used to collect or record the shooting distance between the subject plane and the shooting plane, so as to correct the oversized text.
如图16所示,本实施例的系统还包括:As shown in Figure 16, the system of this embodiment also includes:
距离信息获取模块6,用于采用TOF摄像头获取多个图像采集摄像头与待扫描对象之间的第二距离信息;The distance
文本尺寸确定模块7,用于在成像范围未覆盖整个待扫描对象的文本范围且第二距离信息大于第二设定阈值时,则确定待扫描对象尺寸大于设定尺寸;The text
分段扫描处理模块8,用于对待扫描对象进行分段扫描处理以获取目标扫描文本图像。The segment
具体地,分段扫描处理模块8包括:Specifically, segment
扫描尺寸预设单元,用于预设分段扫描的扫描尺寸;A scanning size preset unit, used to preset the scanning size of segmented scanning;
分段扫描图像获取单元,用于根据扫描尺寸和设定扫描路径控制摄像模组对待扫描对象进行分段扫描处理,以获取若干个分段扫描图像;The segmented scanning image acquisition unit is used to control the camera module to perform segmented scanning processing on the object to be scanned according to the scanning size and the set scanning path, so as to obtain several segmented scanning images;
目标图像获取单元,用于获取每个分段扫描图像对应的时序信息,并按照时序信息对所有分段扫描图像进行拼接处理以获取目标扫描文本图像。The target image acquiring unit is configured to acquire timing information corresponding to each segmented scanning image, and splice all the segmented scanning images according to the timing information to acquire the target scanned text image.
分段扫描图像获取单元包括:The segment scan image acquisition unit includes:
距离信息采集子单元,用于采用TOF摄像头获取采集每个分段扫描图像时,多个图像采集摄像头与待扫描对象之间的第三距离信息;The distance information acquisition sub-unit is used to obtain the third distance information between multiple image acquisition cameras and the object to be scanned when the TOF camera is used to acquire and acquire each segmented scanning image;
预留配准区域获取子单元,用于获取每个分段扫描图像对应的预留配准区域;A reserved registration area acquiring subunit, configured to acquire a reserved registration area corresponding to each segmented scan image;
分段扫描子单元,用于在当前分段扫描图像与上一张分段扫描图像中的预留配准区域的重合度满足第三设定阈值,且两张分段扫描图像对应的第三距离信息之间的第二差值小于第四设定阈值时,则确定分段扫描成功,并继续获取下一张分段扫描图像,直至获取待扫描对象对应的所有分段扫描图像。The segment scanning subunit is used to meet the third set threshold when the coincidence degree between the current segment scan image and the reserved registration area in the previous segment scan image meets the third set threshold, and the corresponding third threshold of the two segment scan images When the second difference between the distance information is smaller than the fourth set threshold, it is determined that the segment scanning is successful, and continue to acquire the next segment scan image until all segment scan images corresponding to the object to be scanned are obtained.
在分段扫描失败时,本实施例的系统还包括:When segment scanning fails, the system of this embodiment also includes:
缩放变换处理模块,用于根据第二差值对当前分段扫描图像进行缩放变换处理,以将相邻的分段扫描图像缩放至同一文本缩放比例下;A scaling transformation processing module, configured to perform scaling transformation processing on the current segmented scanned image according to the second difference, so as to scale adjacent segmented scanned images to the same text scaling ratio;
平移旋转处理模块,用于对缩放处理后的当前分段扫描图像进行平移旋转处理,直至当前分段扫描图像与上一张分段扫描图像中的预留配准区域的重合度满足第三设定阈值。The translation and rotation processing module is used to perform translation and rotation processing on the zoomed current segment scan image until the coincidence degree between the current segment scan image and the reserved registration area in the previous segment scan image satisfies the third setting Set the threshold.
本实施例的分段扫描处理模块8还包括:The segmentation
换行扫描控制单元,用于当所述待扫描对象对应若干行横向分段扫描图像时,且当前分段扫描图像达到所述待扫描对象的文本横向边界,则控制换行扫描;A newline scanning control unit, configured to control linefeed scanning when the object to be scanned corresponds to several lines of horizontal segmented scan images, and the current segmented scanned image reaches the text lateral boundary of the object to be scanned;
换列扫描控制单元,用于当所述待扫描对象对应若干列纵向分段扫描图像时,且当前分段扫描图像达到所述待扫描对象的文本纵向边界,则控制换列扫描。A row-changing scanning control unit, configured to control row-changing scanning when the object to be scanned corresponds to several columns of vertically segmented images and the current segmented image reaches the text longitudinal boundary of the object to be scanned.
其中,预留配准区域对应每个分段扫描图像与其他分段扫描图像衔接处对应的横向预留配准区域和纵向预留配准区域。Wherein, the reserved registration area corresponds to the horizontal reserved registration area and the vertical reserved registration area corresponding to the connection between each segmented scan image and other segmented scan images.
下面以横向分段扫描以及纵向分段扫描的基本实现原理参见实施例3,此处就不再赘述。In the following, the basic implementation principles of the horizontal segment scanning and the vertical segment scanning are referred to in
本实施例中的超大文本扫描方法在拍摄时对应的扫描质量高、后期矫正速度快、且全自动生成,无需人为矫正,保证了矫正效率以及精确度;另外,在配准图像过程中无需将两幅完整图像纳入配准,而是将相邻两张分段扫描图像的部分配准区域进行配准即可,以及仅须配准得到平移旋转变量,提高了配准速度。The ultra-large text scanning method in this embodiment corresponds to high scanning quality during shooting, fast post-correction speed, and fully automatic generation without manual correction, which ensures correction efficiency and accuracy; in addition, there is no need to Two complete images are included in the registration, but only part of the registration areas of two adjacent segmented scanning images can be registered, and only registration is required to obtain the translation and rotation variables, which improves the registration speed.
本实施例中,在采用智能终端中的摄像模组进行拍摄扫描时,实时检测摄像模组的拍摄平面与被摄平面(如文本或证件等所在平面)两者是否平行,并在不平行时及时调节矫正直至使得两平面达到一致水平,以保证高质量的扫描效果,继而提升了拍摄过程中对被拍摄对象中文本内容的识别率及精度,也便于对扫描或拍摄文本后期的矫正或裁剪;在被扫描文本的尺寸过大时,则采用分段扫描以获取若干分段扫描图像,通过将所有分段扫描图像拼接处理以得到目标扫描文本图像,达到对超大文本的精确扫描和后期还原的效果,更好地满足用户的使用需求,提升了用户的使用体验。In this embodiment, when the camera module in the smart terminal is used for shooting and scanning, it is detected in real time whether the shooting plane of the camera module is parallel to the plane to be photographed (such as the plane where text or certificates are located), and when they are not parallel, Adjust the correction in time until the two planes reach the same level to ensure a high-quality scanning effect, and then improve the recognition rate and accuracy of the text content in the subject during the shooting process, and also facilitate the correction or cropping of the scanned or photographed text in the later stage ; When the size of the scanned text is too large, use segmented scanning to obtain several segmented scanned images, and stitch all the segmented scanned images to obtain the target scanned text image, so as to achieve accurate scanning and later restoration of super large texts The effect can better meet the needs of users and improve the user experience.
实施例7Example 7
图17为本发明实施例7提供的一种电子设备的结构示意图。电子设备包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时实现实施例1或2中任一实施例中的扫描控制方法。图17显示的电子设备30仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。FIG. 17 is a schematic structural diagram of an electronic device provided by
如图17所示,电子设备30可以以通用计算设备的形式表现,例如其可以为服务器设备。电子设备30的组件可以包括但不限于:上述至少一个处理器31、上述至少一个存储器32、连接不同系统组件(包括存储器32和处理器31)的总线33。As shown in FIG. 17 , the
总线33包括数据总线、地址总线和控制总线。The
存储器32可以包括易失性存储器,例如随机存取存储器(RAM)321和/或高速缓存存储器322,还可以进一步包括只读存储器(ROM)323。The
存储器32还可以包括具有一组(至少一个)程序模块324的程序/实用工具325,这样的程序模块324包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
处理器31通过运行存储在存储器32中的计算机程序,从而执行各种功能应用以及数据处理,例如本发明实施例1或2中任一实施例中的扫描控制方法。The
电子设备30也可以与一个或多个外部设备34(例如键盘、指向设备等)通信。这种通信可以通过输入/输出(I/O)接口35进行。并且,电子设备30还可以通过网络适配器36与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图17所示,网络适配器36通过总线33与电子设备30的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备30使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理器、外部磁盘驱动阵列、RAID(磁盘阵列)系统、磁带驱动器以及数据备份存储系统等。
应当注意,尽管在上文详细描述中提及了电子设备的若干单元/模块或子单元/模块,但是这种划分仅仅是示例性的并非强制性的。实际上,根据本发明的实施方式,上文描述的两个或更多单元/模块的特征和功能可以在一个单元/模块中具体化。反之,上文描述的一个单元/模块的特征和功能可以进一步划分为由多个单元/模块来具体化。It should be noted that although several units/modules or subunits/modules of an electronic device are mentioned in the above detailed description, such division is only exemplary and not mandatory. Actually, according to the embodiment of the present invention, the features and functions of two or more units/modules described above may be embodied in one unit/module. Conversely, the features and functions of one unit/module described above can be further divided to be embodied by a plurality of units/modules.
实施例8Example 8
本实施例提供了一种计算机可读存储介质,其上存储有计算机程序,程序被处理器执行时实现实施例1或2中任一实施例中的扫描控制方法中的步骤。This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps in the scanning control method in any one of
其中,可读存储介质可以采用的更具体可以包括但不限于:便携式盘、硬盘、随机存取存储器、只读存储器、可擦拭可编程只读存储器、光存储器件、磁存储器件或上述的任意合适的组合。Wherein, the readable storage medium may more specifically include but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device or any of the above-mentioned the right combination.
在可能的实施方式中,本发明还可以实现为一种程序产品的形式,其包括程序代码,当程序产品在终端设备上运行时,程序代码用于使终端设备执行实现实施例1或2中任一实施例中的扫描控制方法中的步骤。In a possible implementation manner, the present invention can also be implemented in the form of a program product, which includes program code, and when the program product runs on the terminal device, the program code is used to make the terminal device execute the implementation of the
其中,可以以一种或多种程序设计语言的任意组合来编写用于执行本发明的程序代码,程序代码可以完全地在用户设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户设备上部分在远程设备上执行或完全在远程设备上执行。Wherein, the program code for executing the present invention may be written in any combination of one or more programming languages, and the program code may be completely executed on the user equipment, partially executed on the user equipment, or used as an independent software Package execution, partly on the user device and partly on the remote device, or entirely on the remote device.
虽然以上描述了本发明的具体实施方式,但是本领域的技术人员应当理解,这仅是举例说明,本发明的保护范围是由所附权利要求书限定的。本领域的技术人员在不背离本发明的原理和实质的前提下,可以对这些实施方式做出多种变更或修改,但这些变更和修改均落入本发明的保护范围。Although the specific implementation of the present invention has been described above, those skilled in the art should understand that this is only an example, and the protection scope of the present invention is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principle and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211261015.4ACN115550517A (en) | 2021-06-15 | 2021-06-15 | Scanning control method, system, electronic device and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110661393.0ACN113556438B (en) | 2021-06-15 | 2021-06-15 | Scanning control method, system, electronic device and storage medium |
| CN202211261015.4ACN115550517A (en) | 2021-06-15 | 2021-06-15 | Scanning control method, system, electronic device and storage medium |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110661393.0ADivisionCN113556438B (en) | 2021-06-15 | 2021-06-15 | Scanning control method, system, electronic device and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN115550517Atrue CN115550517A (en) | 2022-12-30 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211261015.4APendingCN115550517A (en) | 2021-06-15 | 2021-06-15 | Scanning control method, system, electronic device and storage medium |
| CN202110661393.0AActiveCN113556438B (en) | 2021-06-15 | 2021-06-15 | Scanning control method, system, electronic device and storage medium |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110661393.0AActiveCN113556438B (en) | 2021-06-15 | 2021-06-15 | Scanning control method, system, electronic device and storage medium |
| Country | Link |
|---|---|
| CN (2) | CN115550517A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116563118A (en)* | 2023-07-12 | 2023-08-08 | 浙江华诺康科技有限公司 | A splicing method, device and computer equipment for endoscopic images |
| CN117499549A (en)* | 2023-12-25 | 2024-02-02 | 荣耀终端有限公司 | Scanning method and electronic equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115550517A (en)* | 2021-06-15 | 2022-12-30 | 展讯半导体(南京)有限公司 | Scanning control method, system, electronic device and storage medium |
| CN114550174A (en)* | 2022-02-07 | 2022-05-27 | 青岛海尔科技有限公司 | Assisted reading method and device |
| CN115314622A (en)* | 2022-08-10 | 2022-11-08 | 广州市腾畅交通科技有限公司 | A vehicle identification code image acquisition method, system and readable storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2012217159A (en)* | 2011-04-01 | 2012-11-08 | Sharp Corp | Imaging apparatus, display method for imaging apparatus, program, and recording medium |
| WO2017128536A1 (en)* | 2016-01-29 | 2017-08-03 | 宇龙计算机通信科技(深圳)有限公司 | Dual camera-based scanning method and device |
| CN109559365A (en)* | 2018-11-30 | 2019-04-02 | 努比亚技术有限公司 | File scanning method, device, mobile terminal and storage medium |
| CN110213456A (en)* | 2019-06-10 | 2019-09-06 | Oppo广东移动通信有限公司 | Scanned document correction method, electronic device and computer-readable storage medium |
| CN110934603A (en)* | 2019-11-19 | 2020-03-31 | 东软医疗系统股份有限公司 | Image splicing method and device and scanning system |
| CN112954127A (en)* | 2021-01-12 | 2021-06-11 | Lpt有限责任公司 | Camera matrix image scanner |
| CN113556438A (en)* | 2021-06-15 | 2021-10-26 | 展讯半导体(南京)有限公司 | Scanning control method, system, electronic device and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105791660A (en)* | 2014-12-22 | 2016-07-20 | 中兴通讯股份有限公司 | Method and device for correcting photographing inclination of photographed object and mobile terminal |
| WO2018227449A1 (en)* | 2017-06-15 | 2018-12-20 | Shanghai United Imaging Healthcare Co., Ltd. | Imaging systems and methods thereof |
| CN112272267A (en)* | 2020-10-22 | 2021-01-26 | Oppo广东移动通信有限公司 | Shooting control method, shooting control device, and electronic equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2012217159A (en)* | 2011-04-01 | 2012-11-08 | Sharp Corp | Imaging apparatus, display method for imaging apparatus, program, and recording medium |
| WO2017128536A1 (en)* | 2016-01-29 | 2017-08-03 | 宇龙计算机通信科技(深圳)有限公司 | Dual camera-based scanning method and device |
| CN109559365A (en)* | 2018-11-30 | 2019-04-02 | 努比亚技术有限公司 | File scanning method, device, mobile terminal and storage medium |
| CN110213456A (en)* | 2019-06-10 | 2019-09-06 | Oppo广东移动通信有限公司 | Scanned document correction method, electronic device and computer-readable storage medium |
| CN110934603A (en)* | 2019-11-19 | 2020-03-31 | 东软医疗系统股份有限公司 | Image splicing method and device and scanning system |
| CN112954127A (en)* | 2021-01-12 | 2021-06-11 | Lpt有限责任公司 | Camera matrix image scanner |
| CN113556438A (en)* | 2021-06-15 | 2021-10-26 | 展讯半导体(南京)有限公司 | Scanning control method, system, electronic device and storage medium |
| CN113556438B (en)* | 2021-06-15 | 2022-09-27 | 展讯半导体(南京)有限公司 | Scanning control method, system, electronic device and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116563118A (en)* | 2023-07-12 | 2023-08-08 | 浙江华诺康科技有限公司 | A splicing method, device and computer equipment for endoscopic images |
| CN117499549A (en)* | 2023-12-25 | 2024-02-02 | 荣耀终端有限公司 | Scanning method and electronic equipment |
| CN117499549B (en)* | 2023-12-25 | 2024-05-14 | 荣耀终端有限公司 | Scanning method and electronic device |
| Publication number | Publication date |
|---|---|
| CN113556438B (en) | 2022-09-27 |
| CN113556438A (en) | 2021-10-26 |
| Publication | Publication Date | Title |
|---|---|---|
| CN113556438B (en) | Scanning control method, system, electronic device and storage medium | |
| US10269130B2 (en) | Methods and apparatus for control of light field capture object distance adjustment range via adjusting bending degree of sensor imaging zone | |
| EP4013033A1 (en) | Method and apparatus for focusing on subject, and electronic device, and storage medium | |
| AU2007224085B2 (en) | Model- based dewarping method and apparatus | |
| CN106899781B (en) | Image processing method and electronic equipment | |
| WO2018201809A1 (en) | Double cameras-based image processing device and method | |
| CN110650288B (en) | Focus control method and apparatus, electronic device, computer-readable storage medium | |
| CN101047792A (en) | Image processing device, image processing method and imaging device | |
| US20220309627A1 (en) | Face image straight line processing method, terminal device and storage medium | |
| WO2023217046A1 (en) | Image processing method and apparatus, nonvolatile readable storage medium and electronic device | |
| JP2023540273A (en) | Image processing method, device, and storage medium using eye condition detection | |
| CN113055613A (en) | Panoramic video stitching method and device based on mine scene | |
| EP3429185A1 (en) | Method, device and apparatus for determining focus window | |
| WO2017128750A1 (en) | Image collection method and image collection device | |
| CN117036401A (en) | Distribution network line inspection method and system based on target tracking | |
| CN112261292A (en) | Image acquisition method, terminal, chip and storage medium | |
| CN118967469A (en) | Fisheye image multi-view fusion method and fusion system | |
| CN117770774A (en) | Nail fold microcirculation image processing system, method and electronic equipment | |
| CN115690003A (en) | Microcirculation image definition evaluation method, device, equipment and storage medium | |
| CN113673405B (en) | Exercise correction method, system and intelligent tutor learning machine based on topic recognition | |
| CN110365897A (en) | Image correction method and device, electronic equipment and computer readable storage medium | |
| CN118843010A (en) | Shooting AI elimination processing method and device based on intelligent terminal and terminal | |
| CN118781170A (en) | A high-precision multi-view image rendering method for light field cameras | |
| CN112991175A (en) | Panoramic picture generation method and device based on single PTZ camera | |
| CN118524285A (en) | Camera focusing method and device, electronic equipment and storage medium |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |