技术领域technical field
本发明涉及智能终端领域,尤其涉及一种在对话界面插入表情的方法及装置。The invention relates to the field of intelligent terminals, in particular to a method and device for inserting emoticons in a dialog interface.
背景技术Background technique
随着移动通信技术的发展,人们越来越多地利用终端设备通过SMS(ShortMessage Service,短消息服务),E-Mail(Electronic Mail,电子邮件)等方式进行文字交流,而在文字中插入一些表情符号,时常起到一个表情盛过千言万语的作用。在频繁的交流中,用户越来越喜欢用表情符号来传递心情和表达含义,而目前的终端设备在调用表情符号时不能判断用户想要插入的表情符号,用户需要通过选择菜单方式经过在多个表情库中进行寻找才能把自己想要的表情符号选择出来,将这种轻松的交流方式复杂化。Along with the development of mobile communication technology, people more and more utilize terminal equipment to carry out text communication through SMS (ShortMessage Service, short message service), E-Mail (Electronic Mail, electronic mail) etc., and insert some Emojis, often play the role of an expression that is worth a thousand words. In frequent communication, users are more and more fond of using emoticons to convey emotions and express meanings. However, current terminal devices cannot judge the emoticons that users want to insert when calling emoticons. Only by searching in an emoticon library can you choose the emoji you want, which complicates this easy way of communication.
现有技术中选择表情符号的方法对于喜欢使用表情符号来表达自己内心感受的用户来说过于复杂了,使用起来很不方便也不灵活,也体现不出拥有该项功能的终端设备的个性化。同时现有的表情符号,在内容上也不够丰富。表情符号本身是终端设备文字交流的一个亮点,但是使用上的不方便无疑会削弱该功能带给大众消费者的触动。The method of selecting emoticons in the prior art is too complicated for users who like to use emoticons to express their inner feelings. It is inconvenient and inflexible to use, and it does not reflect the personalization of terminal devices with this function. . At the same time, the existing emoticons are not rich enough in content. Emoji itself is a bright spot in text communication on terminal devices, but the inconvenience of using it will undoubtedly weaken the touch that this function brings to mass consumers.
发明内容Contents of the invention
本发明提供一种在对话界面插入表情的方法及装置,实现自动识别当前用户的表情并优先显示当前表情对应的预设表情符号,缩小表情符号的选择范围,简化在信息对话过程中插入表情符号的选择流程。The present invention provides a method and device for inserting emoticons in a dialogue interface, which realizes automatic identification of the current user's expression and preferentially displays the preset emoticons corresponding to the current emoticons, narrows the selection range of emoticons, and simplifies the insertion of emoticons in the process of information dialogue selection process.
第一方面,本发明提供一种在对话界面插入表情的方法,包括:In the first aspect, the present invention provides a method for inserting emoticons in a dialogue interface, including:
在获取表情输入请求时,启动摄像头捕捉当前的用户表情图像;When obtaining the expression input request, start the camera to capture the current user expression image;
识别所述用户表情图像所属的当前表情类别;Identify the current expression category to which the user expression image belongs;
确定并优先显示所述当前表情类别对应的预设表情符号。Determine and preferentially display the preset emoticons corresponding to the current emoticon category.
第二方面,本发明提供一种在对话界面插入表情的装置,包括:In a second aspect, the present invention provides a device for inserting emoticons in a dialogue interface, including:
捕捉单元,用于在获取表情输入请求时,启动摄像头捕捉当前的用户表情图像;The capture unit is used to start the camera to capture the current user expression image when obtaining the expression input request;
识别单元,用于识别所述用户表情图像所属的当前表情类别;An identification unit, configured to identify the current expression category to which the user expression image belongs;
确定单元,用于确定并优先显示所述当前表情类别对应的预设表情符号。The determining unit is configured to determine and preferentially display the preset emoticons corresponding to the current emoticon category.
本发明提供一种在对话界面插入表情的方法及装置,通过在获取表情输入请求时,启动摄像头捕捉当前的用户表情图像;并识别所述用户表情图像所属的当前表情类别;确定并优先显示所述当前表情类别对应的预设表情符号。本发明实现自动识别当前用户的表情并优先显示当前表情对应的预设表情符号,缩小表情符号的选择范围,方便用户选择自己要输入的表情符号,简化在信息对话过程中插入表情符号的选择流程,给用户带来更好的应用体验,使得智能终端更具时尚性和个性化。The present invention provides a method and device for inserting emoticons in a dialogue interface. When obtaining an emoticon input request, the camera is started to capture the current user's expression image; and the current expression category to which the user's expression image belongs is identified; Describe the preset emoticons corresponding to the current emoticon category. The present invention automatically recognizes the current user's expression and preferentially displays the preset emoticon corresponding to the current expression, narrows the selection range of the emoticon, facilitates the user to select the emoticon to be input by himself, and simplifies the selection process of inserting the emoticon in the process of information dialogue , to bring users a better application experience, making smart terminals more fashionable and personalized.
附图说明Description of drawings
图1是本发明第一实施例提供的在对话界面插入表情的方法的流程图;FIG. 1 is a flowchart of a method for inserting emoticons in a dialogue interface provided by the first embodiment of the present invention;
图2是本发明第二实施例提供的在对话界面插入表情的方法的流程图;Fig. 2 is a flowchart of a method for inserting emoticons in a dialogue interface provided by the second embodiment of the present invention;
图3是本发明第三实施例提供的在对话界面插入表情的方法的流程图;Fig. 3 is a flowchart of a method for inserting emoticons in a dialogue interface provided by the third embodiment of the present invention;
图4是本发明第四实施例提供的在对话界面插入表情的方法的流程图;Fig. 4 is a flowchart of a method for inserting emoticons in a dialogue interface provided by the fourth embodiment of the present invention;
图5是本发明第五实施例提供的在对话界面插入表情的装置的结构示意图。Fig. 5 is a schematic structural diagram of an apparatus for inserting emoticons in a dialog interface according to a fifth embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部内容。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, only parts related to the present invention are shown in the drawings but not all content.
第一实施例first embodiment
图1是本发明第一实施例提供的在对话界面插入表情的方法的流程图。参照图1所示,所述在对话界面插入表情的方法,包括如下步骤:Fig. 1 is a flowchart of a method for inserting emoticons in a dialogue interface provided by the first embodiment of the present invention. With reference to shown in Figure 1, described method for inserting emoticon in dialogue interface, comprises the steps:
步骤S110:在获取表情输入请求时,启动摄像头捕捉当前用户表情图像。Step S110: when acquiring the expression input request, start the camera to capture the image of the current user's expression.
在利用智能终端进行信息会话过程中,如果用户想要输入表情符号,只需点击表情库按钮即可。当智能终端检测到表情库按钮被选中时,即检测到表情输入请求,触发摄像头(特别是前置摄像头)启动,捕捉当前用户面部反射的光线,再通过感光元件(CCD或CMOS)将收集的光信号转换成电信号。所述电信号经放大处理后,由A/D转换模块转换为包含有用户面部特征以及用户面部表情信息的数字图像信号。智能终端的A/D转换模块将所述数字图像信号发送给智能终端的CPU供后续步骤使用。During the information conversation using the smart terminal, if the user wants to input emoticons, he only needs to click the emoticon library button. When the smart terminal detects that the expression library button is selected, it detects the expression input request, triggers the camera (especially the front camera) to start, captures the light reflected by the current user's face, and then passes the collected light through the photosensitive element (CCD or CMOS) Optical signals are converted into electrical signals. After the electrical signal is amplified and processed, it is converted by the A/D conversion module into a digital image signal including user's facial features and user's facial expression information. The A/D conversion module of the smart terminal sends the digital image signal to the CPU of the smart terminal for use in subsequent steps.
步骤S120:识别所述用户表情图像所属的当前表情类别。Step S120: Identify the current expression category to which the user expression image belongs.
获取所述当前用户表情图像对应的数字图像信号,经过信号处理,对所述数字图像信号中表征用户面部特征的信号进行几何归一化以及灰度归一化处理,再经过面部特征提取及特征判断,确定所述用户表情图像对应的当前表情类型。Acquiring the digital image signal corresponding to the current user expression image, after signal processing, performing geometric normalization and grayscale normalization processing on the signal representing the facial features of the user in the digital image signal, and then extracting facial features and Judging, determining the current expression type corresponding to the user expression image.
步骤S130:确定并优先显示所述当前表情类别对应的预设表情符号。Step S130: Determine and preferentially display the preset emoticons corresponding to the current emoticon category.
所述预设表情符号是预设于表情库中,用文字和符号组成表情或图案来表达撰写者的心情的一系列标识符号。对预设的表情符号分类使所述预设表情符号与其所表示的表情类别相对应,如果确定了表情类别,就可以确定并优先显示与所述表情类别对应的预设表情符号。The preset emoticons are a series of identification symbols preset in the emoticon library, which use words and symbols to form emoticons or patterns to express the author's mood. The preset emoticons are categorized so that the preset emoticons correspond to the expression categories they represent, and if the emoticon category is determined, the preset emoticons corresponding to the expression categories can be determined and preferentially displayed.
本发明实施例提供的在对话界面插入表情的方法,通过在获取表情输入请求时,启动摄像头捕捉当前用户表情图像;并识别所述用户表情图像所属的当前表情类别;根据当前表情类别确定与其对应的预设表情符号并优先显示所述预设表情符号。通过上述方法实现自动识别当前用户的表情并优先显示当前表情对应的预设表情符号,缩小表情符号的选择范围,方便用户选择自己要输入的表情符号,简化在信息对话过程中插入表情符号的选择流程,给用户带来更好的应用体验。The method for inserting emoticons in the dialog interface provided by the embodiments of the present invention is to start the camera to capture the current user expression image when obtaining the expression input request; and identify the current expression category to which the user expression image belongs; determine the corresponding one according to the current expression category The preset emoticons of the , and display the preset emoticons preferentially. Through the above method, the current user's expression can be automatically recognized and the preset emoticons corresponding to the current expression can be preferentially displayed, the selection range of emoticons can be narrowed, the user can easily select the emoticons to be input, and the choice of inserting emoticons in the process of message dialogue can be simplified. process to bring users a better application experience.
第二实施例second embodiment
图2是本发明第二实施例提供的在对话界面插入表情的方法的流程图。所述在对话界面插入表情的方法以本发明第一实施例为基础,进一步的,将识别所述用户表情图像所属的当前表情类别具体优化为:提取所述摄像头捕捉的当前用户表情图像的面部特征,通过所述面部特征确定用户表情图像所属的当前表情类别。Fig. 2 is a flowchart of a method for inserting emoticons in a dialog interface provided by the second embodiment of the present invention. The method for inserting emoticons in the dialog interface is based on the first embodiment of the present invention. Further, the identification of the current expression category to which the user's expression image belongs is specifically optimized as: extracting the face of the current user's expression image captured by the camera feature, and determine the current expression category to which the user's expression image belongs through the facial features.
参照图2所示,所述在对话界面插入表情的方法,包括如下步骤:Shown in Fig. 2 with reference to, described method for emoticon insertion in dialog interface, comprises the steps:
步骤S210:获取当前用户表情图像对应的数字图像信号,并对所述数字图像信号中表征用户面部特征的信号进行处理。Step S210: Obtain a digital image signal corresponding to the current user's facial expression image, and process the signal representing the facial features of the user in the digital image signal.
获取当前用户表情图像对应的数字图像信号,并对所述数字图像信号中表征用户面部特征的信号进行几何归一化处理和灰度归一化处理。所述几何归一化处理是根据人脸特征点和几何模型确定矩形特征区域,然后通过剪裁得到大小为150×100的图像,使图像中人脸变换到同一位置和同样大小。所述灰度归一化处理是指对图像进行光照补偿等处理,在一定程度上减少光照变化的影响,有助于提高识别率。A digital image signal corresponding to the current user expression image is obtained, and geometric normalization processing and gray scale normalization processing are performed on the signal representing the facial features of the user in the digital image signal. The geometric normalization process is to determine the rectangular feature area according to the feature points of the face and the geometric model, and then obtain an image with a size of 150×100 by clipping, so that the faces in the image are transformed to the same position and size. The grayscale normalization process refers to performing illumination compensation and other processing on the image, which reduces the impact of illumination changes to a certain extent and helps to improve the recognition rate.
步骤S220:提取所述面部特征生成人脸图像,将所述人脸图像分成对称的两半,选择熵值较大的半边脸图像。Step S220: extracting the facial features to generate a face image, dividing the face image into two symmetrical halves, and selecting the half face image with a larger entropy value.
提取经过归一化处理的表征用户面部特征的信号生成人脸图像,将所述人脸图像裁剪成左右对称的两个半边脸图像。由于光线的方向及亮度变化,会使得人脸许多部分的信息丢失,有的地方出现阴影,这时光照的变化对识别结果影响较大。但是总有一半人脸明显比另一半亮度要高,这半边脸阴影较少,保留的信息也较多。由于人脸具有相对的对称性,有一半人脸图像的信息是冗余的,因此,如果只利用亮度较高、保存信息较多的半边脸进行识别,就可以消除阴影干扰和信息丢失较多的另一半人脸图像的负面影响,从而提高识别率。此外,只用半边人脸图像进行特征提取,可以大大减小运算量。The normalized signal representing the facial features of the user is extracted to generate a human face image, and the human face image is cut into two left-right symmetrical half-face images. Due to changes in the direction and brightness of the light, information on many parts of the face will be lost, and shadows will appear in some places. At this time, changes in light have a greater impact on the recognition results. But there is always half of the face that is obviously brighter than the other half. This half of the face has fewer shadows and retains more information. Due to the relative symmetry of the face, half of the face image information is redundant. Therefore, if only the half face with higher brightness and more information is used for recognition, shadow interference and more information loss can be eliminated. negative impact on the other half of the face image, thereby improving the recognition rate. In addition, only half of the face image is used for feature extraction, which can greatly reduce the amount of computation.
人脸图像的熵值计算公式如下:The formula for calculating the entropy value of a face image is as follows:
其中,H(u)为人脸图像的熵值,i为像素值,p(i)为像素值i在图片中的出现概率。Among them, H(u) is the entropy value of the face image, i is the pixel value, and p(i) is the occurrence probability of the pixel value i in the picture.
比较分别经上述公式计算得到的左右半边人脸图像的熵值,选择熵值较大的半边人脸图像作为特征提取的对象。Compare the entropy values of the left and right half face images calculated by the above formula, and select the half face image with a larger entropy value as the object of feature extraction.
步骤S230:对熵值较大的半边人脸图像进行特征提取以获得Gabor特征。Step S230: Perform feature extraction on the half face image with a larger entropy value to obtain Gabor features.
所述Gabor特征是利用Gabor函数对目标图像(熵值较大的半边人脸图像)处理获得的具有良好的时域局部化特征和多分辨率特征及变焦能力的面部特征值。熵值较大的半边人脸图像经过Gabor变换获得Gabor特征。The Gabor feature is a facial feature value with good time-domain localization features, multi-resolution features and zooming capabilities obtained by processing the target image (half face image with a large entropy value) using the Gabor function. The half face image with larger entropy value is obtained Gabor feature through Gabor transformation.
步骤S240:对所述Gabor特征进行分类,调用人脸数据库进行特征比对,确定所述用户表情图像对应的当前表情类型。Step S240: Classify the Gabor features, call the face database for feature comparison, and determine the current expression type corresponding to the user expression image.
设计基于Adaboost算法的级联分类器,对输入的人脸数据库中的图像进行分类投票,以判断表情类别,得到所述用户表情图像对应的当前表情类型。A cascade classifier based on the Adaboost algorithm is designed to classify and vote the images in the input face database to judge the expression category and obtain the current expression type corresponding to the user's expression image.
通过本实施例提供的在对话界面插入表情的方法,通过获取当前用户表情图像对应的数字图像信号,并对所述数字图像信号中表征用户面部特征的信号进行处理;提取所述面部特征生成人脸图像,将所述人脸图像分成对称的两半,选择熵值较大的半边脸图像;并对熵值较大的半边人脸图像进行特征提取以获得Gabor特征;对所述Gabor特征进行分类,调用人脸数据库进行特征比对,确定所述用户表情图像对应的当前表情类型。通过上述方法实现快速识别用户表情图像所属的表情类别。Through the method for inserting emoticons in the dialogue interface provided by this embodiment, by obtaining the digital image signal corresponding to the current user's expression image, and processing the signal representing the user's facial features in the digital image signal; extracting the facial features to generate a human Face image, described people's face image is divided into two symmetrical halves, selects the bigger half side face image of entropy value; And carry out feature extraction to obtain Gabor feature to the bigger half side people's face image of entropy value; Described Gabor feature is carried out Classify, call the face database for feature comparison, and determine the current expression type corresponding to the user expression image. Through the above method, the expression category to which the user's expression image belongs can be quickly identified.
第三实施例third embodiment
图3是本发明第三实施例提供的在对话界面插入表情的方法的流程图。所述在对话界面插入表情的方法以本发明第一实施例为基础,进一步的,将所述确定并优先显示所述当前表情类别对应的预设表情符号具体优化为:获得所述当前表情类别对应的表情符号;在所述表情符号未位于表情选择页的顶端时,调整所述表情符号的位置使其优先显示。Fig. 3 is a flowchart of a method for inserting emoticons in a dialog interface provided by the third embodiment of the present invention. The method for inserting emoticons in the dialogue interface is based on the first embodiment of the present invention. Further, the specific optimization of determining and preferentially displaying the preset emoticons corresponding to the current emoticon category is as follows: obtaining the current emoticon category The corresponding emoticon; when the emoticon is not at the top of the emoticon selection page, adjust the position of the emoticon so that it is displayed first.
进一步的,在确定并优先显示所述当前表情类别对应的预设表情符号之前,增加如下步骤:依据表情符号表达的表情,对所述预设表情符号分类。Further, before determining and preferentially displaying the preset emoticons corresponding to the current emoticon category, the following step is added: classify the preset emoticons according to the expressions expressed by the emoticons.
参照图3所示,所述在对话界面插入表情的方法,包括如下步骤:Referring to Fig. 3, the method for inserting emoticons in the dialog interface includes the following steps:
步骤S310:依据表情符号表达的表情,对所述预设表情符号分类。Step S310: Classify the preset emoticons according to the expressions expressed by the emoticons.
将表情库中的预设表情符号按照其表达的表情不同分为激动、高兴、平静、悲伤、哭泣、愤怒和惊讶等多个表情类。The preset emoticons in the emoticon library are divided into multiple emoticon categories such as excited, happy, calm, sad, crying, angry and surprised according to the different expressions they express.
步骤S320:获得所述当前表情类别对应的表情符号。Step S320: Obtain the emoticon corresponding to the current emoticon category.
在确定用户表情图像所属的当前表情类别后,查询表情库,查找与当前表情类别对应的表情类,获取所述表情类中的表情符号。After determining the current emoticon category to which the user's emoticon image belongs, the emoticon database is queried to find the emoticon class corresponding to the current emoticon class, and the emoticons in the emoticon class are obtained.
步骤S330:判断所述表情符号是否是表情选择页优先显示的表情符号;若否,则执行步骤S340;若是,执行步骤S350。Step S330: Determine whether the emoticon is the emoticon preferentially displayed on the emoticon selection page; if not, execute step S340; if yes, execute step S350.
所述表情选择页是在信息对话界面中显示表情库中表情符号的页面,可以根据设置显示条件预设每页显示的表情符号的数目。一般情况下,默认的显示条件规定使用频率高的表情符号显示在表情选择页的首页。The emoticon selection page is a page displaying emoticons in the emoticon library in the information dialogue interface, and the number of emoticons displayed on each page can be preset according to the setting display conditions. Generally, the default display condition stipulates that emoticons that are frequently used are displayed on the first page of the emoticon selection page.
在获得所述当前表情类别对应的表情符号后,查询当前表情类别对应的表情符号在表情选择页中的位置,根据查询结果判断是否需要更新表情选择页。After obtaining the emoticons corresponding to the current emoticon category, query the position of the emoticons corresponding to the current emoticon category in the emoticon selection page, and judge whether the emoticon selection page needs to be updated according to the query result.
步骤S340:调整所述表情符号的位置使其优先显示,并继续执行步骤S350。Step S340: Adjust the position of the emoticon to be displayed in priority, and proceed to step S350.
在当前表情类别对应的表情符号不是表情选择页优先显示的表情符号时,判断当前表情类别对应的表情符号的前一个表情符号是否是当前表情类别对应的表情符号,若否,交换位置,使得当前表情类别对应的表情符号的排序向前调整一个位置,继续比较直至当前表情类别对应的表情符号是表情选择页的优先显示的表情符号为止。若当前表情类别对应的表情符号有多个,则重复执行本步骤将所有当前表情类别对应的表情符号调整为表情选择页的优先显示的表情符号。When the emoticon corresponding to the current emoticon category is not the emoticon that is preferentially displayed on the emoticon selection page, it is judged whether the previous emoticon of the emoticon corresponding to the current emoticon category is the emoticon corresponding to the current emoticon category, if not, the position is exchanged so that the current The sorting of the emoticons corresponding to the emoticon category is adjusted one position forward, and the comparison is continued until the emoticon corresponding to the current emoticon category is the emoticon preferentially displayed on the emoticon selection page. If there are multiple emoticons corresponding to the current emoticon category, repeat this step to adjust all the emoticons corresponding to the current emoticon category to be the emoticons displayed preferentially on the emoticon selection page.
步骤S350:在对话界面显示表情选择页。Step S350: Display an emoticon selection page on the dialogue interface.
在当前表情类别对应的表情符号是表情选择页优先显示的表情符号时,在对话界面显示表情选择页;否则,按照步骤S340所述调整当前表情类别对应的表情符号的位置并更新表情选择页后,在对话界面显示表情选择页。When the emoticon corresponding to the current emoticon category is the emoticon preferentially displayed on the emoticon selection page, the emoticon selection page is displayed on the dialog interface; otherwise, after adjusting the position of the emoticon corresponding to the current emoticon category and updating the emoticon selection page as described in step S340 , to display the emoticon selection page in the dialogue interface.
本实施例提供的在对话界面插入表情的方法,通过对所述预设表情符号分类,在获取并确定用户表情图像所属的当前表情类别后,获得所述当前表情类别对应的表情符号;判断所述表情符号是否是表情选择页优先显示的表情符号,根据判断结果执行更新表情选择页的操作;并在对话界面显示表情选择页。通过本方法实现将用户表情图像所属的当前表情类别对应的表情符号优先显示在表情选择页中,方便用户选择与当前用户真实表情对应的表情符号。The method for inserting emoticons in the dialogue interface provided by this embodiment is to obtain and determine the current emoticon category to which the user’s emoticon image belongs by classifying the preset emoticons, and obtain the emoticon corresponding to the current emoticon category; Whether the above-mentioned emoticon is the emoticon displayed preferentially on the emoticon selection page, perform an operation of updating the emoticon selection page according to the judgment result; and display the emoticon selection page on the dialogue interface. Through this method, the emoticons corresponding to the current emoticon category to which the user's emoticon image belongs are preferentially displayed on the emoticon selection page, which is convenient for the user to select the emoticon corresponding to the real emoticon of the current user.
第四实施例Fourth embodiment
图4是本发明第四实施例提供的在对话界面插入表情的方法的流程图。所述在对话界面插入表情的方法以本发明第一实施例为基础,进一步的,增加如下步骤:将所述用户表情图像存入预设表情符号所属的表情库中,并优先显示所述用户表情图像。Fig. 4 is a flowchart of a method for inserting emoticons in a dialog interface provided by the fourth embodiment of the present invention. The method for inserting emoticons in the dialog interface is based on the first embodiment of the present invention, and further, the following steps are added: storing the user emoticon images in the emoticon library to which the preset emoticons belong, and displaying the user emoticons preferentially. emoticon image.
参照图4所示,所述在对话界面插入表情的方法,包括如下步骤:Referring to Figure 4, the method for inserting emoticons in the dialogue interface includes the following steps:
步骤S410:在获取表情输入请求时,启动摄像头捕捉当前的用户表情图像。Step S410: When acquiring the expression input request, start the camera to capture the current user's expression image.
当智能终端检测到表情输入请求,触发摄像头(特别是前置摄像头)启动,通过感光元件(CCD或CMOS)将收集的光信号转换成电信号。所述电信号经放大处理后,由A/D转换模块转换为包含有用户面部特征以及用户面部表情信息的数字图像信号。When the smart terminal detects the expression input request, it triggers the camera (especially the front camera) to start, and converts the collected optical signal into an electrical signal through a photosensitive element (CCD or CMOS). After the electrical signal is amplified and processed, it is converted by the A/D conversion module into a digital image signal including user's facial features and user's facial expression information.
步骤S420:将所述用户表情图像存入预设表情符号所属的表情库中。Step S420: Store the user's emoticon image into the emoticon library to which the preset emoticons belong.
获取所述包含有用户面部特征以及用户面部表情信息的数字图像信号存储于预设表情符号所属的表情库中。The obtained digital image signal including the user's facial features and user's facial expression information is stored in the expression library to which the preset emoticons belong.
步骤S430:判断所述用户表情图像是否是表情选择页优先显示的表情符号;若否,则执行步骤S440;若是,执行步骤S450。Step S430: Determine whether the user's emoticon image is an emoticon preferentially displayed on the emoticon selection page; if not, execute step S440; if yes, execute step S450.
判断所述用户表情图像是否是表情选择页中排序第一的表情符号,根据判断结果决定是否更新表情选择页。Judging whether the user's facial expression image is the first emoticon in the facial expression selection page, and deciding whether to update the facial expression selection page according to the judgment result.
步骤S440:调整所述用户表情图像的位置使其位于表情选择页的首位。Step S440: Adjust the position of the user's facial expression image so that it is at the top of the facial expression selection page.
与表情选择页中排序第一的表情符号交换位置,使得所述用户表情图像的位置使其位于表情选择页的首位。Exchanging positions with the first-ranked emoticon on the emoticon selection page, so that the position of the user's emoticon image is placed at the top of the emoticon selection page.
步骤S450:识别所述用户表情图像所属的当前表情类别。Step S450: Identify the current expression category to which the user expression image belongs.
在所述用户表情图像是表情选择页中排序第一的表情符号时,继续执行识别所述用户表情图像所属的当前表情类别操作,即获取当前用户表情图像对应的数字图像信号,并对所述数字图像信号中表征用户面部特征的信号进行处理;提取所述面部特征生成人脸图像,并对熵值较大的半边人脸图像进行特征提取以获得Gabor特征;对所述Gabor特征进行分类,调用人脸数据库进行特征比对,确定所述用户表情图像对应的当前表情类型。When the user's expression image is the emoticon ranked first in the expression selection page, continue to perform the operation of identifying the current expression category to which the user's expression image belongs, that is, obtain the digital image signal corresponding to the current user's expression image, and Process the signal representing the user's facial features in the digital image signal; extract the facial features to generate a face image, and perform feature extraction on the half-side face image with a larger entropy value to obtain Gabor features; classify the Gabor features, The face database is called to perform feature comparison, and the current expression type corresponding to the user expression image is determined.
步骤S460:获得所述当前表情类别对应的表情符号。Step S460: Obtain the emoticon corresponding to the current emoticon category.
在确定用户表情图像所属的当前表情类别后,查询表情库,确定与当前表情类别对应的预设表情符号所属的表情类,获取所述表情类中的表情符号。After determining the current expression category to which the user's expression image belongs, query the expression library, determine the expression category to which the preset emoticons corresponding to the current expression category belong, and obtain the emoticons in the expression category.
步骤S470:判断所述表情符号是否是表情选择页优先显示的表情符号;若否,则执行步骤S480;否则,执行步骤S490。Step S470: Determine whether the emoticon is the emoticon preferentially displayed on the emoticon selection page; if not, execute step S480; otherwise, execute step S490.
在获得所述当前表情类别对应的表情符号后,查询当前表情类别对应的表情符号在表情选择页中的位置,根据查询结果判断是否需要更新表情选择页。After obtaining the emoticons corresponding to the current emoticon category, query the position of the emoticons corresponding to the current emoticon category in the emoticon selection page, and judge whether the emoticon selection page needs to be updated according to the query result.
步骤S480:调整所述表情符号的位置使其优先显示于表情选择页中,且优先级低于用户表情图像。Step S480: Adjust the position of the emoticon so that it is preferentially displayed on the emoticon selection page, and the priority is lower than that of the user's emoticon image.
所述表情符号的优先级低于所述用户表情图像。在所述表情符号不是表情选择页的优先显示的表情符号时,首先判断当前表情类别对应的表情符号的前一个表情符号是否是用户表情图像,若否,再判断所述当前表情类别对应的表情符号的前一个表情符号是否是当前表情类别对应的表情符号,若否,交换位置,使得当前表情类别对应的表情符号的排序向前调整一个位置。继续判断当前表情类别对应的表情符号的前一个表情符号是否是当前表情类别对应的表情符号,若否,交换位置,按照上述方法继续比较,直至当前表情类别对应的表情符号的前一个表情符号是用户表情图像为止。The emoticon has a lower priority than the user emoticon. When the emoticon is not the emoticon displayed preferentially on the emoticon selection page, first judge whether the previous emoticon of the emoticon corresponding to the current emoticon category is a user emoticon image, if not, then judge the emoticon corresponding to the current emoticon category Whether the previous emoticon of the symbol is the emoticon corresponding to the current emoticon category, if not, the position is exchanged, so that the sorting of the emoticon corresponding to the current emoticon category is adjusted forward by one position. Continue to judge whether the previous emoticon of the emoticon corresponding to the current emoticon category is the emoticon corresponding to the current emoticon category, if not, exchange positions, and continue to compare according to the above method until the previous emoticon of the emoticon corresponding to the current emoticon category is user emoticon image.
若当前表情类别对应的表情符号有多个,在当前表情类别对应的表情符号的前一个表情符号是用户表情图像时,继续判断其他当前表情类别对应的表情符号是否是表情选择页优先显示的表情符号,即重复执行判断当前表情类别对应的表情符号的前一个表情符号是否是当前表情类别对应的表情符号,若否,交换位置步骤,将所有当前表情类别对应的表情符号调整为表情选择页的优先显示且优先级低于用户表情图像的表情符号。If there are multiple emoticons corresponding to the current emoticon category, when the emoji before the emoji corresponding to the current emoticon category is the user emoticon image, continue to judge whether the emoticons corresponding to the other current emoticon categories are the emoticons that are preferentially displayed on the emoticon selection page Symbol, that is, repeatedly execute to determine whether the previous emoticon of the emoticon corresponding to the current emoticon category is the emoticon corresponding to the current emoticon category, if not, exchange the position step, and adjust all the emoticons corresponding to the current emoticon category to the emoticon selection page Emoticons that are displayed first and have lower priority than user emoticon images.
步骤S490:在对话界面显示表情选择页。Step S490: Display an emoticon selection page on the dialogue interface.
在所述表情符号是表情选择页优先显示的表情符号时,在对话界面显示表情选择页;否则,按照步骤S480所述调整所述表情符号的位置使其优先显示于表情选择页中,且优先级低于用户表情图像后,在对话界面显示表情选择页。When the emoticon is the emoticon that is preferentially displayed on the emoticon selection page, the emoticon selection page is displayed on the dialogue interface; otherwise, the position of the emoticon is adjusted according to step S480 so that it is preferentially displayed on the emoticon selection page, and After the level is lower than the user's emoticon image, the emoticon selection page is displayed on the dialog interface.
本实施例提供的在对话界面插入表情的方法,通过在启动摄像头捕捉当前的用户表情图像之后增加将所述用户表情图像存入预设表情符号所属的表情库中,并优先显示所述用户表情图像的步骤,并确定所述用户表情图像的优先级高于用户表情图像所属的当前表情类别对应的表情符号。通过本方法实现快速拍摄用户的当前表情并存储于表情库的目的,丰富了表情库中存储的素材,便于用户选择当前真实表情或用户表情图像对应的表情符号插入对话界面。The method for inserting emoticons in the dialogue interface provided by this embodiment is to add and store the user emoticon images in the emoticon library to which the preset emoticons belong after starting the camera to capture the current user emoticon images, and to display the user emoticons preferentially image, and determine that the priority of the user emoticon image is higher than the emoticon corresponding to the current emoticon category to which the user emoticon image belongs. This method achieves the purpose of quickly capturing the user's current expression and storing it in the expression library, enriches the materials stored in the expression library, and facilitates the user to select the current real expression or the emoticon corresponding to the user's expression image and insert it into the dialogue interface.
作为本实施例的一种优选的在对话界面插入表情的方式是:As a preferred way of inserting emoticons in the dialog interface in this embodiment is:
当智能终端检测到表情输入请求,触发摄像头(特别是前置摄像头)启动,通过感光元件(CCD或CMOS)将收集的光信号转换成电信号。所述电信号经放大处理后,由A/D转换模块转换为包含有用户面部特征以及用户面部表情信息的数字图像信号。在所述获取包含有用户面部特征以及用户面部表情信息的数字图像信号后,直接在信息对话应用中插入该表征当前的用户表情的数字图像信号并发送给通话的其他参与方。When the smart terminal detects the expression input request, it triggers the camera (especially the front camera) to start, and converts the collected optical signal into an electrical signal through a photosensitive element (CCD or CMOS). After the electrical signal is amplified and processed, it is converted by the A/D conversion module into a digital image signal including user's facial features and user's facial expression information. After acquiring the digital image signal including the user's facial features and user's facial expression information, the digital image signal representing the current user's expression is directly inserted into the information dialogue application and sent to other participants in the call.
本方法通过在获取表情输入请求时,启动摄像头捕捉当前的用户表情并将表征当前的用户表情的数字信号发送给通话的其他参与方,实现快速获取并发送当前的用户真实表情的目的,增加了信息对话的趣味性。This method starts the camera to capture the current user's expression and sends the digital signal representing the current user's expression to other participants in the call when obtaining the expression input request, so as to achieve the purpose of quickly obtaining and sending the current user's real expression. The fun of informational conversations.
第五实施例fifth embodiment
图5是本发明第五实施例提供的在对话界面插入表情的装置的结构示意图。参照图5所示,所示在对话界面插入表情的装置,可以包括:Fig. 5 is a schematic structural diagram of an apparatus for inserting emoticons in a dialog interface according to a fifth embodiment of the present invention. Referring to Figure 5, the device for inserting emoticons in the dialogue interface may include:
捕捉单元510,用于在获取表情输入请求时,启动摄像头捕捉当前的用户表情图像;The capture unit 510 is used to start the camera to capture the current user expression image when obtaining the expression input request;
识别单元530,用于识别所述用户表情图像所属的当前表情类别;An identification unit 530, configured to identify the current expression category to which the user expression image belongs;
确定单元550,用于确定并优先显示所述当前表情类别对应的预设表情符号。The determining unit 550 is configured to determine and preferentially display the preset emoticons corresponding to the current emoticon category.
进一步的,所述识别单元530具体可以用于:提取所述摄像头捕捉的当前用户表情图像的面部特征,通过所述面部特征确定用户表情图像所属的当前表情类别。Further, the identification unit 530 may be specifically configured to: extract the facial features of the current user expression image captured by the camera, and determine the current expression category to which the user expression image belongs through the facial features.
进一步的,所述确定单元550具体可以用于:获得所述当前表情类别对应的表情符号;在所述表情符号未位于表情选择页的顶端时,调整所述表情符号的位置使其优先显示。Further, the determining unit 550 may be specifically configured to: obtain the emoticon corresponding to the current emoticon category; and adjust the position of the emoticon so that it is displayed preferentially when the emoticon is not located at the top of the emoticon selection page.
进一步的,所述装置还可以包括:分类单元540,用于在确定并优先显示所述当前表情类别对应的预设表情符号之前,依据表情符号表达的表情,对所述预设表情符号分类。Further, the device may further include: a classification unit 540, configured to classify the preset emoticons according to the expressions expressed by the emoticons before determining and preferentially displaying the preset emoticons corresponding to the current emoticon category.
进一步的,所述装置还可以包括:存入单元520,用于在获取表情输入请求时,启动摄像头捕捉当前的用户表情图像之后,将所述用户表情图像存入预设表情符号所属的表情库中,并优先显示所述用户表情图像。Further, the device may further include: a storage unit 520, configured to store the user's facial expression image into the preset facial expression library to which the preset facial expressions belong after starting the camera to capture the current user's facial expression image when obtaining the facial expression input request , and preferentially display the user expression image.
上述在对话界面插入表情的装置可以执行本发明实施例所提供的在对话界面插入表情的方法,具备执行方法相应的功能模块和有益效果。The above-mentioned device for inserting emoticons in the dialogue interface can execute the method for inserting emoticons in the dialogue interface provided by the embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.
本领域普通技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个计算装置上,或者分布在多个计算装置所组成的网络上,可选地,他们可以用计算机装置可执行的程序代码来实现,从而可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件的结合。Those of ordinary skill in the art should understand that each module or each step of the present invention described above can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed on a network formed by multiple computing devices. Optionally, they can be implemented with executable program codes of computer devices, so that they can be stored in storage devices and executed by computing devices, or they can be made into individual integrated circuit modules, or a plurality of modules in them Or the steps are fabricated into a single integrated circuit module to realize. As such, the present invention is not limited to any specific combination of hardware and software.
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间的相同或相似的部分互相参见即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same or similar parts between the various embodiments can be referred to each other.
以上所述仅为本发明的优选实施例,并不用于限制本发明,对于本领域技术人员而言,本发明可以有各种改动和变化。凡在本发明的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410857573.6ACN104598127B (en) | 2014-12-31 | 2014-12-31 | Method and device for inserting emoticons in dialogue interface |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410857573.6ACN104598127B (en) | 2014-12-31 | 2014-12-31 | Method and device for inserting emoticons in dialogue interface |
| Publication Number | Publication Date |
|---|---|
| CN104598127A CN104598127A (en) | 2015-05-06 |
| CN104598127Btrue CN104598127B (en) | 2018-01-26 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410857573.6AExpired - Fee RelatedCN104598127B (en) | 2014-12-31 | 2014-12-31 | Method and device for inserting emoticons in dialogue interface |
| Country | Link |
|---|---|
| CN (1) | CN104598127B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105447164A (en)* | 2015-12-02 | 2016-03-30 | 小天才科技有限公司 | Method and apparatus for automatically pushing chat expressions |
| CN106339103A (en)* | 2016-08-15 | 2017-01-18 | 珠海市魅族科技有限公司 | Image checking method and device |
| CN106503744A (en)* | 2016-10-26 | 2017-03-15 | 长沙军鸽软件有限公司 | Input expression in chat process carries out the method and device of automatic error-correcting |
| CN107451560B (en)* | 2017-07-31 | 2020-05-19 | Oppo广东移动通信有限公司 | User facial expression recognition method, device and terminal |
| CN107634901B (en)* | 2017-09-19 | 2020-07-07 | 广东小天才科技有限公司 | Conversational expression push method, push device and terminal device |
| CN107784114A (en)* | 2017-11-09 | 2018-03-09 | 广东欧珀移动通信有限公司 | Recommended method, device, terminal and storage medium for emoticon images |
| CN108038102B (en)* | 2017-12-08 | 2021-05-04 | 北京小米移动软件有限公司 | Recommended method, device, terminal and storage medium for facial expression images |
| CN109118163B (en)* | 2018-07-06 | 2024-06-28 | 平安科技(深圳)有限公司 | Method, device, computer equipment and storage medium for automatically inputting approval comments |
| CN111369645B (en)* | 2020-02-28 | 2023-12-05 | 北京百度网讯科技有限公司 | Methods, devices, equipment and media for displaying facial expression information |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103530313A (en)* | 2013-07-08 | 2014-01-22 | 北京百纳威尔科技有限公司 | Searching method and device of application information |
| CN104063683A (en)* | 2014-06-06 | 2014-09-24 | 北京搜狗科技发展有限公司 | Expression input method and device based on face identification |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8037424B2 (en)* | 2007-05-24 | 2011-10-11 | Yahoo! Inc. | Visual browsing system and method |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103530313A (en)* | 2013-07-08 | 2014-01-22 | 北京百纳威尔科技有限公司 | Searching method and device of application information |
| CN104063683A (en)* | 2014-06-06 | 2014-09-24 | 北京搜狗科技发展有限公司 | Expression input method and device based on face identification |
| Publication number | Publication date |
|---|---|
| CN104598127A (en) | 2015-05-06 |
| Publication | Publication Date | Title |
|---|---|---|
| CN104598127B (en) | Method and device for inserting emoticons in dialogue interface | |
| CN109213882B (en) | Image sorting method and terminal | |
| US9953216B2 (en) | Systems and methods for performing actions in response to user gestures in captured images | |
| CN104753766B (en) | Expression sending method and device | |
| US10984226B2 (en) | Method and apparatus for inputting emoticon | |
| RU2664003C2 (en) | Method and device for determining associate users | |
| JP6365024B2 (en) | Service providing apparatus, method, and program | |
| CN105654039B (en) | The method and apparatus of image procossing | |
| CN108280166B (en) | Method and device for making expression, terminal and computer readable storage medium | |
| CN105630915A (en) | Method and device for classifying and storing pictures in mobile terminals | |
| CN111506758B (en) | Method, device, computer equipment and storage medium for determining article name | |
| CN104021398A (en) | Wearable intelligent device and method for assisting identity recognition | |
| CN105204886B (en) | A method for activating an application, a user terminal and a server | |
| CN104077597B (en) | Image classification method and device | |
| CN111339420A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
| CN106648386A (en) | Operation method and device of intelligent terminal | |
| CN114429647A (en) | Progressive character interaction identification method and system | |
| CN106791091B (en) | Image generation method and device and mobile terminal | |
| CN106446969B (en) | User identification method and device | |
| CN105022480A (en) | Input method and terminal | |
| CN105956998A (en) | Method for adding watermark to photograph based on character feature recognition | |
| CN114154467B (en) | Structure picture restoration method, device, electronic equipment, medium and program product | |
| JP2016015019A (en) | Service providing device, method, and program | |
| CN113032605B (en) | Information display method, device, equipment and computer storage medium | |
| CN114756590A (en) | Goods screening method and device, electronic equipment and storage medium |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP01 | Change in the name or title of a patent holder | ||
| CP01 | Change in the name or title of a patent holder | Address after:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. | |
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20180126 |