技术领域technical field
本发明属于照相领域,尤其涉及一种拍照模式显示方法和装置。The invention belongs to the field of photography, and in particular relates to a method and device for displaying a photography mode.
背景技术Background technique
随着手机的普及,在手机也集成了越来越多的功能,比如照相功能、定位功能、录音功能、收音机功能、蓝牙功能、WiFi功能等,极大的提高了手机使用的便利性。With the popularization of mobile phones, more and more functions are integrated in mobile phones, such as camera function, positioning function, recording function, radio function, Bluetooth function, WiFi function, etc., which greatly improve the convenience of mobile phone use.
其中,所述的照相功能,可以为用户提供多种多样的拍照模式,方便用户可以得到不同的拍摄效果。比如在夜间模式下,可以去除更多的噪声图像,得到更为清晰的照片,在连拍模式下,可以连续拍摄多张照片,可用于满足对运动对象的抓拍需要。Wherein, the camera function can provide a variety of camera modes for the user, so that the user can obtain different shooting effects. For example, in night mode, more noise images can be removed to get clearer photos. In continuous shooting mode, multiple photos can be taken continuously, which can be used to meet the needs of capturing moving objects.
现有的手机照相功能中,在不同的拍照模式下进行拍摄时,用户不便于直观的了解当前的拍照模式。In the existing camera functions of mobile phones, when shooting in different camera modes, it is inconvenient for the user to intuitively understand the current camera mode.
发明内容Contents of the invention
本发明的目的在于提供一种拍照模式显示方法,以解决现有技术手机照相功能中,在不同的拍照模式下进行拍摄时,用户不便于直观的了解当前的拍照模式的问题。The purpose of the present invention is to provide a display method for photographing modes to solve the problem that the user is inconvenient to intuitively understand the current photographing mode when photographing in different photographing modes in the photographing function of the mobile phone in the prior art.
一方面,提供了一种拍照模式显示方法,所述方法包括:In one aspect, a method for displaying a photographing mode is provided, the method comprising:
选择相机的拍照模式,查找所选择的拍照模式对应的拍摄键的图标;Select the shooting mode of the camera, and find the icon of the shooting button corresponding to the selected shooting mode;
在所选择的拍照模式的拍摄键位置显示所查找的图标。The searched icon is displayed at the shooting key position of the selected shooting mode.
结合第一方面,在第一方面的第一种可能实现方式中,在所述选择相机的拍照模式,查找所选择的拍照模式对应的拍摄键的图标步骤之前,所述方法还包括:With reference to the first aspect, in the first possible implementation manner of the first aspect, before the step of selecting the camera mode of the camera and searching for the icon of the camera key corresponding to the selected camera mode, the method further includes:
加载运行不同拍照模式的资源安装包,获取每个资源安装包中包括的拍摄键的图标;Load resource installation packages that run different camera modes, and obtain the icon of the camera key included in each resource installation package;
根据所述资源安装包的ID,将每个拍照模式的拍摄键图标解码成位图BITMAP列表;According to the ID of the resource installation package, the shooting key icon of each camera mode is decoded into a bitmap BITMAP list;
所述选择相机的拍照模式,查找所选择的拍照模式对应的拍摄键的图标步骤具体为:The steps of selecting the camera mode of the camera and searching for the icon of the shooting key corresponding to the selected camera mode are as follows:
根据所述位图BITMAP列表中图标在所述屏幕中的位置,查找选择指令的位置所对应的位图BITMAP列表中的图标。According to the position of the icon in the bitmap BITMAP list on the screen, search for the icon in the bitmap BITMAP list corresponding to the position of the selection instruction.
结合第一方面的第一种可能实现方式,在第一方面的第二种可能实现方式中,所述加载运行不同拍照模式的资源安装包,获取每个资源安装包中包括的拍摄键的图标步骤具体为:With reference to the first possible implementation of the first aspect, in the second possible implementation of the first aspect, the loading and running resource installation packages of different camera modes obtains the icon of the shooting key included in each resource installation package The specific steps are:
不同拍照模式的资源安装包与主相机资源安装包共享同一进程号;Resource installation packages of different camera modes share the same process ID with the main camera resource installation package;
通过反射机制获取每个拍照模式所对应的拍摄键的图标。Obtain the icon of the shooting key corresponding to each camera mode through the reflection mechanism.
结合第一方面的第一种可能实现方式,在第一方面的第三种可能实现方式中,所述根据所述位图BITMAP列表中图标在所述屏幕中的位置,查找选择指令的位置所对应的位图BITMAP列表中的图标步骤具体为:With reference to the first possible implementation of the first aspect, in a third possible implementation of the first aspect, the search for the position of the selection instruction according to the position of the icon in the bitmap BITMAP list on the screen The steps for the icons in the corresponding bitmap BITMAP list are as follows:
获取选择指令的位置对应的屏幕坐标(x,y),其中x为横坐标值,y为纵坐标值;Obtain the screen coordinates (x, y) corresponding to the position of the selection command, where x is the abscissa value and y is the ordinate value;
判断(x,y)是否属于位图BITMAP列表中的图标的位置;Determine whether (x, y) belongs to the position of the icon in the bitmap BITMAP list;
如果(x,y)属于位图BITMAP列表中的图标的位置,则根据公式:id=x/a+y/b*N获取指令所对应的拍摄键图标;If (x, y) belongs to the position of the icon in the bitmap BITMAP list, then according to the formula: id=x/a+y/b*N to obtain the corresponding shooting key icon of the instruction;
其中,id表示在位图BITMAP中的资源安装包的ID,所述a为位图BITMAP中每个图标的宽度l1与两个图标的横向间隔P1之和,所述b为位图BITMAP中每个图标的高度h1与两个图标的纵向间隔Q1之和,所述N为位图BITMAP列表每行图标的个数,x/a表示x对a取整,y/b表示y对b取整。Wherein, id represents the ID of the resource installation package in the bitmap BITMAP, said a is the sum of the widthl1 of each icon in the bitmap BITMAP and the horizontal interval P1of two icons, and said b is the bitmap BITMAP The sum of the height h1 of each icon and the vertical interval Q1 of the two icons, the N is the number of icons in each line of the bitmap BITMAP list, x/a means that x is rounded to a, and y/b means y round b.
结合第一方面的第一种可能实现方式,在第一方面的第四种可能实现方式中,所述判断(x,y)是否属于位图BITMAP列表中的图标的位置具体为:In combination with the first possible implementation of the first aspect, in the fourth possible implementation of the first aspect, the position of determining whether (x, y) belongs to an icon in the bitmap BITMAP list is specifically:
令xx=x%a1,yy=y%b1,判断P1/2<xx<P1/2+l1且Q1/2<yy<Q1/2+h1是否成立,如果成立,则(x,y)属于位图BITMAP列表中的图标的位置,其中x%a1表示x对a1求余,y%b1表示y对b1求余,P1/2表示两个图标的横向间隔的一半,Q1/2表示两个图标的纵向间隔的一半。Make xx=x%a1 , yy=y%b1 , judge whether P1 /2<xx<P1 /2+l1 and Q1 /2<yy<Q1 /2+h1 are true, if true , then (x, y) belongs to the position of the icon in the bitmap BITMAP list, where x% a1 means x is the remainder of a1 , y% b1 means y is the remainder of b1 , and P1 /2 means two Half of the horizontal interval of icons, Q1 /2 means half of the vertical interval of two icons.
第二方面,本发明提供了一种拍照模式显示装置,其特征在于,所述装置包括:In a second aspect, the present invention provides a camera mode display device, characterized in that the device includes:
选择查找单元,用于选择相机的拍照模式,查找所选择的拍照模式对应的拍摄键的图标;Select a search unit, which is used to select the camera mode of the camera, and search for the icon of the shooting key corresponding to the selected camera mode;
显示单元,用于在所选择的拍照模式的拍摄键位置显示所查找的图标。The display unit is used for displaying the searched icon at the shooting key position of the selected shooting mode.
结合第一方面,在第一方面的第一种可能实现方式中,所述装置还包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, the device further includes:
加载获取单元,用于加载运行不同拍照模式的资源安装包,获取每个资源安装包中包括的拍摄键的图标;The loading acquisition unit is used to load resource installation packages running different camera modes, and acquire the icon of the shooting key included in each resource installation package;
解码单元,用于根据所述资源安装包的ID,将每个拍照模式的拍摄键图标解码成位图BITMAP列表;The decoding unit is used to decode the shooting key icon of each shooting mode into a bitmap BITMAP list according to the ID of the resource installation package;
所述选择查找单元具体用于:根据所述位图BITMAP列表中图标在所述屏幕中的位置,查找选择指令的位置所对应的位图BITMAP列表中的图标。The selection search unit is specifically configured to: search for the icon in the bitmap BITMAP list corresponding to the position of the selection command according to the position of the icon in the bitmap BITMAP list on the screen.
结合第一方面的第一种可能实现方式,在第一方面的第二种可能实现方式中,所述加载获取单元具体用于:With reference to the first possible implementation of the first aspect, in the second possible implementation of the first aspect, the loading and obtaining unit is specifically configured to:
不同拍照模式的资源安装包与主相机资源安装包共享同一进程号;Resource installation packages of different camera modes share the same process ID with the main camera resource installation package;
通过反射机制获取每个拍照模式所对应的拍摄键的图标。Obtain the icon of the shooting key corresponding to each camera mode through the reflection mechanism.
结合第一方面的第一种可能实现方式,在第一方面的第三种可能实现方式中,所述选择查找单元包括:With reference to the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the selection search unit includes:
坐标获取子单元,用于获取选择指令的位置对应的屏幕坐标(x,y),其中x为横坐标值,y为纵坐标值;The coordinate obtaining subunit is used to obtain the screen coordinates (x, y) corresponding to the position of the selection instruction, where x is the abscissa value and y is the ordinate value;
位置判断子单元,用于判断(x,y)是否属于位图BITMAP列表中的图标的位置;The position judging subunit is used to judge whether (x, y) belongs to the position of the icon in the bitmap BITMAP list;
ID获取子单元,用于如果(x,y)属于位图BITMAP列表中的图标的位置,则根据公式:id=x/a+y/b*N获取指令所对应的拍摄键图标。The ID obtaining subunit is used to obtain the camera key icon corresponding to the instruction according to the formula: id=x/a+y/b*N if (x,y) belongs to the position of the icon in the bitmap BITMAP list.
其中,id表示在位图BITMAP中的资源安装包的ID,所述a为位图BITMAP中每个图标的宽度l1与两个图标的横向间隔P1之和,所述b为位图BITMAP中每个图标的高度h1与两个图标的纵向间隔Q1之和,所述N为位图BITMAP列表每行图标的个数,x/a表示x对a取整,y/b表示y对b取整。Wherein, id represents the ID of the resource installation package in the bitmap BITMAP, said a is the sum of the widthl1 of each icon in the bitmap BITMAP and the horizontal interval P1of two icons, and said b is the bitmap BITMAP The sum of the height h1 of each icon and the vertical interval Q1 of the two icons, the N is the number of icons in each line of the bitmap BITMAP list, x/a means that x is rounded to a, and y/b means y round b.
结合第一方面的第一种可能实现方式,在第一方面的第四种可能实现方式中,所述位置判断子单元具体用于:With reference to the first possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the location judging subunit is specifically configured to:
令xx=x%a1,yy=y%b1,判断P1/2<xx<P1/2+l1且Q1/2<yy<Q1/2+h1是否成立,如果成立,则(x,y)属于位图BITMAP列表中的图标的位置,其中x%a1表示x对a1求余,y%b1表示y对b1求余,P1/2表示两个图标的横向间隔的一半,Q1/2表示两个图标的纵向间隔的一半。Make xx=x%a1 , yy=y%b1 , judge whether P1 /2<xx<P1 /2+l1 and Q1 /2<yy<Q1 /2+h1 are true, if true , then (x, y) belongs to the position of the icon in the bitmap BITMAP list, where x% a1 means x is the remainder of a1 , y% b1 means y is the remainder of b1 , and P1 /2 means two Half of the horizontal interval of icons, Q1 /2 means half of the vertical interval of two icons.
在本发明第一方面中,在选择了相机拍照模式后,先查找该拍照模式所对应的拍摄键图标,在所选择的拍照模式的拍摄键位置显示所述查找的图标,从而能够使用户根据不同的图标区分当前所处的不同模式,提高用户使用的方便性。In the first aspect of the present invention, after the camera shooting mode is selected, first search for the shooting key icon corresponding to the shooting mode, and display the searched icon at the shooting key position of the selected shooting mode, so that the user can Different icons distinguish different current modes, which improves the convenience of the user.
在本发明第一方面的第一种可能实现方式中,通过将不同模式的图标设置于不同的资源安装包,在选择拍照模式前,从运行的不同资源安装包中获取拍摄键的图标,并根据资源安装的ID,将每个拍照模式的拍摄键的图标解码生成位图BITMAP列表,根据选择指令的位置在所述位图BITMAP中的位置,即可查找到所对应的拍摄键的图标,操作方便,而且每个拍照模式对应为不同的资源安装包,可以使得不同模式的资源安装包代码独立性更强,内聚性好,更加方便对每种模式的维护。In the first possible implementation of the first aspect of the present invention, by setting the icons of different modes in different resource installation packages, before selecting the camera mode, the icon of the shooting key is obtained from different running resource installation packages, and According to the ID of the resource installation, the icon of the shooting key of each camera mode is decoded to generate a bitmap BITMAP list, and the icon of the corresponding shooting key can be found according to the position of the selection command in the bitmap BITMAP, The operation is convenient, and each camera mode corresponds to a different resource installation package, which can make the resource installation package codes of different modes more independent, cohesive, and more convenient for the maintenance of each mode.
附图说明Description of drawings
图1是本发明第一实施例提供的拍照模式显示方法的实现流程图;FIG. 1 is a flow chart of the realization of the camera mode display method provided by the first embodiment of the present invention;
图2是本发明第二实施例提供的拍照模式显示方法的实现流程图;Fig. 2 is a flow chart of realizing the method for displaying the photographing mode provided by the second embodiment of the present invention;
图3是本发明第二实施例提供的根据所述位图BITMAP列表中图标在所述屏幕中的位置,查找选择指令的位置所对应的位图BITMAP列表中的图标的实现流程图;Fig. 3 is a flow chart for finding the icon in the bitmap BITMAP list corresponding to the position of the selection instruction according to the position of the icon in the bitmap BITMAP list in the screen according to the second embodiment of the present invention;
图4为本发明第二实施例提供的根据选择指令查找图标的示意图;Fig. 4 is a schematic diagram of searching for an icon according to a selection instruction according to the second embodiment of the present invention;
图5为本发明第三实施例提供的拍照模式显示装置的结构示意图。FIG. 5 is a schematic structural diagram of a camera mode display device provided by a third embodiment of the present invention.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, 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, not to limit the present invention.
本发明实施例可主要应用于带照相功能的设备,可以为智能手机、PAD、电脑或者照样机等,尤其可应用于安卓系统对不同的拍摄键的图标区分显示,从而解决现有技术中对于不同的拍照模式不容易区分的问题,提高使用的便利性。并且,本发明通过进一步的实施方式,将不同拍照模式的资源设置为不同的资源安装包,在安卓系统中即为APK文件,通过获取不同拍照模式的拍摄键图标,并根据资源安装包的ID,解码生成位图BITMAP列表,根据指令对应的位置即可查找对应的图标的方式,快速获取对应的图标的同时,也便于对各个拍照模式的资源分别进行维护管理,提高拍照系统的智能性。下面结合附图具体说明。The embodiment of the present invention can be mainly applied to equipment with a camera function, which can be a smart phone, a PAD, a computer or a still camera, etc., and can be especially applied to the Android system to distinguish and display the icons of different camera keys, thereby solving the problems in the prior art. The problem that different camera modes are not easy to distinguish, improves the convenience of use. In addition, the present invention sets the resources of different camera modes as different resource installation packages, which are APK files in the Android system, by obtaining the shooting key icons of different camera modes, and according to the ID of the resource installation package , decode to generate a bitmap BITMAP list, and search for the corresponding icon according to the corresponding position of the instruction. While quickly obtaining the corresponding icon, it is also convenient to maintain and manage the resources of each camera mode separately, and improve the intelligence of the camera system. It will be described in detail below in conjunction with the accompanying drawings.
实施例一:Embodiment one:
如图1所示为本发明第一实施例提供的拍照模式显示方法的实现流程,详述如下:As shown in Figure 1, the implementation process of the camera mode display method provided by the first embodiment of the present invention is described in detail as follows:
在步骤S101中,选择相机的拍照模式,查找所选择的拍照模式对应的拍摄键的图标。In step S101, select a photographing mode of the camera, and search for an icon of a photographing key corresponding to the selected photographing mode.
具体的,所述相机的拍照模式,包括但不限于自动模式、美肌模式、优选拍照模式、连拍模式、面部优先模式、留声模式、全景拍照模式、运动拍照模式、夜间拍照模式等。每种拍照模式可以相应的满足不同场景拍摄要求。Specifically, the photographing modes of the camera include but are not limited to automatic mode, skin beautification mode, preferred photographing mode, continuous shooting mode, face priority mode, voice recording mode, panoramic photographing mode, sports photographing mode, night photographing mode, etc. Each camera mode can meet the shooting requirements of different scenes accordingly.
比如,对于自动模式,则适用于一般场景的拍摄,所设置的拍摄参数为一般场景所对应的拍摄参数。比如曝光参数、补偿参数等。For example, the automatic mode is applicable to shooting of general scenes, and the set shooting parameters are shooting parameters corresponding to general scenes. Such as exposure parameters, compensation parameters, etc.
对于美肌模式,则适用于对人物脸部的拍摄场景,在该拍照模式下,需要调用相应的美白算法,比如去痘、增白等。For the skin beautification mode, it is suitable for shooting scenes of people's faces. In this photo mode, it is necessary to call the corresponding whitening algorithm, such as acne removal, whitening, etc.
对于全景拍照模式,适用于对较长画面的场景,通过调用画面拼接算法,获取所需要拍摄的全景照片。For the panorama photo mode, it is suitable for scenes with a long picture, and the panorama photo to be taken is obtained by calling the picture stitching algorithm.
所述拍照模式对应的拍摄键,为本发明改进之处,对于不同的拍照模式,选用不同的拍摄键。The photographing key corresponding to the photographing mode is an improvement of the present invention, and different photographing keys are selected for different photographing modes.
对于所述拍摄键的查找,可以将不同拍照模式的图标集成在同一资源安装包中,通过选择不同的模式相应的调用对应的图标,当然还可以根据本发明实施例二中所述的方式,将不同的图标对应在不同的资源安装包中,以便于更好的实现对拍照模式的增加与维护。具体实现将在实施例二中说明。For the search of the camera key, the icons of different camera modes can be integrated into the same resource installation package, and the corresponding icons can be called correspondingly by selecting different modes. Of course, according to the method described in Embodiment 2 of the present invention, Correspond to different icons in different resource installation packages, so as to better realize the addition and maintenance of the camera mode. The specific implementation will be described in the second embodiment.
具体的,所述拍照模式对应的拍摄键的图标,可以根据用户的使用要求灵活设定,可以理解的是,所述图标以能更好的反应当前的拍摄场景为宜。Specifically, the icon of the shooting key corresponding to the shooting mode can be flexibly set according to the user's requirements. It can be understood that the icon should better reflect the current shooting scene.
比如,对于全景拍照模式,可以设置所述拍摄键的图标为一幅长景图片,以寓意当前所对应的拍摄场景为长景模式,同样,对于美肌模式,则可以设置所述拍摄键的图标为美白面孔。For example, for the panorama photo mode, the icon of the shooting key can be set as a long view picture to imply that the current corresponding shooting scene is a long view mode. Similarly, for the beauty mode, the icon of the shooting key can be set For whitening the face.
在步骤S102中,在所选择的拍照模式的拍摄键位置显示所查找的图标。In step S102, the searched icon is displayed at the position of the shooting key of the selected shooting mode.
所述拍照模式的拍摄键,是指在触摸屏中设置的,可用于触发拍摄指令的图标,其不同于触发拍摄指令的物理按键。为方便点击该拍摄键,优选的实施方式为,选用触摸屏作为本发明较优实施方式,但不作为限定。The photographing key in the photographing mode refers to an icon set on the touch screen that can be used to trigger a photographing instruction, which is different from a physical key that triggers a photographing instruction. For the convenience of clicking the shooting button, a preferred implementation mode is to select a touch screen as a preferred implementation mode of the present invention, but it is not limited thereto.
通过在拍摄键位置显示所查找的图标,从而使得用户在当前拍照模式下,可方便的识别当前拍照模式,提高使用的便利性。By displaying the searched icon at the position of the shooting key, the user can easily identify the current shooting mode in the current shooting mode, thereby improving the convenience of use.
实施例二:Embodiment two:
图2示出了本发明第二实施例提供的拍照模式显示方法的实施流程图,详述如下:Fig. 2 shows the implementation flowchart of the method for displaying the photographing mode provided by the second embodiment of the present invention, which is described in detail as follows:
在步骤S201中,加载运行不同拍照模式的资源安装包,获取每个资源安装包中包括的拍摄键的图标。In step S201, resource installation packages running different camera modes are loaded, and icons of shooting keys included in each resource installation package are acquired.
由于不同拍照模式所对应的区别之处在选择不同的拍照参数或者对应不同的照片优化算法,因此,在实际使用中,可能会需要给相机增加新的拍照模式,以提高使用的便利性。Since the difference corresponding to different camera modes lies in selecting different camera parameters or corresponding to different photo optimization algorithms, therefore, in actual use, it may be necessary to add a new camera mode to the camera to improve the convenience of use.
在传统相机拍照程序中,特别是安卓系统对程序的限制,在安卓系统中每个安装程序APK都是相互独立的,由于安卓系统的权限限制,两个APK程序之间互通很难直接进行。因此,不同的拍照模式往往集成在一个安装包中。In the traditional camera camera program, especially the restrictions on the program of the Android system, each installer APK in the Android system is independent of each other. Due to the permission restrictions of the Android system, it is difficult to directly communicate between the two APK programs. Therefore, different camera modes are often integrated into one installation package.
本发明中所述不同拍照模式的资源安装包,是指对于不同拍照模式,设置了不同的资源安装包,即对应不同的安装程序。这样使得不同的拍照模式可以以插件的形式加载在所述拍摄程序中,便于对拍照模式进行维护管理。The resource installation packages for different photographing modes mentioned in the present invention refer to different resource installation packages for different photographing modes, that is, corresponding to different installation programs. In this way, different photographing modes can be loaded in the photographing program in the form of plug-ins, which facilitates maintenance and management of the photographing modes.
对于每个安装程序APK都是相互独立的安卓系统,本发明所述加载运行不同拍照模式的资源安装包,获取每个资源安装包中包括的拍摄键的图标步骤具体为:For each installation program APK is an Android system independent of each other, the resource installation package of loading and running different camera modes described in the present invention, and the steps of obtaining the icon of the shooting key included in each resource installation package are specifically:
不同拍照模式的资源安装包与主相机资源安装包共享同一进程号;Resource installation packages of different camera modes share the same process ID with the main camera resource installation package;
通过反射机制获取每个拍照模式所对应的拍摄键的图标。Obtain the icon of the shooting key corresponding to each camera mode through the reflection mechanism.
将每个拍照模式打包成一个APK,与主机的APK共享同一个进程号,这样主相机的APK就可以访问每个拍照模式APK的资源、代码等,这样做的好处就是可以让每个拍照模式管理自己的资源数据,从而使得每个拍照模式的资源安装包可以灵活设定具有物色的拍摄键图标,使得代码独立性、内聚性大大增强。Package each camera mode into an APK, and share the same process number with the host's APK, so that the main camera's APK can access the resources, codes, etc. of each camera mode APK. The advantage of this is that each camera mode can Manage your own resource data, so that the resource installation package of each camera mode can flexibly set the camera key icon with the search, which greatly enhances the independence and cohesion of the code.
在安卓系统中,在程序安装包中通过相应的设定,比如设定相同的签名值,使得不同的资源安装包共享同一进程号。所述反射机制,是指程序在运动时,根据类的名字,获取程序自身信息,比如在JAVA程序中,只要给定类的名字,就可以通过反射机制获得类的所有信息。In the Android system, through corresponding settings in the program installation package, such as setting the same signature value, different resource installation packages share the same process ID. The reflection mechanism means that when the program is running, it obtains the information of the program itself according to the name of the class. For example, in a JAVA program, as long as the name of the class is given, all the information of the class can be obtained through the reflection mechanism.
在步骤S202中,根据所述资源安装包的ID,将每个拍照模式的拍摄键图标解码成位图BITMAP列表。In step S202, according to the ID of the resource installation package, the camera key icon of each camera mode is decoded into a bitmap BITMAP list.
所述资源安装包的ID,为预先设定的各个拍摄模式所对应的序号,可以以自然数0、1、2、3、4、5、6这样的顺序依次编排。The ID of the resource installation package is a preset sequence number corresponding to each shooting mode, which can be arranged in the order of natural numbers 0, 1, 2, 3, 4, 5, and 6.
所述根据资源安装包的ID,将每个拍照模式的拍摄键图标解码成位图BITMAP列表,即将不同拍照模式所对应的图标,根据资源安装包的ID的先后顺序,设置在所述位图BITMAP列表中。According to the ID of the resource installation package, the shooting key icon of each camera mode is decoded into a bitmap BITMAP list, that is, the icons corresponding to different camera modes are set in the bitmap according to the sequence of the IDs of the resource installation package BITMAP list.
所述位图BITMAP列表,可用于存放不同拍照模式中的图标,根据资源安装包的ID顺序,依次得到的包括各个资源安装包图标的列表。The bitmap BITMAP list can be used to store icons in different camera modes, and according to the ID sequence of resource installation packages, a list including the icons of each resource installation package is sequentially obtained.
比如,现在包括四种拍照模式,对应四个不同的资源安装包,分别为A、B、C、D,每个资源安装包包括一个特定的用于拍摄键的图标,且每个资源安装包对应的ID为2、1、0、3,那么,根据解码指令生成对应的位图BITMAP列表时,在位图列表中的图标对应资源安装包的顺序为C、B、A、D。For example, it now includes four camera modes, corresponding to four different resource installation packages, namely A, B, C, and D. Each resource installation package includes a specific icon for the camera button, and each resource installation package The corresponding IDs are 2, 1, 0, and 3. Then, when the corresponding bitmap BITMAP list is generated according to the decoding instruction, the sequence of resource installation packages corresponding to icons in the bitmap list is C, B, A, and D.
在步骤S203中,根据所述位图BITMAP列表中图标在所述屏幕中的位置,查找选择指令的位置所对应的位图BITMAP列表中的图标。In step S203, according to the position of the icon in the bitmap BITMAP list on the screen, search for the icon in the bitmap BITMAP list corresponding to the position of the selection instruction.
其中,如图3所示,所述根据所述位图BITMAP列表中图标在所述屏幕中的位置,查找选择指令的位置所对应的位图BITMAP列表中的图标步骤可以具体为:Wherein, as shown in FIG. 3, the step of searching for the icon in the bitmap BITMAP list corresponding to the position of the selection instruction according to the position of the icon in the bitmap BITMAP list on the screen can be specifically:
在步骤S301中,获取选择指令的位置对应的屏幕坐标(x,y),其中x为横坐标值,y为纵坐标值。In step S301, the screen coordinates (x, y) corresponding to the location of the selection instruction are acquired, where x is the abscissa value, and y is the ordinate value.
具体的,在选择拍照模式时,可以根据显示的位图BITMAP列表输入选择指令,得到选择指令的坐标值(x,y),其中x为横坐标值,y为纵坐标值。该选择指令通常为触摸指令。Specifically, when selecting a photographing mode, a selection command can be input according to the displayed bitmap BITMAP list to obtain the coordinate value (x, y) of the selection command, where x is the abscissa value and y is the ordinate value. The selection command is usually a touch command.
在步骤S302中,判断(x,y)是否属于位图BITMAP列表中的图标的位置。In step S302, it is judged whether (x, y) belongs to the position of the icon in the bitmap BITMAP list.
判断(x,y)是否属于位图BITMAP列表中的图标的位置的方式包括多种,比如可以设定位图BITMAP列表中的图标的区域,判断是否属于预定的区域,或者通过分别计算坐标值进行判断,其中一种计算坐标值判断的方法可以如下所示:There are many ways to judge whether (x, y) belongs to the position of the icon in the bitmap BITMAP list, for example, you can set the area of the icon in the bitmap BITMAP list, determine whether it belongs to a predetermined area, or calculate the coordinate value separately To make a judgment, one of the methods of calculating the coordinate value judgment can be as follows:
令xx=x%a1,yy=y%b1,判断P1/2<xx<P1/2+l1且Q1/2<yy<Q1/2+h1是否成立,如果成立,则(x,y)属于位图BITMAP列表中的图标的位置,其中x%a1表示x对a1求余,y%b1表示y对b1求余,P1/2表示两个图标的横向间隔的一半,Q1/2表示两个图标的纵向间隔的一半。Make xx=x%a1 , yy=y%b1 , judge whether P1 /2<xx<P1 /2+l1 and Q1 /2<yy<Q1 /2+h1 are true, if true , then (x, y) belongs to the position of the icon in the bitmap BITMAP list, where x% a1 means x is the remainder of a1 , y% b1 means y is the remainder of b1 , and P1 /2 means two Half of the horizontal interval of icons, Q1 /2 means half of the vertical interval of two icons.
在步骤S303中,如果(x,y)属于位图BITMAP列表中的图标的位置,则根据公式:id=x/a+y/b*N获取指令所对应的拍摄键图标。In step S303, if (x, y) belongs to the position of the icon in the bitmap BITMAP list, then according to the formula: id=x/a+y/b*N, the camera key icon corresponding to the command is obtained.
其中,id表示在位图BITMAP中的资源安装包的ID,所述a为位图BITMAP中每个图标的宽度l1与两个图标的横向间隔P1之和,所述b为位图BITMAP中每个图标的高度h1与两个图标的纵向间隔Q1之和,所述N为位图BITMAP列表每行图标的个数,x/a表示x对a取整,y/b表示y对b取整。Wherein, id represents the ID of the resource installation package in the bitmap BITMAP, said a is the sum of the widthl1 of each icon in the bitmap BITMAP and the horizontal interval P1of two icons, and said b is the bitmap BITMAP The sum of the height h1 of each icon and the vertical interval Q1 of the two icons, the N is the number of icons in each line of the bitmap BITMAP list, x/a means that x is rounded to a, and y/b means y round b.
如图4所示为本发明实施例提供的根据选择指令查找图标的示意图,假设输入的坐标为(8,9),位图BITMAP中每个图标的宽度3,两个图标的横向间隔为0.5,每个图标的高度为3,两个图标的纵向间隔为0.5,位图BITMAP列表每行图标的个数为4个,那么,由于0.5/2<1<0.5/2+3,且0.5/2<2<0.5/2+3,因此,坐标(8,9)属于位图BITMAP列表中的图标的位置。As shown in Figure 4, it is a schematic diagram of searching icons according to the selection instruction provided by the embodiment of the present invention, assuming that the input coordinates are (8, 9), the width of each icon in the bitmap BITMAP is 3, and the horizontal interval between two icons is 0.5 , the height of each icon is 3, the vertical interval between two icons is 0.5, and the number of icons in each row of the bitmap BITMAP list is 4, then, since 0.5/2<1<0.5/2+3, and 0.5/ 2<2<0.5/2+3, therefore, the coordinates (8, 9) belong to the position of the icon in the bitmap BITMAP list.
进一步获取指令所对应的拍摄键图标。由于|8/3|+|9/3|*4=10,查找到图标所对应的资源安装包ID序号为10,根据ID序号即可查找对应的安装资源包内的图标。The camera key icon corresponding to the instruction is further acquired. Since |8/3|+|9/3|*4=10, the resource installation package ID number corresponding to the found icon is 10, and the icon in the corresponding installation resource package can be searched according to the ID number.
在步骤S204中,在所选择的拍照模式的拍摄键位置显示所查找的图标。In step S204, the searched icon is displayed at the position of the shooting key of the selected shooting mode.
步骤S204与步骤S102相同,在此不作重复赘述。Step S204 is the same as step S102 and will not be repeated here.
本发明实施例在实施例一的基础上,进一步将每个拍照模式的图标设置于资源安装包,并通过位图BITMAP列表快速查找选择模式对应的图标,实现简单,而且便于维护管理。On the basis of Embodiment 1, the embodiment of the present invention further sets the icon of each photographing mode in the resource installation package, and quickly finds the icon corresponding to the selected mode through the bitmap BITMAP list, which is simple to implement and convenient for maintenance and management.
实施例三:Embodiment three:
图5示出了本发明第三实施例提供的拍照模式显示装置的结构示意图,详述如下:Fig. 5 shows a schematic structural diagram of a camera mode display device provided by a third embodiment of the present invention, which is described in detail as follows:
本发明实施例所述拍照模式显示装置,包括:The camera mode display device according to the embodiment of the present invention includes:
选择查找单元501,用于选择相机的拍照模式,查找所选择的拍照模式对应的拍摄键的图标;Select the search unit 501, used to select the camera mode of the camera, and search for the icon of the shooting key corresponding to the selected camera mode;
显示单元502,用于在所选择的拍照模式的拍摄键位置显示所查找的图标。The display unit 502 is configured to display the searched icon at the position of the shooting key of the selected shooting mode.
优选的,所述装置还包括:Preferably, the device also includes:
加载获取单元,用于加载运行不同拍照模式的资源安装包,获取每个资源安装包中包括的拍摄键的图标;The loading acquisition unit is used to load resource installation packages running different camera modes, and acquire the icon of the shooting key included in each resource installation package;
解码单元,用于根据所述资源安装包的ID,将每个拍照模式的拍摄键图标解码成位图BITMAP列表;The decoding unit is used to decode the shooting key icon of each shooting mode into a bitmap BITMAP list according to the ID of the resource installation package;
所述选择查找单元具体用于:根据所述位图BITMAP列表中图标在所述屏幕中的位置,查找选择指令的位置所对应的位图BITMAP列表中的图标。The selection search unit is specifically configured to: search for the icon in the bitmap BITMAP list corresponding to the position of the selection command according to the position of the icon in the bitmap BITMAP list on the screen.
进一步优化的,所述加载获取单元具体用于:Further optimized, the loading and acquisition unit is specifically used for:
不同拍照模式的资源安装包与主相机资源安装包共享同一进程号;Resource installation packages of different camera modes share the same process ID with the main camera resource installation package;
通过反射机制获取每个拍照模式所对应的拍摄键的图标。Obtain the icon of the shooting key corresponding to each camera mode through the reflection mechanism.
优选的,所述选择查找单元包括:Preferably, the selection search unit includes:
坐标获取子单元,用于获取选择指令的位置对应的屏幕坐标(x,y),其中x为横坐标值,y为纵坐标值;The coordinate obtaining subunit is used to obtain the screen coordinates (x, y) corresponding to the position of the selection instruction, where x is the abscissa value and y is the ordinate value;
位置判断子单元,用于判断(x,y)是否属于位图BITMAP列表中的图标的位置;The position judging subunit is used to judge whether (x, y) belongs to the position of the icon in the bitmap BITMAP list;
ID获取子单元,用于如果(x,y)属于位图BITMAP列表中的图标的位置,则根据公式:id=x/a+y/b*N获取指令所对应的拍摄键图标。The ID obtaining subunit is used to obtain the camera key icon corresponding to the instruction according to the formula: id=x/a+y/b*N if (x,y) belongs to the position of the icon in the bitmap BITMAP list.
其中,id表示在位图BITMAP中的资源安装包的ID,所述a为位图BITMAP中每个图标的宽度l1与两个图标的横向间隔P1之和,所述b为位图BITMAP中每个图标的高度h1与两个图标的纵向间隔Q1之和,所述N为位图BITMAP列表每行图标的个数,x/a表示x对a取整,y/b表示y对b取整。Wherein, id represents the ID of the resource installation package in the bitmap BITMAP, said a is the sum of the widthl1 of each icon in the bitmap BITMAP and the horizontal interval P1of two icons, and said b is the bitmap BITMAP The sum of the height h1 of each icon and the vertical interval Q1 of the two icons, the N is the number of icons in each line of the bitmap BITMAP list, x/a means that x is rounded to a, and y/b means y round b.
更进一步的,所述位置判断子单元具体用于:Furthermore, the position judgment subunit is specifically used for:
令xx=x%a1,yy=y%b1,判断P1/2<xx<P1/2+l1且Q1/2<yy<Q1/2+h1是否成立,如果成立,则(x,y)属于位图BITMAP列表中的图标的位置,其中x%a1表示x对a1求余,y%b1表示y对b1求余,P1/2表示两个图标的横向间隔的一半,Q1/2表示两个图标的纵向间隔的一半。Make xx=x%a1 , yy=y%b1 , judge whether P1 /2<xx<P1 /2+l1 and Q1 /2<yy<Q1 /2+h1 are true, if true , then (x, y) belongs to the position of the icon in the bitmap BITMAP list, where x% a1 means x is the remainder of a1 , y% b1 means y is the remainder of b1 , and P1 /2 means two Half of the horizontal interval of icons, Q1 /2 means half of the vertical interval of two icons.
本发明实施例所述拍照模式显示装置,与实施例一、实施例二中所述的拍照模式显示方法相对应,在此不作重复赘述。The device for displaying the photographing mode in the embodiment of the present invention corresponds to the method for displaying the photographing mode described in Embodiment 1 and Embodiment 2, and will not be repeated here.
在本发明所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention 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 storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the methods described in various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. within range.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410514147.2ACN104267875B (en) | 2014-09-29 | 2014-09-29 | A kind of exposal model display methods and device |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410514147.2ACN104267875B (en) | 2014-09-29 | 2014-09-29 | A kind of exposal model display methods and device |
| Publication Number | Publication Date |
|---|---|
| CN104267875Atrue CN104267875A (en) | 2015-01-07 |
| CN104267875B CN104267875B (en) | 2018-01-16 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410514147.2AExpired - Fee RelatedCN104267875B (en) | 2014-09-29 | 2014-09-29 | A kind of exposal model display methods and device |
| Country | Link |
|---|---|
| CN (1) | CN104267875B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104580916A (en)* | 2015-01-29 | 2015-04-29 | 广东欧珀移动通信有限公司 | Photo mode display method and device and mobile terminal |
| CN104639836A (en)* | 2015-02-28 | 2015-05-20 | 深圳市中兴移动通信有限公司 | Method and system for updating shooting mode |
| CN112148185A (en)* | 2020-09-17 | 2020-12-29 | 维沃移动通信(杭州)有限公司 | Image display method and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100177233A1 (en)* | 2004-06-23 | 2010-07-15 | Sony Corporation | Picture display controlling apparatus and picture display controlling method |
| CN102722321A (en)* | 2012-05-22 | 2012-10-10 | 中兴通讯股份有限公司 | Method and device for switching between double cameras |
| CN103207725A (en)* | 2012-01-13 | 2013-07-17 | 腾讯科技(深圳)有限公司 | Icon conversion method and device |
| US20130293757A1 (en)* | 2010-12-13 | 2013-11-07 | Sony Corporation | Image processing apparatus and image processing method |
| CN103533244A (en)* | 2013-10-21 | 2014-01-22 | 深圳市中兴移动通信有限公司 | Shooting device and automatic visual effect processing shooting method thereof |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100177233A1 (en)* | 2004-06-23 | 2010-07-15 | Sony Corporation | Picture display controlling apparatus and picture display controlling method |
| US20130293757A1 (en)* | 2010-12-13 | 2013-11-07 | Sony Corporation | Image processing apparatus and image processing method |
| CN103207725A (en)* | 2012-01-13 | 2013-07-17 | 腾讯科技(深圳)有限公司 | Icon conversion method and device |
| CN102722321A (en)* | 2012-05-22 | 2012-10-10 | 中兴通讯股份有限公司 | Method and device for switching between double cameras |
| CN103533244A (en)* | 2013-10-21 | 2014-01-22 | 深圳市中兴移动通信有限公司 | Shooting device and automatic visual effect processing shooting method thereof |
| Title |
|---|
| BENSC2003: "IOS8延时拍摄怎么用", 《HTTP://JINGYAN.BAIDU.COM/ARTICLE/86FAE346B7C0603C49121ADA.HTML》* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104580916A (en)* | 2015-01-29 | 2015-04-29 | 广东欧珀移动通信有限公司 | Photo mode display method and device and mobile terminal |
| CN104580916B (en)* | 2015-01-29 | 2018-01-16 | 广东欧珀移动通信有限公司 | Display methods, device and the mobile terminal of exposal model |
| CN104639836A (en)* | 2015-02-28 | 2015-05-20 | 深圳市中兴移动通信有限公司 | Method and system for updating shooting mode |
| CN112148185A (en)* | 2020-09-17 | 2020-12-29 | 维沃移动通信(杭州)有限公司 | Image display method and device |
| Publication number | Publication date |
|---|---|
| CN104267875B (en) | 2018-01-16 |
| Publication | Publication Date | Title |
|---|---|---|
| CA2959718C (en) | Real-time sharing during a phone call | |
| RU2677595C2 (en) | Application interface presentation method and apparatus and electronic device | |
| JP6290869B2 (en) | Entry points for image-related applications on mobile devices | |
| KR102327779B1 (en) | Method for processing image data and apparatus for the same | |
| US10055557B2 (en) | User device and operating method thereof | |
| EP2983074B1 (en) | Method and apparatus for displaying a screen in electronic devices | |
| CN103581318B (en) | A kind of backup of mobile device data, restoring method and device | |
| JP2017520034A (en) | Automated selective upload of images | |
| KR20150092964A (en) | Method for processing fingerprint and an electronic device thereof | |
| EP2985979B1 (en) | Method and terminal for backing up data | |
| US10999501B2 (en) | Electronic device and method for controlling display of panorama image | |
| US10001919B2 (en) | Apparatus for providing integrated functions of dial and calculator and method thereof | |
| US9332289B2 (en) | Image viewing system, receiver mobile terminal, image server, and image viewing method | |
| US20160140350A1 (en) | Method of securing image data and electronic device adapted to the same | |
| CN114640798B (en) | Image processing method, electronic device, and computer storage medium | |
| CN105320695A (en) | Picture processing method and device | |
| CN104169913A (en) | A picture display method and device, terminal equipment | |
| CN104063911A (en) | Method for carrying out driving record based on intelligent terminal equipment and intelligent terminal equipment | |
| US9641768B2 (en) | Filter realization method and apparatus of camera application | |
| CN104267875B (en) | A kind of exposal model display methods and device | |
| KR20150027934A (en) | Apparatas and method for generating a file of receiving a shoot image of multi angle in an electronic device | |
| CN114327178A (en) | Interface display method, device and storage medium | |
| CN105516609A (en) | Method and device for taking pictures | |
| CN107657219A (en) | Method for detecting human face and Related product | |
| CN105204718B (en) | Information processing method and electronic equipment |
| 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 | ||
| CP03 | Change of name, title or address | 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 523841 usha Beach Road No. 18 Patentee before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. | |
| CP03 | Change of name, title or address | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20180116 | |
| CF01 | Termination of patent right due to non-payment of annual fee |