CN111432131A - Photographing frame selection method and device, electronic equipment and storage medium - Google Patents
Photographing frame selection method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111432131A CN111432131A CN202010368339.2A CN202010368339A CN111432131A CN 111432131 A CN111432131 A CN 111432131A CN 202010368339 A CN202010368339 A CN 202010368339A CN 111432131 A CN111432131 A CN 111432131A
- Authority
- CN
- China
- Prior art keywords
- carrier
- frame selection
- coordinates
- position coordinates
- operating body
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/61—Control of cameras or camera modules based on recognised objects
- H04N23/611—Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/62—Control of parameters via user interfaces
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/63—Control of cameras or camera modules by using electronic viewfinders
- H04N23/631—Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
- H04N23/632—Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Description
技术领域technical field
本发明涉及智能设备技术领域,具体涉及一种拍照框选的方法、装置、电子设备及存储介质。The present invention relates to the technical field of intelligent devices, and in particular, to a method, device, electronic device and storage medium for frame selection of photos.
背景技术Background technique
目前,通过学习机、家教机等智能设备具有框题功能,框题方式大致分为两大类,一类是通过智能设备后置摄像头对承载体(例如书本)需要选取的内容进行拍照;另一类是主要是通过智能设备前置摄像头完成,摄像头识别操作体(例如手指)在承载体上位置,然后基于该位置对承载体上的内容进行拍照。框题主要用于搜题,或者用于储存知识点或错题,便于以后的温习等。At present, smart devices such as learning machines and tutoring machines have the function of framing questions. The framing methods are roughly divided into two categories. One is to take pictures of the content that needs to be selected on the carrier (such as a book) through the rear camera of the smart device; the other One is mainly completed by the front camera of the smart device. The camera recognizes the position of the operating body (such as a finger) on the carrier, and then takes a picture of the content on the carrier based on the position. Framed questions are mainly used to search for questions, or to store knowledge points or wrong questions for future review.
第一类框题方式流程比较繁琐,而且还依赖于操作者的拍照水平,过于模糊无法进行后续操作;第二类框题方式使用简单,但是也会存在以下问题:在实践中发现,由于承载体可能会出现褶皱、卷曲等现象,操作者在框题过程中,经常习惯性地用一只手按压承载体的一侧,另一只手作为操作体去定位框选的内容,这种情况下,摄像头会识别到多个操作体,智能设备无法对这种情况做出准备判断,其结果是要么无法识别框选的具体内容,要么造成框选内容与用户的需求不一致。The first type of framing method is relatively cumbersome, and it also depends on the operator's photographing level, which is too vague to carry out subsequent operations; the second type of framing method is simple to use, but there are also the following problems: In practice, it is found that due to the load The body may be wrinkled, curled, etc. During the process of framing the question, the operator often habitually presses one side of the carrier with one hand, and the other hand is used as the operating body to locate the content selected by the box. In this case In this case, the camera will recognize multiple operating bodies, and the smart device cannot make a preparation judgment for this situation. As a result, the specific content of the frame selection cannot be recognized, or the frame selection content is inconsistent with the user's needs.
发明内容SUMMARY OF THE INVENTION
针对所述缺陷,本发明实施例公开了一种拍照框选的方法、装置、电子设备及存储介质,能够提高框题的准确率。In view of the above-mentioned defects, the embodiments of the present invention disclose a method, an apparatus, an electronic device and a storage medium for frame selection by taking pictures, which can improve the accuracy of the frame selection.
本发明实施例第一方面公开一种拍照框选的方法,所述方法包括:A first aspect of the embodiments of the present invention discloses a method for frame selection by taking pictures, and the method includes:
当接收到框选指令时,利用摄像头获取操作体在承载体上的位置坐标以及操作者的眼球在所述承载体上的注视区域;When receiving the frame selection instruction, use the camera to obtain the position coordinates of the operating body on the carrier and the gaze area of the operator's eyeballs on the carrier;
在所述注视区域内存在且仅存在一个所述位置坐标时,执行第一操作;所述第一操作为基于所述位置坐标以及预设规则对承载体上的内容进行拍照。When there is only one of the position coordinates in the gaze area, a first operation is performed; the first operation is to take a picture of the content on the carrier based on the position coordinates and a preset rule.
作为一种可选的实施方式,在本发明实施例第一方面中,所述利用摄像头获取操作体在承载体上的位置坐标,包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, the use of a camera to obtain the position coordinates of the operating body on the carrier body includes:
启动第一摄像头,获取带有操作体的承载体的预览图像;Start the first camera to obtain a preview image of the carrier with the operating body;
确定预览图像中操作体的图像坐标;Determine the image coordinates of the operator in the preview image;
利用所述图像坐标确定所述操作体的位置坐标。The position coordinates of the operating body are determined using the image coordinates.
作为一种可选的实施方式,在本发明实施例第一方面中,所述确定预览图像中操作体的图像坐标,包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, the determining the image coordinates of the operating body in the preview image includes:
利用所述操作体和承载体上的内容之间的颜色差异识别所述操作体;Identify the operating body using the color difference between the operating body and the content on the carrier;
确定所述操作体在预览图像中的图像坐标。Determine the image coordinates of the operating body in the preview image.
作为一种可选的实施方式,在本发明实施例第一方面中,所述利用摄像头获取操作者的眼球在所述承载体上的注视区域,包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, the using a camera to obtain the gaze area of the operator's eyeball on the carrier includes:
启动第二摄像头,获取操作者的脸部图像;Start the second camera to obtain the operator's face image;
确定所述脸部图像中瞳孔中心的位置以及所述瞳孔中心的位置相对于基准点的偏移量;determining the position of the center of the pupil in the face image and the offset of the position of the center of the pupil relative to the reference point;
基于所述偏移量确定所述眼球的视线方向及在所述承载体上的注视点;determining the gaze direction of the eyeball and the gaze point on the carrier based on the offset;
以所述注视点为中心,确定注视区域。With the gaze point as the center, the gaze area is determined.
作为一种可选的实施方式,在本发明实施例第一方面中,确定所述脸部图像中瞳孔中心的位置以及所述瞳孔中心的位置相对于基准点的偏移量,包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, determining the position of the center of the pupil in the face image and the offset of the position of the center of the pupil relative to the reference point includes:
将所述脸部图像输入在先训练的卷积神经网络确定瞳孔的特征点;Inputting the face image into a previously trained convolutional neural network to determine the feature points of the pupil;
利用所述瞳孔的特征点确定瞳孔中心的位置;Use the feature points of the pupil to determine the position of the center of the pupil;
根据所述瞳孔中心的位置以及基准点确定所述瞳孔中心的位置的偏移量。The offset of the position of the pupil center is determined according to the position of the pupil center and the reference point.
作为一种可选的实施方式,在本发明实施例第一方面中,根据所述瞳孔中心的位置以及基准点确定所述瞳孔中心的位置的偏移量,包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, determining the offset of the position of the pupil center according to the position of the pupil center and the reference point, including:
依据所述瞳孔的特征点,构建眼部外观,将瞳孔中心直视时的位置作为基准点;According to the feature points of the pupil, the appearance of the eye is constructed, and the position of the pupil center when looking directly is used as the reference point;
根据所述瞳孔中心的位置和所述基准点的位置,计算所述瞳孔中心位置相对于基准点的偏移量。According to the position of the pupil center and the position of the reference point, the offset of the position of the pupil center relative to the reference point is calculated.
作为一种可选的实施方式,在本发明实施例第一方面中,所述方法还包括:As an optional implementation manner, in the first aspect of the embodiment of the present invention, the method further includes:
当注视区域不在所述承载体、或者未检测到所述位置坐标、或者注视区域内不存在位置坐标或者存在两个或两个以上的位置坐标时,执行第二操作。The second operation is performed when the gaze area is not on the carrier, or the position coordinates are not detected, or there are no position coordinates or there are two or more position coordinates in the gaze area.
本发明实施例第二方面公开一种拍照框选方法,包括:A second aspect of the embodiments of the present invention discloses a frame selection method for taking pictures, including:
当接收到框选指令时,利用摄像头获取操作体在承载体上的位置坐标以及操作者的眼球在所述承载体上的注视区域;When receiving the frame selection instruction, use the camera to obtain the position coordinates of the operating body on the carrier and the gaze area of the operator's eyeballs on the carrier;
当所述注视区域内存在多个所述位置坐标,判断所述多个位置坐标是否为连续点;When there are a plurality of the position coordinates in the gaze area, determine whether the plurality of position coordinates are continuous points;
如果所述多个位置坐标为连续点,则检测所述承载体的边缘,并获取所述连续点与承载体任意一边缘的夹角;If the multiple position coordinates are continuous points, detect the edge of the carrier, and obtain the included angle between the continuous point and any edge of the carrier;
如果所述连续点与承载体其中一边缘的夹角小于或等于预设夹角,则执行第一操作;所述第一操作为基于所述连续点以及预设规则对承载体上的内容进行拍照。If the included angle between the continuous point and one of the edges of the carrier is less than or equal to the preset angle, a first operation is performed; the first operation is to perform an operation on the content on the carrier based on the continuous point and a preset rule Photograph.
作为一种可选的实施方式,在本发明实施例第二方面中,所述方法还包括:As an optional implementation manner, in the second aspect of the embodiment of the present invention, the method further includes:
当注视区域不在所述承载体上、或者未检测到所述位置坐标、或者注视区域内不存在位置坐标、或者注视区域内存在多个位置坐标且所述多个位置坐标不是连续点或不全是连续点、或者注视区域内存在多个位置坐标且所述多个位置坐标是连续点但所述连续点与所述承载体所有边缘的夹角均大于预设夹角,则执行第二操作。When the gaze area is not on the carrier, or the location coordinates are not detected, or there are no location coordinates in the gaze area, or there are multiple location coordinates in the gaze area and the multiple location coordinates are not consecutive points or not all If there are multiple position coordinates in the continuous point or the gaze area and the multiple position coordinates are continuous points but the included angle between the continuous point and all edges of the carrier is greater than the preset included angle, the second operation is performed.
本发明实施例第三方面公开一种拍照框选装置,其包括:A third aspect of the embodiments of the present invention discloses a photo frame selection device, which includes:
采集单元,用于当接收到框选指令时,利用摄像头获取操作体在承载体上的位置坐标以及操作者的眼球在所述承载体上的注视区域;an acquisition unit, configured to use a camera to acquire the position coordinates of the operating body on the carrier and the gaze area of the operator's eyeballs on the carrier when receiving the frame selection instruction;
执行单元,用于在所述注视区域内存在且仅存在一个所述位置坐标时,执行第一操作;所述第一操作为基于所述位置坐标以及预设规则对承载体上的内容进行拍照。an execution unit, configured to execute a first operation when there is only one position coordinate in the gaze area; the first operation is to take a picture of the content on the carrier based on the position coordinate and a preset rule .
本发明实施例第四方面公开一种电子设备,包括:存储有可执行程序代码的存储器;与所述存储器耦合的处理器;所述处理器调用所述存储器中存储的所述可执行程序代码,用于执行本发明实施例第一方面或第二方面公开的一种拍照框选的方法。A fourth aspect of the embodiments of the present invention discloses an electronic device, comprising: a memory storing executable program codes; a processor coupled to the memory; the processor calling the executable program codes stored in the memory , which is used to execute the method for frame selection for taking pictures disclosed in the first aspect or the second aspect of the embodiments of the present invention.
本发明实施例第五方面公开一种计算机可读存储介质,其存储计算机程序,其中,所述计算机程序使得计算机执行本发明实施例第一方面或第二方面公开的一种拍照框选的方法。A fifth aspect of the embodiments of the present invention discloses a computer-readable storage medium, which stores a computer program, wherein the computer program causes a computer to execute the method for taking a picture frame selection disclosed in the first aspect or the second aspect of the embodiments of the present invention .
本发明实施例第六方面公开一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行本发明实施例第一方面或第二方面公开的一种拍照框选的方法。A sixth aspect of the embodiments of the present invention discloses a computer program product, which, when the computer program product runs on a computer, causes the computer to execute a photo frame selection method disclosed in the first aspect or the second aspect of the embodiments of the present invention method.
本发明实施例第七方面公开一种应用发布平台,所述应用发布平台用于发布计算机程序产品,其中,当所述计算机程序产品在计算机上运行时,使得所述计算机执行本发明实施例第一方面或第二方面公开的一种拍照框选的方法。A seventh aspect of the embodiments of the present invention discloses an application publishing platform, and the application publishing platform is used for publishing a computer program product, wherein when the computer program product runs on a computer, the computer is made to execute the first embodiment of the present invention. In one aspect or the second aspect, a method for frame selection is disclosed.
与现有技术相比,本发明实施例具有以下有益效果:Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
本发明实施例中,当接收到框选指令时,利用摄像头获取操作体在承载体上的位置坐标以及操作者的眼球在所述承载体上的注视区域;在所述注视区域内存在且仅存在一个所述位置坐标时,执行第一操作;所述第一操作为基于所述位置坐标以及预设规则对承载体上的内容进行拍照。可见,实施本发明实施例,通过操作体定位和眼球跟踪技术相结合的方式实现框选承载体上的内容,可摒弃多操作体造成无法识别具体框选内容,提高框题准确率,提升框题效率。In the embodiment of the present invention, when a frame selection instruction is received, the camera is used to obtain the position coordinates of the operating body on the carrier and the gaze area of the operator's eyeballs on the carrier; there exists in the gaze area and only When there is one of the position coordinates, a first operation is performed; the first operation is to take a picture of the content on the carrier based on the position coordinates and a preset rule. It can be seen that, by implementing the embodiment of the present invention, the content on the frame selection carrier is realized by the combination of operator positioning and eye tracking technology, which can eliminate the inability to identify the specific frame selection content caused by multiple operators, improve the accuracy of frame questions, and improve the frame selection. question efficiency.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.
图1是本发明实施例公开的一种拍照框选的方法的流程示意图;FIG. 1 is a schematic flowchart of a method for frame selection by taking a picture disclosed in an embodiment of the present invention;
图2是本发明实施例公开的获取操作体在承载体上的位置坐标的流程示意图;2 is a schematic flowchart of obtaining the position coordinates of an operating body on a carrier disclosed by an embodiment of the present invention;
图3是本发明实施例公开的获取操作者的眼球在承载体上的注视区域的流程示意图;3 is a schematic flowchart of obtaining the gaze area of an operator's eyeball on a carrier disclosed in an embodiment of the present invention;
图4是本发明实施例公开的采用手指指向框选区域的操作示意图;4 is a schematic diagram of an operation of using a finger to point to a frame selection area disclosed in an embodiment of the present invention;
图5是本发明实施例公开的另一种拍照框选的方法的流程示意图;FIG. 5 is a schematic flowchart of another method for frame selection according to an embodiment of the present invention;
图6是本发明实施例公开的采用一支铅笔指向框选区域的操作示意图;6 is a schematic diagram of an operation of using a pencil to point to a frame selection area disclosed in an embodiment of the present invention;
图7是本发明实施例公开的采用两支尺子指向框选区域的操作示意图;7 is a schematic diagram of an operation of using two rulers to point to a frame selection area disclosed in an embodiment of the present invention;
图8是本发明实施例公开的一种拍照框选装置的结构示意图;FIG. 8 is a schematic structural diagram of a frame selection device for taking pictures disclosed in an embodiment of the present invention;
图9是本发明实施例公开的另一种拍照框选装置的结构示意图;FIG. 9 is a schematic structural diagram of another device for frame selection for taking pictures disclosed in an embodiment of the present invention;
图10是本发明实施例公开的一种电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
需要说明的是,本发明的说明书和权利要求书中的术语“第一”、“第二”、“第三”、“第四”等是用于区别不同的对象,而不是用于描述特定顺序。本发明实施例的术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,示例性地,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", "third", "fourth", etc. in the description and claims of the present invention are used to distinguish different objects, rather than to describe specific order. The terms "comprising" and "having" and any variations thereof in the embodiments of the present invention are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to Those steps or elements that are expressly listed may instead include other steps or elements that are not expressly listed or are inherent to the process, method, product or apparatus.
本发明实施例公开了一种拍照框选的方法、装置、电子设备及存储介质,通过操作体定位和眼球跟踪技术结合,达到框题目的,能够使框题更加准确,进而提高框题效率,以下结合附图进行详细描述。The embodiment of the present invention discloses a method, device, electronic device and storage medium for frame selection by taking a picture. By combining the positioning of the operator and the eye tracking technology, the frame problem can be achieved, the frame problem can be more accurate, and the frame problem efficiency can be improved. A detailed description is given below in conjunction with the accompanying drawings.
实施例一Example 1
请参阅图1,图1是本发明实施例公开的一种拍照框选方法的流程示意图。其中,本发明实施例所描述的方法适用于带有前置摄像头的学习机、家教机、点读机、平板电脑或手机等智能设备。框选是指对操作体定位位置以预设规则在承载体上选择相应的内容进行拍照,框题即为框选内容。如图1所示,该拍照框选方法包括以下步骤:Please refer to FIG. 1 . FIG. 1 is a schematic flowchart of a method for frame selection for a photo frame disclosed in an embodiment of the present invention. The methods described in the embodiments of the present invention are applicable to smart devices such as learning machines, tutoring machines, point readers, tablet computers, or mobile phones with front-facing cameras. The frame selection refers to selecting the corresponding content on the carrier to take a picture of the positioning position of the operating body according to the preset rules, and the frame title is the frame selection content. As shown in Figure 1, the method for frame selection of a photo includes the following steps:
110、当接收到框选指令时,利用摄像头获取操作体在承载体上的位置坐标以及操作者的眼球在所述承载体上的注视区域。110. When a frame selection instruction is received, use a camera to acquire the position coordinates of the operating body on the carrier and the gaze area of the operator's eyeballs on the carrier.
框题用于学习中,其目的可以是用于搜题、存储错题和知识点等。框选指令为用户即操作者发起,其可以是语音指令,也可以是用户通过触控屏或机械按钮等方式触发形成的脉冲指令,或者用户通过特定的手势形成等,这里不做限定。在接收到框选指令前,摄像头以及智能设备的大部分器件处于睡眠状态,可以节省电量,通过框选指令对二者进行唤醒。Framed questions are used in learning, and their purpose can be to search for questions, store wrong questions and knowledge points, etc. The frame selection instruction is initiated by the user, that is, the operator. It can be a voice command, or a pulse command triggered by the user through a touch screen or a mechanical button, or a user through a specific gesture, which is not limited here. Before receiving the frame selection instruction, the camera and most of the components of the smart device are in a sleep state, which can save power, and wake up the two through the frame selection instruction.
摄像头为智能设备的前置摄像头,当然,也可以是外部设置的摄像头并与智能设备通过有线或无线方式进行通讯。承载体是待框选内容的载体,可以是书本、练习册、试卷等。操作体是用于在承载体上操作,进而根据定位操作体的位置实现框选内容的定位,操作体可以是手指、触控笔、铅笔等,甚至也可以小棍,这里不做限定。The camera is a front camera of the smart device, of course, it can also be a camera set externally and communicate with the smart device in a wired or wireless manner. The carrier is the carrier of the content to be framed, which can be a book, exercise book, test paper, etc. The operating body is used to operate on the carrier, and then realize the positioning of the frame selection content according to the position of the positioning operating body. The operating body can be a finger, a stylus, a pencil, etc., or even a small stick, which is not limited here.
以前置摄像头为例,将承载体置于智能设备的前侧,智能设备与承载体呈现一定的夹角,以使得前置摄像头能够拍摄到承载体的全部或大部分内容。获取操作体在承载体上的位置坐标以及操作者的眼球在所述承载体上的注视区域可以通过一个摄像头实现,例如广角摄像头。Taking the front camera as an example, the carrier is placed on the front side of the smart device, and the smart device and the carrier present a certain angle, so that the front camera can capture all or most of the contents of the carrier. Obtaining the position coordinates of the operating body on the carrier and the gaze area of the operator's eyeballs on the carrier can be achieved by a camera, such as a wide-angle camera.
在本发明较佳的实施例中,采用不同的摄像头确定操作体定位以及眼球跟踪信息。In a preferred embodiment of the present invention, different cameras are used to determine the positioning of the operating body and the eye tracking information.
请参阅图2所示,利用摄像头获取操作体在承载体上的位置坐标可以包括:Referring to Figure 2, using the camera to obtain the position coordinates of the operating body on the carrier may include:
1101、通过第一摄像头获取带有操作体的承载体的预览图像。1101. Acquire a preview image of a carrier with an operating body through a first camera.
在本发明实施例中,存在至少一个操作体在承载体上进行操作,该一个或多个操作体中至少存在一个操作体是与承载体呈点式接触,而最终拍照内容即以接触点的坐标进行的框选的,如果所有操作体均放置于承载体中,则不在本发明实施例的考虑范围。In the embodiment of the present invention, there is at least one operating body that operates on the carrier, and at least one operating body among the one or more operating bodies is in point contact with the carrier, and the final photographing content is the point of contact. The frame selection of coordinates is not considered in the embodiment of the present invention if all the operating bodies are placed in the carrier body.
该预览图像无需进行拍照保存,预览图像可以在智能设备的显示界面中显示,也可以不显示。通过智能设备先对该预览图像进行预处理,预处理包括但不限于:去噪、对比度增强以及形状矫正等。The preview image does not need to be photographed and saved, and the preview image may or may not be displayed on the display interface of the smart device. The preview image is first preprocessed by the smart device, and the preprocessing includes but is not limited to: denoising, contrast enhancement, and shape correction.
1102、确定预览图像中操作体的图像坐标。1102. Determine the image coordinates of the operating body in the preview image.
预览图像中操作体的图像坐标即像素点坐标,如果其中一个或多个操作体与承载体存在多个接触点,则该操作体的图像坐标存在多个连续点。The image coordinates of the operating body in the preview image are pixel coordinates. If one or more of the operating bodies and the carrier have multiple contact points, the image coordinates of the operating body have multiple consecutive points.
获取操作体图像坐标的方式有多种,示例性地,可以通过机器学习的方式对带有操作体的承载体图像样本进行训练,通过训练即可对目标图像中的操作体的特征进行识别,进而获取基于识别到的操作体的特征来得到操作体的图像坐标。这种方式在实际操作中,可能需要对不同的操作体均需要建立神经网络模型进行训练。There are many ways to obtain the image coordinates of the operating body. Exemplarily, the image sample of the carrier with the operating body can be trained by means of machine learning, and the features of the operating body in the target image can be recognized through training. Then, the image coordinates of the operating body are obtained based on the features of the recognized operating body. In actual operation of this method, it may be necessary to establish a neural network model for training on different operators.
在本发明较佳的实施例中,利用所述操作体和承载体上的内容之间的颜色差异识别所述操作体。In a preferred embodiment of the present invention, the operating body is identified by the color difference between the operating body and the content on the carrier.
颜色差异识别可以通过颜色转换方式实现,示例性地,将预览图像进行灰度化处理,将预览图像中所有内容进行灰度化处理,然后根据操作体的灰度值与承载体上的内容的灰度值的不同进行区分操作体,一般而言,操作体在预览图像中占有的像素点比承载体上的内容少很多,也就是说预览图像中某一种占有最少像素点的灰度值的物体即是操作体。Color difference recognition can be realized by color conversion. Exemplarily, grayscale processing is performed on the preview image, all contents in the preview image are grayscaled, and then based on the grayscale value of the operating body and the content on the carrier body The difference in gray value distinguishes the operator. Generally speaking, the pixel occupied by the operator in the preview image is much less than the content on the carrier, that is to say, a certain gray value in the preview image occupies the least pixel. The object is the operator.
在进行颜色转换之前,可以先进行背景和前景的区分,以提取前景图像,从而防止背景图像对操作体识别的影响,示例性地,可以通过背景高斯建模方式得到自适应背景模板,进而提取前景图像。当然,在一般情况下,背景颜色单一且灰度值趋向于255,因此,也可以提取预设值小于一定灰度值(例如200)的图像作为前景图像。Before performing color conversion, the background and foreground can be distinguished to extract the foreground image, so as to prevent the influence of the background image on the recognition of the operator. Exemplarily, an adaptive background template can be obtained through the background Gaussian modeling method, and then extracted. foreground image. Of course, in general, the background color is single and the gray value tends to be 255. Therefore, an image with a preset value smaller than a certain gray value (for example, 200) can also be extracted as a foreground image.
如果操作体颜色与承载体上内容的颜色区分度较大,则可以通过二值化的图像识别操作体,即设置一个灰度值基准点,示例性地,承载体内容一般趋向于黑色,可以将灰度值小于一定值的图像例如100设置成0,将灰度值大于等于一定值的图像设置成1。If the color of the operating body is more distinguishable from the color of the content on the carrier, the operating body can be identified through the binarized image, that is, a gray value reference point is set. Exemplarily, the content of the carrier generally tends to be black. For example, 100 is set to 0 for an image whose gray value is less than a certain value, and 1 is set for an image whose gray value is greater than or equal to a certain value.
如果操作体颜色与承载体上内容的颜色过于接近,示例性地,可以利用多颜色空间CN(Color Names颜色名称)算法所提供的颜色空间转换矩阵将预览图像的RGB图像转换到11维的多颜色空间,进而根据该细化后的多颜色空间加以区分,识别操作体。If the color of the operating body is too close to the color of the content on the carrier, exemplarily, the color space conversion matrix provided by the multi-color space CN (Color Names) algorithm can be used to convert the RGB image of the preview image into an 11-dimensional multi-color space. The color space is further distinguished according to the refined multi-color space to identify the operator.
对于触控笔、铅笔、小棍等方式的操作体,其在本发明实施例中使用时,一般直接采用点式接触,即只要检测到这类操作体的端部位置坐标即可,这里的端部位置,是指远离操作体手持部的一端端部,即检测到操作体、手掌以及承载体内容三部分进行区分,然后确定操作体远离手掌的端部位置坐标,该端部位置坐标即为操作体的位置坐标。For the operating body in the form of a stylus, a pencil, a small stick, etc., when it is used in the embodiment of the present invention, point contact is generally used directly, that is, as long as the position coordinates of the end of such an operating body are detected, here the The end position refers to the end of the hand-held part of the operating body, that is, the three parts of the operating body, the palm and the content of the carrier are detected to distinguish, and then the position coordinates of the end of the operating body far from the palm are determined. is the position coordinate of the operator.
对于手指实现的操作体,其在本发明实施例中,可以是采用点式接触,也可以是如图4所示整个手指放置在承载体上,这种情况下,可以采用检测指尖以及承载体内容并实现区分,然后确定的指尖坐标即视为操作体的位置坐标。因此,使用手指时,可能会出现两只手均放置于承载体的操作方式,例如一只手按压承载体,用于抚平承载体,另一只手用于指向框选内容,而该另一只手在指引过程中,也可能会多个手指均与承载体有接触,从而就会造成多个手指呈现于预览图像中。For the operating body realized by the finger, in this embodiment of the present invention, it may be a point contact, or the entire finger may be placed on the carrier as shown in FIG. 4 . In this case, the detection fingertip and the carrier Then the determined fingertip coordinates are regarded as the position coordinates of the operating body. Therefore, when using fingers, there may be an operation mode in which both hands are placed on the carrier, for example, one hand is used to press the carrier to smooth the carrier, the other hand is used to point to the frame selection content, and the other During the guidance process of one hand, multiple fingers may all be in contact with the carrier, so that multiple fingers appear in the preview image.
1103、利用所述图像坐标确定所述操作体的位置坐标。1103. Determine the position coordinates of the operating body by using the image coordinates.
将像素点坐标转换为世界坐标,其实现方式有多种。There are many ways to convert pixel coordinates to world coordinates.
示例性地,可以通过坐标转换算法进行,坐标转换算法如公式(1)所示:Exemplarily, it can be performed through a coordinate transformation algorithm, and the coordinate transformation algorithm is shown in formula (1):
其中,s为比例系数,(u,v)为图像坐标,(x,y,z)为位置坐标,M和P分别为摄像头的内参矩阵和外参矩阵,在智能设备放置方式确定的情况下,内参矩阵和外参矩阵均为固定值。Among them, s is the scale coefficient, (u, v) is the image coordinate, (x, y, z) is the position coordinate, M and P are the camera's internal parameter matrix and external parameter matrix, respectively. In the case of determining the placement method of the smart device , both the internal parameter matrix and the external parameter matrix are fixed values.
还可以通过映射的方式,即在智能设备放置方式确定的情况下,可以建立图像坐标和位置坐标的映射关系(z轴方向坐标可以忽略)。It is also possible to establish a mapping relationship between the image coordinates and the position coordinates (the z-axis direction coordinates can be ignored) in the case of determining the placement method of the smart device.
请参照图3所示,利用摄像头获取操作者的眼球在所述承载体上的注视区域,包括:Please refer to FIG. 3 , use the camera to obtain the gaze area of the operator's eyeball on the carrier, including:
1111、启动第二摄像头,获取操作者的脸部图像。1111. Start the second camera to acquire a face image of the operator.
第二摄像头的位置不做限定,以能够拍摄到人脸的全部或大部分特征为基准。The position of the second camera is not limited, and is based on being able to capture all or most of the features of the human face.
1112、确定所述脸部图像中瞳孔中心的位置。1112. Determine the position of the center of the pupil in the face image.
确定瞳孔中心位置的方式可以有多种。示例性地,通过机器学习的方式例如卷积神经网络对脸部图像的特征进行提取,从而得到瞳孔中心在脸部图像的位置。还可以通过基于Adaboost算法训练人眼识别的级联分类器,同时结合ASM算法对人眼特征点跟踪确定瞳孔中心位置。There are several ways to determine the center of the pupil. Exemplarily, the feature of the face image is extracted by means of machine learning, such as a convolutional neural network, so as to obtain the position of the center of the pupil in the face image. It is also possible to train a cascade classifier for human eye recognition based on the Adaboost algorithm, and at the same time combine the ASM algorithm to track the feature points of the human eye to determine the center position of the pupil.
1113、确定所述瞳孔中心的位置相对于基准点的偏移量。1113. Determine the offset of the position of the pupil center relative to the reference point.
这里的偏移量是相对于操作者水平方向直视时瞳孔中心的位置而言,以操作者水平方向直视时瞳孔中心的位置作为基准点,偏离基准点时,则视线就会向其他方向偏移,基于直视方向和偏移位置,则可以确定偏移位置的视线方向。The offset here is relative to the position of the center of the pupil when the operator is looking straight in the horizontal direction. The position of the center of the pupil when the operator is looking straight in the horizontal direction is used as the reference point. Offset, based on the direct viewing direction and the offset position, the gaze direction of the offset position can be determined.
示例性地,确定偏移位置可以通过瞳孔的特征点构建眼部外观,确定瞳孔中心直视时的位置,记为第一位置,根据步骤1111得到的瞳孔中心的位置记为第二位置,第二位置相对于第一位置的变化量即为偏移量。Exemplarily, to determine the offset position, the appearance of the eye can be constructed by the feature points of the pupil, and the position of the pupil center when looking directly is determined, which is denoted as the first position, and the position of the pupil center obtained according to step 1111 is denoted as the second position. The change of the second position relative to the first position is the offset.
1114、基于所述偏移量确定所述眼球的视线方向及在所述承载体上的注视点。1114. Determine the line-of-sight direction of the eyeball and the gaze point on the carrier based on the offset.
示例性地,可以依据测量数据,直接建立偏移量与视线方向以及注视点的映射关系,基于偏移量确定视线方向,基于视线方向确定注视点。Exemplarily, the mapping relationship between the offset and the gaze direction and the gaze point can be directly established according to the measurement data, the gaze direction is determined based on the offset, and the gaze point is determined based on the gaze direction.
示例性地,可以预先建立训练数据,利用训练样本对应分类器进行训练,可以建立偏移量与视线方向以及注视点的映射关系。此后,可以利用分类器直接进行分类,得到视线方向和注视点。还可以利用训练样本对应分类器进行训练,建立偏移量与注视区域的映射关系,此后,可以利用分类器直接进行分类,直接得到注视区域。Exemplarily, training data may be established in advance, and the classifier may be trained by using the training samples, and the mapping relationship between the offset and the gaze direction and the gaze point may be established. After that, the classifier can be used for direct classification to obtain the gaze direction and gaze point. It is also possible to use the training samples to correspond to the classifier for training to establish a mapping relationship between the offset and the gaze area. After that, the classifier can be used for direct classification to directly obtain the gaze area.
示例性地,还可以借助辅助光源确定注视点,此方式可省略步骤1113。例如,通过多个辅助光源例如近红外光源照射人眼,脸部图像中会存在这些辅助光源的普尔钦光斑,利用普尔钦光斑与瞳孔中心位置基于交比不变性建立脸部图像、眼部和承载体之间的映射关系,从而眼球在承载体上的注视点。Exemplarily, the gaze point may also be determined with the aid of an auxiliary light source, and
得到注视点之后,还可以通过脸部图像的面部朝向对注视点位置进行矫正,矫正可以是在上述映射关系中增加面部朝向的特征,从而得到更为准确的注视点信息。After the fixation point is obtained, the fixation point position can also be corrected by the face orientation of the face image, and the correction may be to add the feature of the face orientation to the above mapping relationship, so as to obtain more accurate fixation point information.
1115、以所述注视点为中心,确定注视区域。1115. Taking the gaze point as a center, determine a gaze area.
得到注视点位置后,则可以以注视点为中心,确定注视区域。注视区域可以是规则或不规则形状,其尺寸根据需要设定。例如,可以设置成圆形或正方形的注视区域。After the fixation point position is obtained, the fixation area can be determined with the fixation point as the center. The gaze area can be regular or irregular in shape, and its size is set as desired. For example, a circular or square gaze area can be set.
120、在所述注视区域内存在且仅存在一个所述位置坐标时,执行第一操作;所述第一操作为基于所述位置坐标以及预设规则对承载体上的内容进行拍照。120. When there is only one position coordinate in the gaze area, perform a first operation; the first operation is to take a picture of the content on the carrier based on the position coordinate and a preset rule.
基于步骤110的说明,在应对点式接触实现框题的前提下,当注视区域内存在一个位置坐标时,说明眼球运动与操作体指引相同,则就可以进行框题操作,至于注视区域外是否有操作体存在,则不予考虑,当然,在某些情况下,如果注视区域外的操作体(这里的操作体可以不被认为是操作体,定义其为辅助体)影响预设规则对承载体的内容进行拍照时,则智能设备可以发出互动指令,示例性地,可以发出语音:“请移动遮挡题目的辅助体”;或者对拍摄的带有辅助体的内容进行去除辅助体操作。Based on the description of
图4示出了采用手指指向框选区域的操作示意图,其中,手210用于按压承载体240,手220的手指221用于定位框选区域,如果眼球230的注视点231构成的注视区域232覆盖所述手指221的指尖部分,图4示出的注视区域内存在一个且仅存在一个坐标位置2211,则手指221的指尖的坐标位置即为框选区域的定位点,根据该指尖坐标位置和预设规则对承载体上的内容241进行框选,即拍照。4 shows a schematic diagram of the operation of using a finger to point to the frame selection area, wherein the
基于所述位置坐标以及预设规则对承载体上的内容进行拍照的方式有多种。示例性地,预设规则为对操作体上侧的一道题进行框选,则基于上述的预览图像,根据目标位置坐标(注视区域内的单个位置坐标)设置一第一水平线,该第一水平线与承载体的上边缘或下边缘平行,然后找出试题编号,在试题编号上侧设置一第二水平线,该第二水平线与第一水平线平行,选择预览图像中两条平行线之间的区域进行拍照。还可以基于两道题之间的间隔(题间隔一般大于行间隔)设置第二水平线。There are various ways of photographing the content on the carrier based on the position coordinates and preset rules. Exemplarily, the preset rule is to perform a frame selection on a question on the upper side of the operating body, then based on the above-mentioned preview image, a first horizontal line is set according to the target position coordinates (a single position coordinate in the gaze area), the first horizontal line. Be parallel to the upper or lower edge of the carrier, then find the question number, set a second horizontal line on the upper side of the question number, the second horizontal line is parallel to the first horizontal line, select the area between the two parallel lines in the preview image Take a photo. The second horizontal line can also be set based on the spacing between the two questions (the question spacing is generally greater than the line spacing).
作为可选的实施方式,在步骤120的情况外,如果出现注视区域不在所述承载体、或者未检测到所述位置坐标、或者注视区域内不存在位置坐标或者存在两个或两个以上的位置坐标时,执行第二操作。As an optional implementation manner, in addition to
第二操作可以是不做任何操作,也可以是发送警示提醒或者语音指令等。示例性地,第二操作可以是无法识别框选内容的语音指令,也可以是语音互助指令,例如,如果注视区域不在所述承载体上,则智能设备可以发出语音:“请将目光放于承载体上”;如果未检测到所述位置坐标,智能设备可以发出语音:“请用手指确认框选内容”;如果注视区域内不存在位置坐标,智能设备可以发出语音:“请将目光放于操作体上”或“请将操作体放于目光注视范围内”;如果注视区域内存在两个或两个以上的位置坐标,则智能设备可以发出语音:“请将移走辅助体”。The second operation may be to do nothing, or to send a warning reminder or a voice command. Exemplarily, the second operation may be a voice instruction that cannot recognize the frame selection content, or a voice mutual assistance instruction. For example, if the gaze area is not on the carrier, the smart device on the carrier"; if the position coordinates are not detected, the smart device can make a voice: "please confirm the selection with your finger"; if there are no position coordinates in the gaze area, the smart device can voice: "please look On the operating body" or "Please put the operating body within the gaze range"; if there are two or more position coordinates in the gaze area, the smart device can make a voice: "Please remove the auxiliary body".
实施本发明实施例,可以针对出现多个点触式的操作体的情况,通过操作体定位和眼球跟踪技术相结合的方式获取框选区域,可摒弃现有出现多操作体无法识别的现象,提高框题准确率,提升框题效率,在此基础上,显然可提高用户体验。By implementing the embodiments of the present invention, in the case of multiple touch-type operating bodies, the frame selection area can be obtained by combining the operating body positioning and eye tracking technology, and the existing phenomenon that multiple operating bodies cannot be identified can be discarded. Improve the accuracy of frame questions and improve the efficiency of frame questions. On this basis, the user experience can obviously be improved.
实施例二Embodiment 2
当操作者使用尺子等操作体放置于承载体上使用时,则可能会出现多个操作体的位置坐标,并且这多个操作体的位置坐标可能会有部分或全部落入注视区域内,请参照图5所示,则这种情况下,拍照框选的方法,包括:When the operator uses an operating body such as a ruler to place it on the carrier, the position coordinates of multiple operating bodies may appear, and some or all of the position coordinates of these multiple operating bodies may fall within the gaze area. Please Referring to Fig. 5, in this case, the method for frame selection by taking pictures includes:
310、当接收到框选指令时,利用摄像头获取操作体在承载体上的位置坐标以及操作者的眼球在所述承载体上的注视区域。310. When a frame selection instruction is received, use a camera to acquire the position coordinates of the operating body on the carrier and the gaze area of the operator's eyeballs on the carrier.
步骤310和实施例一描述的步骤110大致相同,这里不再赘述。Step 310 is substantially the same as
320、当所述注视区域内存在多个所述位置坐标,判断所述多个位置坐标是否为连续点。320. When there are multiple location coordinates in the gaze area, determine whether the multiple location coordinates are continuous points.
对于操作体为手指的呈现形式,注视区域内存在的多个所述位置坐标通过多个手指并排形成,即可以检测到多个指尖,且该多个指尖存在至少两个以上位于注视区域内,注视区域内的多个指尖间隔距离小于预设距离阈值,则为连续点,连续点之间连接形成的线段称为指尖判断线段。For the presentation form in which the operating body is a finger, a plurality of the position coordinates existing in the gaze area are formed by multiple fingers side by side, that is, multiple fingertips can be detected, and there are at least two of the multiple fingertips located in the gaze area. If the distance between multiple fingertips in the gaze area is less than the preset distance threshold, they are continuous points, and the line segment formed by the connection between the continuous points is called the fingertip judgment line segment.
对于操作体为触控笔、铅笔、小棍以及尺子等的呈现形式,注视区域内存在的多个所述位置坐标满足手持部不位于操作体的端部、且注视区域也不位于操作体的端部,多个所述位置坐标必然形成连续点,且连续点形成的线段位于其对应的操作体的长度方向上,注视区域内存在一个或多个线段,则该一个线段或多个线段构成的整体线段均视为平放判断线段。For the presentation forms in which the operating body is a stylus, a pencil, a stick, a ruler, etc., a plurality of the position coordinates existing in the gaze area satisfies that the hand-held part is not located at the end of the operating body, and the gaze area is not located at the end of the operating body. At the end, a plurality of the position coordinates must form a continuous point, and the line segment formed by the continuous point is located in the length direction of the corresponding operating body, and there is one or more line segments in the gaze area, then the one line segment or multiple line segments constitute The whole line segment of , is regarded as a flat judgment line segment.
330、如果所述多个位置坐标为连续点,则检测所述承载体的边缘,并获取所述连续点与承载体任意一边缘的夹角。330. If the multiple position coordinates are continuous points, detect the edge of the carrier, and obtain the angle between the continuous point and any edge of the carrier.
识别承载体的边缘通过预览图像进行边缘检测实现,边缘检测也是在预览图像经过预处理后进行的。Recognizing the edge of the carrier is realized by performing edge detection on the preview image, and the edge detection is also performed after the preview image is preprocessed.
示例性地,连续点与承载体任意边缘的夹角可以通过斜率计算方法计算得到,例如可以在该连续点中任取两点以及边缘上任取两点进行计算。Exemplarily, the angle between the continuous point and any edge of the carrier can be calculated by a slope calculation method, for example, two points in the continuous point and two points on the edge can be selected for calculation.
对于指尖判断线段或一个线段形成的平放判断线段而言,夹角仅存在一个;而对于多个线段整体构成的平放判断线段而言,则可能存在多个夹角。因此,在本发明较佳的实施例中,为了便于计算,将多个线段整体构成的平放判断线段在获取夹角之前则进行排除。For a fingertip judgment line segment or a flat judgment line segment formed by one line segment, there is only one included angle; while for a flat judgment line segment composed of multiple line segments as a whole, there may be multiple included angles. Therefore, in a preferred embodiment of the present invention, in order to facilitate the calculation, the flat judging line segment composed of a plurality of line segments as a whole is excluded before the included angle is obtained.
示例性地,排除方法可以是:如果检测到注视区域内存在超过两个端点的情况时,则不予计算夹角,直接进行第二操作。Exemplarily, the exclusion method may be: if it is detected that there are more than two endpoints in the gaze area, the included angle is not calculated, and the second operation is directly performed.
340、如果所述连续点与承载体其中一边缘的夹角小于或等于预设夹角,则执行第一操作;所述第一操作为基于所述连续点以及预设规则对承载体上的内容进行拍照。340. If the included angle between the continuous point and one of the edges of the carrier is less than or equal to the preset angle, perform a first operation; the first operation is to perform the first operation on the carrier based on the continuous point and a preset rule. content to be photographed.
对于能够存在且仅存在一个夹角的情况时,则将夹角与预设夹角进行比对,预设夹角根据需要设定,例如可以是5度。即夹角小于或等于预设夹角时,可认定判断线段与承载体某一边缘近似于平行,既可以根据连续点和预设规则确定框选区域,对框选区域内的内容拍照。When there is only one included angle, the included angle is compared with the preset included angle, and the preset included angle is set as required, for example, it may be 5 degrees. That is, when the angle is less than or equal to the preset angle, it can be determined that the line segment is approximately parallel to an edge of the carrier, and the frame selection area can be determined according to the continuous points and preset rules, and the content in the frame selection area can be photographed.
预设规则与实施例一不同,这里的预设规则的框选区域一般为连续点与该连续点平行或近似平行的边缘之间的部分或全部区域。示例性地,以连续点所在的直线为第一直线,对于与承载体上边缘或下边缘平行或近似平行的第一直线而言,第一直线定义为水平线,则框选区域为该水平线上侧或下侧的部分或全部区域;对于与承载体左边缘或右边缘平行或近似平行的第一直线而言,第一直线定义为竖直线,则框选区域为该竖直线左侧或右侧的部分或全部区域。The preset rule is different from the first embodiment, and the frame selection area of the preset rule here is generally a part or all of the area between a continuous point and an edge parallel or approximately parallel to the continuous point. Exemplarily, taking the straight line where the continuous point is located as the first straight line, for the first straight line that is parallel or approximately parallel to the upper or lower edge of the carrier, the first straight line is defined as a horizontal line, and the frame selection area is Part or all of the area on the upper or lower side of the horizontal line; for the first straight line that is parallel or approximately parallel to the left or right edge of the carrier, the first straight line is defined as a vertical line, and the frame selection area is the Part or all of the area to the left or right of the vertical line.
图6示出了使用铅笔作为操作体放置于承载体上进行框选的示意图。其中,铅笔410用于定位框选区域,如果眼球430的注视点431构成的注视区域432中存在多个该铅笔410的位置坐标,且该多个位置坐标构成连续点420;而且图6中,连续点420与承载体440的上边缘或下边缘平行,则依据步骤320,可以根据该连续点和预设规则对承载体上的内容441确定框选区域,并对框选区域的内容拍照。FIG. 6 shows a schematic diagram of using a pencil as an operating body and placing it on a carrier to perform frame selection. Among them, the
图7示出了使用两个尺子作为操作体放置于承载体上进行框选的示意图。其中,尺子510和尺子520存在交叉放置于承载体560上,眼球530的注视点531构成的注视区域532中同时存在尺子510和尺子520的多个位置坐标,且该多个位置坐标分别构成连续点540和连续点550;由于连续点540和连续点550存在四个端点,则直接进行第二操作。FIG. 7 shows a schematic diagram of using two rulers as operating bodies and placing them on a carrier for frame selection. The
作为可选的实施方式,在步骤320的情况外,当注视区域不在所述承载体上、或者未检测到所述位置坐标、或者注视区域内不存在位置坐标、或者注视区域内存在多个位置坐标且所述多个位置坐标不是连续点或不全是连续点、或者注视区域内存在多个位置坐标且所述多个位置坐标是连续点但所述连续点与所述承载体所有边缘的夹角均大于预设夹角,则执行第二操作。As an optional implementation manner, in addition to the case of
第二操作可以是不做任何操作,也可以是发送警示提醒或者语音指令等。示例性地,第二操作可以是无法识别框选内容的语音指令,也可以是实施例一类似的语音互助指令。The second operation may be to do nothing, or to send a warning reminder or a voice command. Exemplarily, the second operation may be a voice instruction that cannot recognize the content of the frame selection, or may be a voice mutual assistance instruction similar to the first embodiment.
实施本发明实施例,可以针对出现多个线触式的操作体的情况,通过操作体定位和眼球跟踪技术相结合的方式获取框选区域,可摒弃现有出现多操作体无法识别的现象,提高框题准确率,提升框题效率,在此基础上,显然可提高用户体验。By implementing the embodiments of the present invention, the frame selection area can be obtained by combining the positioning of the operating body and the eye-tracking technology for the situation where there are multiple line-touched operating bodies, and the existing phenomenon that multiple operating bodies cannot be identified can be discarded. Improve the accuracy of frame questions and improve the efficiency of frame questions. On this basis, the user experience can obviously be improved.
实施例三Embodiment 3
请参阅图8,图8是本发明实施例公开的一种拍照框选装置的结构示意图。如图8所示,该拍照框选装置可以包括:Please refer to FIG. 8 . FIG. 8 is a schematic structural diagram of a frame selection device for photographing disclosed in an embodiment of the present invention. As shown in FIG. 8 , the device for frame selection of photos may include:
采集单元610,用于当接收到框选指令时,利用摄像头获取操作体在承载体上的位置坐标以及操作者的眼球在所述承载体上的注视区域;The
执行单元620,用于在所述注视区域内存在且仅存在一个所述位置坐标时,执行第一操作;所述第一操作为基于所述位置坐标以及预设规则对承载体上的内容进行拍照。The
作为一种可选的实施方式,采集单元610可以包括第一单元611和第二单元612,其中,第一单元611用于利用摄像头获取操作体在承载体上的位置坐标;第二单元612用于利用摄像头获取操作者的眼球在所述承载体上的注视区域。As an optional implementation manner, the
作为一种可选的实施方式,第一单元611可以包括:As an optional implementation manner, the
第一子单元6111,用于启动第一摄像头,获取带有操作体的承载体的预览图像;The
第二子单元6112,用于确定预览图像中操作体的图像坐标;The
第三子单元6113,用于利用所述图像坐标确定所述操作体的位置坐标。The
作为一种可选的实施方式,第二子单元6112可以包括:利用所述操作体和承载体上的内容之间的颜色差异识别所述操作体;确定所述操作体在预览图像中的图像坐标。As an optional implementation manner, the
作为一种可选的实施方式,第二单元612可以包括:As an optional implementation manner, the
第四子单元6121,用于启动第二摄像头,获取操作者的脸部图像;The
第五子单元6122,用于确定所述脸部图像中瞳孔中心的位置以及所述瞳孔中心的位置相对于基准点的偏移量;The
第六子单元6123,用于基于所述偏移量确定所述眼球的视线方向及在所述承载体上的注视点;The
第七子单元6124,用于以所述注视点为中心,确定注视区域。The
作为一种可选的实施方式,第五子单元6122可以包括:将所述脸部图像输入在先训练的卷积神经网络确定瞳孔的特征点;利用所述瞳孔的特征点确定瞳孔中心的位置;依据所述瞳孔的特征点,构建眼部外观,将瞳孔中心直视时的位置作为基准点;根据所述瞳孔中心的位置和所述基准点的位置,计算所述瞳孔中心位置相对于基准点的偏移量。As an optional implementation manner, the
作为一种可选的实施方式,所述系统还可以包括:当注视区域不在所述承载体、或者未检测到所述位置坐标、或者注视区域内不存在位置坐标或者存在两个或两个以上的位置坐标时,执行第二操作。As an optional implementation manner, the system may further include: when the gaze area is not on the carrier, or the position coordinates are not detected, or there are no position coordinates in the gaze area, or there are two or more When the position coordinates of , perform the second operation.
图8所示的拍照框选装置,可以针对出现多个点触式的操作体的情况,通过操作体定位和眼球跟踪技术相结合的方式获取框选区域,可摒弃现有出现多操作体无法识别的现象,提高框题准确率,提升框题效率,在此基础上,显然可提高用户体验。The photo frame selection device shown in FIG. 8 can obtain the frame selection area by combining the positioning of the operation body and the eye tracking technology for the situation where there are multiple touch-type operating bodies. Identify the phenomenon, improve the accuracy of frame questions, and improve the efficiency of frame questions. On this basis, the user experience can obviously be improved.
实施例四Embodiment 4
请参阅图9,图9是本发明实施例公开的一种拍照框选装置的结构示意图。如图9所示,该拍照框选装置可以包括:Please refer to FIG. 9 . FIG. 9 is a schematic structural diagram of a frame selection device for taking pictures disclosed in an embodiment of the present invention. As shown in FIG. 9, the photo frame selection device may include:
采集单元710、用于当接收到框选指令时,利用摄像头获取操作体在承载体上的位置坐标以及操作者的眼球在所述承载体上的注视区域;A
判断单元720、用于当所述注视区域内存在多个所述位置坐标,判断所述多个位置坐标是否为连续点;Judging
获取单元730、用于如果所述多个位置坐标为连续点,则检测所述承载体的边缘,并获取所述连续点与承载体任意一边缘的夹角;an obtaining
执行单元740、用于如果所述连续点与承载体其中一边缘的夹角小于或等于预设夹角,则执行第一操作;所述第一操作为基于所述连续点以及预设规则对承载体上的内容进行拍照。Executing
作为一种可选的实施方式,所述系统还可以包括:当注视区域不在所述承载体上、或者未检测到所述位置坐标、或者注视区域内不存在位置坐标、或者注视区域内存在多个位置坐标且所述多个位置坐标不是连续点或不全是连续点、或者注视区域内存在多个位置坐标且所述多个位置坐标是连续点但所述连续点与所述承载体所有边缘的夹角均大于预设夹角,则执行第二操作。As an optional implementation manner, the system may further include: when the gaze area is not on the carrier, or the position coordinates are not detected, or there are no position coordinates in the gaze area, or there are multiple position coordinates and the plurality of position coordinates are not continuous points or not all continuous points, or there are multiple position coordinates in the gaze area and the plurality of position coordinates are continuous points but the continuous points and all edges of the carrier If the included angle is greater than the preset included angle, the second operation is performed.
图9所示的拍照框选装置,可以针对出现多个点触式的操作体的情况,通过操作体定位和眼球跟踪技术相结合的方式获取框选区域,可摒弃现有出现多操作体无法识别的现象,提高框题准确率,提升框题效率,在此基础上,显然可提高用户体验。The photo frame selection device shown in FIG. 9 can obtain the frame selection area by combining the positioning of the operation body and the eye tracking technology for the situation where there are multiple touch-type operating bodies. Identify the phenomenon, improve the accuracy of frame questions, and improve the efficiency of frame questions. On this basis, the user experience can obviously be improved.
实施例五Embodiment 5
请参阅图10,图10是本发明实施例公开的一种电子设备的结构示意图。电子设备可以是学习机、家教机、点读机、平板电脑或手机等智能设备。如图10所示,该电子设备可以包括:Please refer to FIG. 10. FIG. 10 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present invention. Electronic devices can be smart devices such as learning machines, tutoring machines, point readers, tablet computers or mobile phones. As shown in Figure 10, the electronic device may include:
存储有可执行程序代码的存储器810;a
与存储器810耦合的处理器820;a
其中,处理器820调用存储器810中存储的可执行程序代码,执行实施例一或实施例二任意一种拍照框选的方法中的部分或全部步骤。Wherein, the
本发明实施例公开一种计算机可读存储介质,其存储计算机程序,其中,该计算机程序使得计算机执行实施例一或实施例二任意一种拍照框选的方法中的部分或全部步骤。An embodiment of the present invention discloses a computer-readable storage medium, which stores a computer program, wherein the computer program enables a computer to execute part or all of the steps in any one of the first or second embodiments of the method for frame selection.
本发明实施例还公开一种计算机程序产品,其中,当计算机程序产品在计算机上运行时,使得计算机执行实施例一或实施例二任意一种拍照框选的方法中的部分或全部步骤。The embodiment of the present invention also discloses a computer program product, wherein when the computer program product runs on the computer, the computer is made to execute some or all of the steps in any of the first or second embodiments of the method for frame selection.
本发明实施例还公开一种应用发布平台,其中,应用发布平台用于发布计算机程序产品,其中,当计算机程序产品在计算机上运行时,使得计算机执行实施例一或实施例二任意一种拍照框选的方法中的部分或全部步骤。The embodiment of the present invention also discloses an application publishing platform, wherein the application publishing platform is used for publishing a computer program product, wherein when the computer program product runs on a computer, the computer is made to execute any one of the first embodiment or the second embodiment to take a picture Some or all of the steps in the method to be framed.
在本发明的各种实施例中,应理解,所述各过程的序号的大小并不意味着执行顺序的必然先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。In various embodiments of the present invention, it should be understood that the size of the sequence numbers of the described procedures does not imply a necessary order of execution, and the execution order of each procedure should be determined by its functions and internal logic, and does not deal with the present invention. The implementation of the embodiments constitutes no limitation.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物单元,即可位于一个地方,或者也可以分布到多个网络单元上。可根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be object units, and may be located in one place or distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本发明各实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。所述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元若以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可获取的存储器中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或者部分,可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干请求用以使得一台计算机设备(可以为个人计算机、服务器或者网络设备等,具体可以是计算机设备中的处理器)执行本发明的各个实施例所述方法的部分或全部步骤。The integrated unit, if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a computer-accessible memory. Based on such understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a memory , including several requests to cause a computer device (which may be a personal computer, a server, or a network device, etc., specifically a processor in the computer device) to execute some or all of the steps of the methods described in the various embodiments of the present invention.
在本发明所提供的实施例中,应理解,“与A对应的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其他信息确定B。In the embodiments provided by the present invention, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean that B is only determined according to A, and B may also be determined according to A and/or other information.
本领域普通技术人员可以理解所述实施例的各种方法中的部分或全部步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质包括只读存储器(Read-Only Memory,ROM)、随机存储器(Random Access Memory,RAM)、可编程只读存储器(Programmable Read-only Memory,PROM)、可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)、一次可编程只读存储器(One-time Programmable Read-Only Memory,OTPROM)、电子抹除式可复写只读存储器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(CompactDisc Read-Only Memory,CD-ROM)或其他光盘存储器、磁盘存储器、磁带存储器、或者能够用于携带或存储数据的计算机可读的任何其他介质。Those of ordinary skill in the art can understand that some or all of the steps in the various methods of the embodiments can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes only Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-only Memory (PROM), Erasable Programmable Read-Only Memory, EPROM), One-time Programmable Read-Only Memory (OTPROM), Electronically Erasable Programmable Read-Only Memory (EEPROM), CD-ROM ( CompactDisc Read-Only Memory, CD-ROM) or other optical disk storage, magnetic disk storage, tape storage, or any other computer-readable medium that can be used to carry or store data.
以上对本发明实施例公开的一种拍照框选的方法、装置、电子设备及存储介质进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The method, device, electronic device, and storage medium for taking a picture frame selection disclosed in the embodiments of the present invention are described above in detail. The principles and implementations of the present invention are described with specific examples in this paper. The description of the above embodiments It is only used to help understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific embodiments and application scope. In summary, The contents of this specification should not be construed as limiting the present invention.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010368339.2A CN111432131B (en) | 2020-04-30 | 2020-04-30 | Photographing frame selection method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010368339.2A CN111432131B (en) | 2020-04-30 | 2020-04-30 | Photographing frame selection method and device, electronic equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111432131A true CN111432131A (en) | 2020-07-17 |
| CN111432131B CN111432131B (en) | 2022-03-08 |
Family
ID=71552306
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010368339.2A Active CN111432131B (en) | 2020-04-30 | 2020-04-30 | Photographing frame selection method and device, electronic equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111432131B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112926099A (en) * | 2021-04-02 | 2021-06-08 | 珠海市鸿瑞信息技术股份有限公司 | Management system based on remote control identity authentication |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104423801A (en) * | 2013-08-26 | 2015-03-18 | 汤姆逊许可公司 | Display method through a head mounted device |
| US20150302585A1 (en) * | 2014-04-22 | 2015-10-22 | Lenovo (Singapore) Pte. Ltd. | Automatic gaze calibration |
| CN105446673A (en) * | 2014-07-28 | 2016-03-30 | 华为技术有限公司 | Screen display method and terminal device |
| CN106814854A (en) * | 2016-12-29 | 2017-06-09 | 杭州联络互动信息科技股份有限公司 | A kind of method and device for preventing maloperation |
| CN107957779A (en) * | 2017-11-27 | 2018-04-24 | 海尔优家智能科技(北京)有限公司 | A kind of method and device searched for using eye motion control information |
| CN109376737A (en) * | 2018-09-27 | 2019-02-22 | 广东小天才科技有限公司 | Method and system for assisting user in solving learning problem |
| CN109409234A (en) * | 2018-09-27 | 2019-03-01 | 广东小天才科技有限公司 | Method and system for assisting students in problem location learning |
| CN110597450A (en) * | 2019-09-16 | 2019-12-20 | 广东小天才科技有限公司 | Anti-false touch recognition method, device, point-reading device and point-reading recognition method thereof |
-
2020
- 2020-04-30 CN CN202010368339.2A patent/CN111432131B/en active Active
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104423801A (en) * | 2013-08-26 | 2015-03-18 | 汤姆逊许可公司 | Display method through a head mounted device |
| US20150302585A1 (en) * | 2014-04-22 | 2015-10-22 | Lenovo (Singapore) Pte. Ltd. | Automatic gaze calibration |
| CN105446673A (en) * | 2014-07-28 | 2016-03-30 | 华为技术有限公司 | Screen display method and terminal device |
| CN106814854A (en) * | 2016-12-29 | 2017-06-09 | 杭州联络互动信息科技股份有限公司 | A kind of method and device for preventing maloperation |
| CN107957779A (en) * | 2017-11-27 | 2018-04-24 | 海尔优家智能科技(北京)有限公司 | A kind of method and device searched for using eye motion control information |
| CN109376737A (en) * | 2018-09-27 | 2019-02-22 | 广东小天才科技有限公司 | Method and system for assisting user in solving learning problem |
| CN109409234A (en) * | 2018-09-27 | 2019-03-01 | 广东小天才科技有限公司 | Method and system for assisting students in problem location learning |
| CN110597450A (en) * | 2019-09-16 | 2019-12-20 | 广东小天才科技有限公司 | Anti-false touch recognition method, device, point-reading device and point-reading recognition method thereof |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112926099A (en) * | 2021-04-02 | 2021-06-08 | 珠海市鸿瑞信息技术股份有限公司 | Management system based on remote control identity authentication |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111432131B (en) | 2022-03-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112926423B (en) | Pinch gesture detection and recognition method, device and system | |
| US9953216B2 (en) | Systems and methods for performing actions in response to user gestures in captured images | |
| US10725552B2 (en) | Text input method and device based on gesture recognition, and storage medium | |
| US20180007259A1 (en) | Photo-taking prompting method and apparatus, an apparatus and non-volatile computer storage medium | |
| CN106030610B (en) | Real-time 3D gesture recognition and tracking system for mobile devices | |
| US9239961B1 (en) | Text recognition near an edge | |
| US9269009B1 (en) | Using a front-facing camera to improve OCR with a rear-facing camera | |
| CN111353501A (en) | Book point-reading method and system based on deep learning | |
| CN108230383A (en) | Hand three-dimensional data determines method, apparatus and electronic equipment | |
| CN105933607A (en) | Photographing effect adjusting method of mobile terminal and mobile terminal | |
| CN109274891B (en) | Image processing method, device and storage medium thereof | |
| CN111050017A (en) | Picture and text photographing equipment | |
| CN103092437B (en) | A Portable Touch Interaction System Based on Image Processing Technology | |
| CN112199015B (en) | Intelligent interaction all-in-one machine and writing method and device thereof | |
| CN113282164A (en) | Processing method and device | |
| CN111753715A (en) | Method, device, electronic device and storage medium for shooting test questions in a reading scene | |
| CN104835361A (en) | Electronic dictionary | |
| CN111753168A (en) | A method, device, electronic device and storage medium for searching questions | |
| CN111432131A (en) | Photographing frame selection method and device, electronic equipment and storage medium | |
| CN111382598B (en) | Identification method and device and electronic equipment | |
| CN117519479A (en) | Man-machine interaction method, device, equipment and storage medium based on gestures | |
| CN111563497B (en) | Frame title method, device, electronic device and storage medium based on mobile trajectory | |
| CN111563511B (en) | A method, device, electronic equipment and storage medium for intelligent framed questions | |
| JP5791557B2 (en) | Contact operation support system, contact operation support device, and contact operation method | |
| CN115456997A (en) | Multi-scene and multi-posture automatic recognition method, device and system for human acupoints |
Legal Events
| 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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |
