CN106506932A - The acquisition methods and device of image - Google Patents
The acquisition methods and device of image Download PDFInfo
- Publication number
- CN106506932A CN106506932A CN201510566761.8A CN201510566761A CN106506932A CN 106506932 A CN106506932 A CN 106506932A CN 201510566761 A CN201510566761 A CN 201510566761A CN 106506932 A CN106506932 A CN 106506932A
- Authority
- CN
- China
- Prior art keywords
- resolution
- image
- terminal
- view
- consistent
- 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.)
- Pending
Links
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/63—Control of cameras or camera modules by using electronic viewfinders
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
- Telephone Function (AREA)
Abstract
本发明提供了一种图像的获取方法及装置,其中,该方法包括:在全屏预览终端摄像头获取的图像之前,获取终端显示屏的第一分辨率和终端摄像头的第二分辨率;比较第一分辨率和第二分辨率;在第一分辨率和第二分辨率不一致时,获取与第二分辨率一致的图像。通过本发明,解决了相关技术中在手机屏幕尺寸比率与该手机相机的分辨率不一致时,手机预览界面的上边和下边就会不显示图像的问题,提高了用户的体验效果。
The present invention provides an image acquisition method and device, wherein the method includes: before previewing the image acquired by the terminal camera in full screen, acquiring the first resolution of the terminal display screen and the second resolution of the terminal camera; comparing the first resolution and the second resolution; when the first resolution is inconsistent with the second resolution, acquire an image consistent with the second resolution. The present invention solves the problem in the related art that when the screen size ratio of the mobile phone is inconsistent with the resolution of the camera of the mobile phone, the upper and lower sides of the preview interface of the mobile phone will not display images, thereby improving the experience effect of users.
Description
技术领域technical field
本发明涉及图像拍摄领域,具体而言,涉及一种图像的获取方法及装置。The present invention relates to the field of image capturing, in particular to an image acquisition method and device.
背景技术Background technique
相关技术中,对于摄像头客观测试需要测试摄像头的客观分辨率,需要在测试样品处于开机状态,摄像头设置为最大分辨率条件下,通过调节终端镜头与测试图卡(ISOresolution Chart for Electronics Still Cameras)之间的距离,使图卡成像清晰,并使水平方向的粗框与画面水平框平行,拍摄是让图卡的有效高度(粗框内侧的高度)正好沾满画面。一般图像格式水平像素与垂直像素比例为4:3,使所拍摄画面为黑线内区域即可。In the related art, the objective resolution of the camera needs to be tested for the objective test of the camera. It is necessary to adjust the terminal lens and the test chart (ISOresolution Chart for Electronics Still Cameras) under the condition that the test sample is turned on and the camera is set to the maximum resolution. The distance between them makes the image of the card clear, and the thick frame in the horizontal direction is parallel to the horizontal frame of the screen. The shooting is to make the effective height of the card (the height inside the thick frame) just cover the screen. Generally, the ratio of horizontal pixels to vertical pixels in the image format is 4:3, so that the captured picture can be within the black line.
相关技术中,照相机拍摄出来存储的图片尺寸(像素)比例一般两种,4:3分辨率或是16:9分辨率,手机的最高像素长宽比例也是按两种分辨率取其一。而手机屏幕的尺寸有VGA、QVGA、WVGA等等,长宽比通常有4:3、3:2、16:10、15:9、16:9等;当手机进入全屏拍照的情况下,当手机屏幕的尺寸比例符合4:3或是16:9的情况下,拍出的照片对应也是4:3或是16:9的分辨率图片,那么,就可以实现所拍及所得,使得水平方向的粗框与画面水平框平行,拍摄是让图卡的有效高度(粗框内侧的高度)正好沾满画面,才能保证分辨率测试的正确性,当手机屏幕尺寸比率不满足4:3或是16:9要求的情况下,全屏模式拍照在预览时和拍出的照片之间就有差别,导致测试分辨率取景失败,无法检测。In related technologies, there are generally two ratios of image size (pixels) captured and stored by the camera, 4:3 resolution or 16:9 resolution, and the highest pixel aspect ratio of the mobile phone is also selected according to one of the two resolutions. The size of the mobile phone screen is VGA, QVGA, WVGA, etc., and the aspect ratio is usually 4:3, 3:2, 16:10, 15:9, 16:9, etc.; When the size ratio of the mobile phone screen conforms to 4:3 or 16:9, the photo taken corresponds to a resolution picture of 4:3 or 16:9, then, you can realize what you took and what you get, so that the horizontal direction The thick frame of the screen is parallel to the horizontal frame of the screen. The shooting is to make the effective height of the picture card (the height inside the thick frame) just cover the screen, so as to ensure the correctness of the resolution test. When the screen size ratio of the mobile phone does not meet 4:3 or In the case of 16:9 requirements, there is a difference between the preview and the captured photo when taking pictures in full-screen mode, which leads to the failure of the test resolution framing and cannot be detected.
进而在相关技术中的照相机拍照时,为了表现出所拍及所得,在预览界面进行了强制的预览尺寸的转换,4:3像素的照片拍摄,预览图片就是4:3的,16:9像素的照片拍摄,预览图片就是16:9的。当手机屏幕不是这两个比例时,手机预览界面的上边和下边就会不显示图像,呈现给用户的就是黑边。And then when the camera in the related art takes pictures, in order to show what is taken and what is obtained, a mandatory preview size conversion is carried out on the preview interface, and the photo of 4:3 pixels is taken, and the preview picture is exactly 4:3, 16:9 pixels The photo is taken, and the preview picture is 16:9. When the mobile phone screen is not in these two ratios, the upper and lower sides of the mobile phone preview interface will not display images, and what is presented to the user is a black border.
针对相关技术中在手机屏幕尺寸比率与该手机相机的分辨率不一致时,手机预览界面的上边和下边就会不显示图像的问题,目前尚未存在有效的解决方案。Aiming at the problem in the related art that when the screen size ratio of the mobile phone is inconsistent with the resolution of the camera of the mobile phone, no image will be displayed on the upper and lower sides of the preview interface of the mobile phone, and there is no effective solution yet.
发明内容Contents of the invention
本发明提供了一种图像的获取方法及装置,以至少解决相关技术中在手机屏幕尺寸比率与该手机相机的分辨率不一致时,手机预览界面的上边和下边就会不显示图像的问题。The present invention provides an image acquisition method and device to at least solve the problem in the related art that when the screen size ratio of the mobile phone is inconsistent with the resolution of the mobile phone camera, the upper and lower sides of the preview interface of the mobile phone will not display images.
根据本发明的一个方面,提供了一种图像的获取方法,包括:在全屏预览终端摄像头获取的图像之前,获取所述终端显示屏的第一分辨率和所述终端摄像头的第二分辨率;比较所述第一分辨率和所述第二分辨率;在所述第一分辨率和所述第二分辨率不一致时,获取与所述第二分辨率一致的图像。According to one aspect of the present invention, there is provided an image acquisition method, including: before previewing the image acquired by the terminal camera in full screen, acquiring the first resolution of the terminal display screen and the second resolution of the terminal camera; Comparing the first resolution with the second resolution; when the first resolution is inconsistent with the second resolution, acquiring an image consistent with the second resolution.
进一步地,所述获取与所述第二分辨率一致的图像包括:生成与所述第二分辨率一致的取景框;获取依据所述取景框进行取景的图像。Further, the acquiring an image consistent with the second resolution includes: generating a viewfinder frame consistent with the second resolution; acquiring an image framed according to the viewfinder frame.
进一步地,在所述获取与所述第二分辨率一致的图像之后,所述方法还包括:保存依据所述取景框取景的图像,并显示通过所述取景框取景的图像。Further, after the acquisition of the image consistent with the second resolution, the method further includes: saving the image framed according to the viewfinder frame, and displaying the image framed through the viewfinder frame.
进一步地,获取所述终端显示屏的第一分辨率和所述终端摄像头的第二分辨率包括:从所述终端的硬件配置信息表中读取所述显示屏的所述第一分辨率;从所述终端中读取最后一次设置的图像的分辨率,得到所述第二分辨率。Further, obtaining the first resolution of the terminal display screen and the second resolution of the terminal camera includes: reading the first resolution of the display screen from a hardware configuration information table of the terminal; The resolution of the image set last time is read from the terminal to obtain the second resolution.
进一步地,所述第一分辨率和所述第二分辨率分别包括多种分辨率。Further, the first resolution and the second resolution respectively include multiple resolutions.
根据本发明的另一个方面,提供了一种图像的获取装置,包括:第一获取模块,用于在全屏预览终端摄像头获取的图像之前,获取所述终端显示屏的第一分辨率和所述终端摄像头的第二分辨率;比较模块,用于比较所述第一分辨率和所述第二分辨率;第二获取模块,用于在所述第一分辨率和所述第二分辨率不一致时,获取与所述第二分辨率一致的图像。According to another aspect of the present invention, an image acquisition device is provided, including: a first acquisition module, configured to acquire the first resolution of the terminal display screen and the The second resolution of the terminal camera; a comparison module, configured to compare the first resolution with the second resolution; a second acquisition module, configured to differ between the first resolution and the second resolution , acquire an image consistent with the second resolution.
进一步地,所述第二获取模块包括:生成单元,用于生成与所述第二分辨率一致的取景框;第一获取单元,用于获取依据所述取景框进行取景的图像。Further, the second acquisition module includes: a generation unit, configured to generate a viewfinder frame consistent with the second resolution; a first acquisition unit, configured to acquire an image framed according to the viewfinder frame.
进一步地,在所述获取与所述第二分辨率一致的图像之后,所述装置还包括:处理模块,用于保存依据所述取景框取景的图像,并显示通过所述取景框取景的图像。Further, after the acquisition of the image consistent with the second resolution, the device further includes: a processing module, configured to save the image framed according to the viewfinder frame, and display the image framed through the viewfinder frame .
进一步地,所述第一获取模块包括:第二获取单元,用于从所述终端的硬件配置信息表中读取所述显示屏的所述第一分辨率;第三获取单元,用于从所述终端中读取最后一次设置的图像的分辨率,得到所述第二分辨率。Further, the first obtaining module includes: a second obtaining unit, configured to read the first resolution of the display screen from a hardware configuration information table of the terminal; a third obtaining unit, configured to read the first resolution of the display screen from a hardware configuration information table of the terminal; The terminal reads the last set image resolution to obtain the second resolution.
进一步地,所述第一分辨率和所述第二分辨率分别包括多种分辨率。Further, the first resolution and the second resolution respectively include multiple resolutions.
通过本发明,采用在全屏预览终端摄像头获取的图像之前,获取终端显示屏的第一分辨率和终端摄像头的第二分辨率,进而对第一分辨率和第二分辨率进行比较,在第一分辨率和第二分辨率不一致时,获取与第二分辨率一致的图像,也就是说,在终端摄像头与显示屏的分辨率不一致时,以摄像头的分辨率为准获取相应的图像,从而解决了相关技术中在手机屏幕尺寸比率与该手机相机的分辨率不一致时,手机预览界面的上边和下边就会不显示图像的问题,提高了用户的体验效果。Through the present invention, the first resolution of the terminal display screen and the second resolution of the terminal camera are obtained before the full-screen preview of the image captured by the terminal camera, and then the first resolution and the second resolution are compared, and the first When the resolution is inconsistent with the second resolution, obtain an image that is consistent with the second resolution, that is, when the resolution of the terminal camera and the display screen are inconsistent, obtain the corresponding image based on the resolution of the camera, so as to solve the problem. The problem in the related art that when the screen size ratio of the mobile phone is inconsistent with the resolution of the camera of the mobile phone, no image will be displayed on the upper and lower sides of the preview interface of the mobile phone is solved, and the user experience effect is improved.
附图说明Description of drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described here are used to provide a further understanding of the present invention and constitute a part of the application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations to the present invention. In the attached picture:
图1是根据本发明实施例的图像的获取方法的流程图;Fig. 1 is a flowchart of an image acquisition method according to an embodiment of the present invention;
图2是根据本发明可选实施例的图像的获取装置的结构框图;Fig. 2 is a structural block diagram of an image acquisition device according to an optional embodiment of the present invention;
图3是根据本发明可选实施例的图像的获取装置的可选结构框图一;Fig. 3 is an optional structural block diagram 1 of an image acquisition device according to an optional embodiment of the present invention;
图4是根据本发明可选实施例的图像的获取装置的可选结构框图二;FIG. 4 is an optional structural block diagram II of an image acquisition device according to an optional embodiment of the present invention;
图5是根据本发明可选实施例的图像的获取装置的可选结构框图三;Fig. 5 is an optional structural block diagram 3 of an image acquisition device according to an optional embodiment of the present invention;
图6是根据本发明可选实施例的全屏预览拍照结果与实际预览界面关系示意图;Fig. 6 is a schematic diagram of the relationship between the full-screen preview photographing result and the actual preview interface according to an optional embodiment of the present invention;
图7是根据本发明可选实施例的特定比例取景拍照方法的流程图;Fig. 7 is a flow chart of a method for framing and taking photos with a specific ratio according to an optional embodiment of the present invention;
图8是根据本发明可选实施例的预览提示框效果示意图。Fig. 8 is a schematic diagram showing the effect of a preview prompt box according to an optional embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present invention will be described in detail with reference to the drawings and examples. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first" and "second" in the description and claims of the present invention and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence.
在本实施例中提供了一种图像的获取方法,图1是根据本发明实施例的图像的获取方法的流程图,如图1所示,该流程包括如下步骤:In this embodiment, a method for acquiring an image is provided. FIG. 1 is a flow chart of the method for acquiring an image according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
步骤S102:在全屏预览终端摄像头获取的图像之前,获取终端显示屏的第一分辨率和终端摄像头的第二分辨率;Step S102: Before previewing the image acquired by the terminal camera in full screen, acquire the first resolution of the terminal display screen and the second resolution of the terminal camera;
步骤S104:比较第一分辨率和第二分辨率;Step S104: comparing the first resolution and the second resolution;
步骤S106:在第一分辨率和第二分辨率不一致时,获取与第二分辨率一致的图像。Step S106: when the first resolution is inconsistent with the second resolution, acquire an image consistent with the second resolution.
通过本实施例的步骤S102至步骤S106,采用在全屏预览终端摄像头获取的图像之前,获取终端显示屏的第一分辨率和终端摄像头的第二分辨率,进而对第一分辨率和第二分辨率进行比较,在第一分辨率和第二分辨率不一致时,获取与第二分辨率一致的图像,也就是说,在本实施例中在终端摄像头与显示屏的分辨率不一致时,以摄像头的分辨率为准获取相应的图像,从而解决了相关技术中在手机屏幕尺寸比率与该手机相机的分辨率不一致时,手机预览界面的上边和下边就会不显示图像的问题,提高了用户的体验效果。Through steps S102 to S106 in this embodiment, the first resolution of the terminal display screen and the second resolution of the terminal camera are obtained before the image captured by the terminal camera is previewed in full screen, and then the first resolution and the second resolution rate, and when the first resolution is inconsistent with the second resolution, obtain an image consistent with the second resolution, that is, in this embodiment, when the resolutions of the terminal camera and the display screen are inconsistent, the camera The corresponding image is obtained based on the resolution of the mobile phone, thereby solving the problem in the related art that when the screen size ratio of the mobile phone is inconsistent with the resolution of the mobile phone camera, the upper and lower sides of the preview interface of the mobile phone will not display images, which improves the user experience. Experience the effect.
对于本实施例中涉及到的获取与第二分辨率一致的图像的方式,在本实施例的可选实施方式中,通过如下方式来实现:For the method of obtaining an image consistent with the second resolution involved in this embodiment, in an optional implementation manner of this embodiment, it is implemented in the following manner:
步骤S11:生成与第二分辨率一致的取景框;Step S11: generating a viewfinder frame consistent with the second resolution;
步骤S12:获取依据取景框进行取景的图像。Step S12: Acquiring an image framed according to the viewfinder frame.
对于该步骤S11和步骤S12,在本实施例的具体应用场景中第一分辨率可以是15:9,二第二分辨率则是4:3,此时第一分辨率和第二分辨率不一致,因此,在终端显示屏生成4:3的取景框,通过该取景框进行图像的取景。For the steps S11 and S12, in the specific application scenario of this embodiment, the first resolution may be 15:9, and the second resolution may be 4:3. At this time, the first resolution and the second resolution are inconsistent. , therefore, a 4:3 viewfinder frame is generated on the display screen of the terminal, and images are framed through the viewfinder frame.
而在获取与第二分辨率一致的图像之后,本实施例的方法还包括:保存依据取景框取景的图像,并显示通过所述取景框取景的图像;也就是说,在本实施例中保存的图像是与摄像头分辨率一致的图像。After acquiring the image consistent with the second resolution, the method of this embodiment further includes: saving the image framed according to the viewfinder frame, and displaying the image framed through the viewfinder frame; that is to say, in this embodiment, saving The images for are images that match the resolution of the camera.
对于本实施例中的获取终端显示屏的第一分辨率和终端摄像头的第二分辨率的方式,在本实施例的可选实施方式,可以通过如下方式来实现:For the manner of obtaining the first resolution of the terminal display screen and the second resolution of the terminal camera in this embodiment, in an optional implementation manner of this embodiment, it may be implemented in the following manner:
步骤S21:从终端的硬件配置信息表中读取显示屏的第一分辨率;Step S21: read the first resolution of the display screen from the hardware configuration information table of the terminal;
步骤S22:从终端中读取最后一次设置的图像的分辨率,得到第二分辨率。Step S22: Read the last set image resolution from the terminal to obtain the second resolution.
对于本实施例中的第一分辨率和第二分辨率分别包括多种分辨率,例如第一分辨率可以为4:3、3:2、16:10、15:9和16:9其中之一,而第二分辨率可以4:3,16:9其中之一。The first resolution and the second resolution in this embodiment respectively include multiple resolutions, for example, the first resolution may be one of 4:3, 3:2, 16:10, 15:9 and 16:9 One, while the second resolution can be one of 4:3, 16:9.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
在本实施例中还提供了一种图像的获取装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。An image acquisition device is also provided in this embodiment, and the device is used to implement the above embodiments and preferred implementation modes, and those that have already been described will not be repeated. As used below, the term "module" may be a combination of software and/or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
图2是根据本发明可选实施例的图像的获取装置的结构框图,如图2所示,该装置包括:第一获取模块22,用于在全屏预览终端摄像头获取的图像之前,获取终端显示屏的第一分辨率和终端摄像头的第二分辨率;比较模块24,与第一获取模块22耦合连接,用于比较第一分辨率和第二分辨率;第二获取模块26,与比较模块24耦合连接,用于在第一分辨率和第二分辨率不一致时,获取与第二分辨率一致的图像。Fig. 2 is a structural block diagram of an image acquisition device according to an optional embodiment of the present invention. As shown in Fig. 2, the device includes: a first acquisition module 22, which is used to obtain a terminal display before full-screen previewing the image acquired by the terminal camera The first resolution of the screen and the second resolution of the terminal camera; the comparison module 24 is coupled with the first acquisition module 22 for comparing the first resolution and the second resolution; the second acquisition module 26 is connected with the comparison module 24 coupling connection, used for acquiring an image consistent with the second resolution when the first resolution is inconsistent with the second resolution.
图3是根据本发明可选实施例的图像的获取装置的可选结构框图一,如图3所示,第二获取模块26包括:生成单元32,用于生成与第二分辨率一致的取景框;第一获取单元34,与生成单元32耦合连接,用于获取依据取景框进行取景的图像。FIG. 3 is an optional structural block diagram 1 of an image acquisition device according to an optional embodiment of the present invention. As shown in FIG. 3 , the second acquisition module 26 includes: a generation unit 32, configured to generate a framing consistent with the second resolution Frame; the first acquisition unit 34 is coupled to the generation unit 32 and used to acquire an image framed according to the viewfinder frame.
图4是根据本发明可选实施例的图像的获取装置的可选结构框图二,如图4所示,在获取与第二分辨率一致的图像之后,装置还包括:处理模块42,与第二获取模块26耦合连接,用于保存依据取景框取景的图像,并显示通过所述取景框取景的图像。FIG. 4 is an optional structural block diagram II of an image acquisition device according to an optional embodiment of the present invention. As shown in FIG. The second acquisition module 26 is coupled and connected, and is used for saving the image framed according to the viewfinder frame, and displaying the image framed through the viewfinder frame.
图5是根据本发明可选实施例的图像的获取装置的可选结构框图三,如图5所示,第一获取模块22包括:第二获取单元52,用于从终端的硬件配置信息表中读取显示屏的第一分辨率;第三获取单元54,与第二获取单元52耦合连接,用于从终端中读取最后一次设置的图像的分辨率,得到第二分辨率。FIG. 5 is an optional structural block diagram three of an image acquisition device according to an optional embodiment of the present invention. As shown in FIG. 5 , the first acquisition module 22 includes: a second acquisition unit 52, which is used for Read the first resolution of the display screen; the third acquisition unit 54, coupled with the second acquisition unit 52, is used to read the resolution of the last set image from the terminal to obtain the second resolution.
可选地,该第一分辨率和第二分辨率分别包括多种分辨率。Optionally, the first resolution and the second resolution respectively include multiple resolutions.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述模块分别位于多个处理器中。It should be noted that each of the above-mentioned modules can be implemented by software or hardware. For the latter, it can be implemented in the following manner, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules are respectively located in multiple in the processor.
下面结合本发明的可选实施例进行举例说明;Below in conjunction with optional embodiments of the present invention are illustrated;
本可选实施例通过对手机屏幕尺寸比率、分辨率的判断,在全屏预览状态下,根据设置的拍摄图片尺寸比率,生成成像预览框提示,保证预览框内的图片是实际生成照片的图像范围。In this optional embodiment, by judging the screen size ratio and resolution of the mobile phone, in the full-screen preview state, according to the set shooting picture size ratio, an imaging preview box prompt is generated to ensure that the picture in the preview box is the image range of the actually generated photo .
图6是根据本发明可选实施例的全屏预览拍照结果与实际预览界面关系示意图,如图6所示,当手机屏幕尺寸与照片的尺寸比例一样的时候,不存在所见非所得的情况,数码照片的比例现在目前是4:3和16:9两种,而手机的屏幕尺寸比例却有多种4:3、3:2、16:10、15:9和16:9,任意两种组合,全屏模式预览情况下都会出现所见非所得的情况。Fig. 6 is a schematic diagram of the relationship between the full-screen preview photographing results and the actual preview interface according to an optional embodiment of the present invention. As shown in Fig. 6, when the screen size of the mobile phone is the same as the size ratio of the photo, there is no such thing as what you see is not what you get. The ratio of digital photos is currently 4:3 and 16:9, while the screen size ratio of mobile phones has a variety of 4:3, 3:2, 16:10, 15:9 and 16:9, any two Combination, full screen mode preview will appear what you see is not what you get.
图7是根据本发明可选实施例的特定比例取景拍照方法的流程图,如图7所示,该方法的步骤包括:Fig. 7 is a flow chart of a method for framing and photographing at a specific ratio according to an optional embodiment of the present invention. As shown in Fig. 7, the steps of the method include:
步骤S701:采集手机的硬件信息,其中,该硬件信息包括:手机LCD硬件分辨率以及LCD硬件尺寸信息;Step S701: collecting hardware information of the mobile phone, wherein the hardware information includes: LCD hardware resolution and LCD hardware size information of the mobile phone;
步骤S702:获取所述LCD的像素比率;Step S702: Obtain the pixel ratio of the LCD;
步骤S703:设置相机分辨率;Step S703: setting the camera resolution;
步骤S704:采集手机照相机设置的分辨率,其中,该相机的分辨率可以是4:3或16:9;Step S704: collect the resolution set by the camera of the mobile phone, wherein the resolution of the camera can be 4:3 or 16:9;
步骤S705,判断该LCD分辨率和该照相机的分辨率是否一致;在判断结果为否时,执行步骤S706;Step S705, judging whether the resolution of the LCD is consistent with the resolution of the camera; if the judging result is no, execute step S706;
步骤S706:全屏预览;Step S706: full screen preview;
步骤S707:生成预览框提示符,进行拍照。Step S707: Generate a preview box prompt and take a photo.
通过上述步骤S701至步骤S707可知,需要从手机硬件配置信息表中读取手机中LCD屏幕的分辨率和尺寸信息,判断屏幕是否具有4:3或是16:9的特征,同时记录下本手机的比例特征。进而从手机中照相机设置模块读取最后一次设置的照片分辨率信息、预览状态信息,主要判断是否是全屏预览还是非全屏预览,计算出手机照相机设置的照片的分辨率的比率关系,判断是4:3还是16:9的关系并保存。Through the above steps S701 to S707, it can be seen that it is necessary to read the resolution and size information of the LCD screen in the mobile phone from the mobile phone hardware configuration information table, determine whether the screen has the characteristics of 4:3 or 16:9, and record the information of the mobile phone at the same time proportional features. Then read the photo resolution information and preview status information set last time from the camera setting module in the mobile phone, mainly judge whether it is a full-screen preview or a non-full-screen preview, calculate the ratio relationship of the photo resolution set by the mobile phone camera, and judge that it is 4 :3 or 16:9 relationship and save.
当照相机上设置的分辨率及照片尺寸比率不同于手机屏幕分辨率比率时,同时手机预览界面处于全屏预览状态下,手机生成与照片尺寸比率相一致的提示取景框,方便用户取景,保证取景与照片结果一致。图8是根据本发明可选实施例的预览提示框效果示意图。如图8所示的虚线框内表示拍照后可以留存在照片上,虚线框外,虽然预览界面可以看到,但是拍摄出来的照片不能保存在照片上。When the resolution and photo size ratio set on the camera are different from the screen resolution ratio of the mobile phone, and the preview interface of the mobile phone is in the full-screen preview state, the mobile phone generates a prompt viewfinder frame consistent with the photo size ratio, which is convenient for the user to find a view and ensures that the viewfinder is consistent with the photo. The photos turned out to be consistent. Fig. 8 is a schematic diagram showing the effect of a preview prompt box according to an optional embodiment of the present invention. As shown in Figure 8, the inside of the dotted line frame means that after taking a photo, it can be saved on the photo, and outside the dotted line frame, although it can be seen on the preview interface, the taken photo cannot be saved on the photo.
根据生成的预览框的效果和大小,当用户实际做拍照操作时,需要将实际的取景范围数据传递到图片存储操作的入口函数中,保证用户预览界面中提示框的范围与实际保存的照片范围的数据一致。According to the effect and size of the generated preview frame, when the user actually takes a photo, the actual viewfinder range data needs to be passed to the entry function of the image storage operation to ensure that the range of the prompt box in the user preview interface is consistent with the actual saved photo range data are consistent.
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:The embodiment of the invention also provides a storage medium. Optionally, in this embodiment, the above-mentioned storage medium may be configured to store program codes for performing the following steps:
S1:在全屏预览终端摄像头获取的图像之前,获取终端显示屏的第一分辨率和终端摄像头的第二分辨率;S1: Before previewing the image acquired by the terminal camera in full screen, acquire the first resolution of the terminal display screen and the second resolution of the terminal camera;
S2:比较第一分辨率和第二分辨率;S2: comparing the first resolution with the second resolution;
S3:在第一分辨率和第二分辨率不一致时,获取与第二分辨率一致的图像。S3: Acquire an image consistent with the second resolution when the first resolution is inconsistent with the second resolution.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and optional implementation manners, and details are not repeated in this embodiment.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned present invention can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network formed by multiple computing devices Alternatively, they may be implemented in program code executable by a computing device so that they may be stored in a storage device to be executed by a computing device, and in some cases, in an order different from that shown here The steps shown or described are carried out, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。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 modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (10)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510566761.8A CN106506932A (en) | 2015-09-08 | 2015-09-08 | The acquisition methods and device of image |
| PCT/CN2015/091780 WO2016145831A1 (en) | 2015-09-08 | 2015-10-12 | Image acquisition method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510566761.8A CN106506932A (en) | 2015-09-08 | 2015-09-08 | The acquisition methods and device of image |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN106506932A true CN106506932A (en) | 2017-03-15 |
Family
ID=56919725
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510566761.8A Pending CN106506932A (en) | 2015-09-08 | 2015-09-08 | The acquisition methods and device of image |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN106506932A (en) |
| WO (1) | WO2016145831A1 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110636354A (en) * | 2019-06-10 | 2019-12-31 | 青岛海信电器股份有限公司 | Display device |
| CN111010513A (en) * | 2019-12-23 | 2020-04-14 | 北大方正集团有限公司 | Screen capture method, system and terminal device |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114390199A (en) * | 2018-10-15 | 2022-04-22 | 华为技术有限公司 | Shooting method and electronic equipment |
| CN114422694B (en) * | 2022-01-18 | 2024-03-26 | 杭州逗酷软件科技有限公司 | Preview resolution adaptation method and device and electronic equipment |
| CN116091392B (en) * | 2022-08-16 | 2023-10-20 | 荣耀终端有限公司 | Image processing method, system and storage medium |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1477857A (en) * | 2003-07-01 | 2004-02-25 | 致伸科技股份有限公司 | Viewfinding auxiliary method and equipment |
| US20050146631A1 (en) * | 2004-01-07 | 2005-07-07 | Shelton Michael J. | In-camera cropping to standard photo sizes |
| CN1812495A (en) * | 2004-12-22 | 2006-08-02 | 索尼株式会社 | Image pickup apparatus, guide frame displaying controlling method and computer program |
| CN103546689A (en) * | 2013-10-11 | 2014-01-29 | Tcl集团股份有限公司 | Resolution ratio acquiring method and device of external camera of android system |
| CN103888670A (en) * | 2014-02-21 | 2014-06-25 | 联想(北京)有限公司 | Information processing method and electronic device |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4152280B2 (en) * | 2003-08-27 | 2008-09-17 | 富士フイルム株式会社 | Video signal output method, video signal output device, and digital camera |
| JP5251878B2 (en) * | 2007-08-27 | 2013-07-31 | ソニー株式会社 | Imaging apparatus and imaging method |
-
2015
- 2015-09-08 CN CN201510566761.8A patent/CN106506932A/en active Pending
- 2015-10-12 WO PCT/CN2015/091780 patent/WO2016145831A1/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1477857A (en) * | 2003-07-01 | 2004-02-25 | 致伸科技股份有限公司 | Viewfinding auxiliary method and equipment |
| US20050146631A1 (en) * | 2004-01-07 | 2005-07-07 | Shelton Michael J. | In-camera cropping to standard photo sizes |
| CN1812495A (en) * | 2004-12-22 | 2006-08-02 | 索尼株式会社 | Image pickup apparatus, guide frame displaying controlling method and computer program |
| CN103546689A (en) * | 2013-10-11 | 2014-01-29 | Tcl集团股份有限公司 | Resolution ratio acquiring method and device of external camera of android system |
| CN103888670A (en) * | 2014-02-21 | 2014-06-25 | 联想(北京)有限公司 | Information processing method and electronic device |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110636354A (en) * | 2019-06-10 | 2019-12-31 | 青岛海信电器股份有限公司 | Display device |
| CN110636353A (en) * | 2019-06-10 | 2019-12-31 | 青岛海信电器股份有限公司 | Display device |
| CN112073765A (en) * | 2019-06-10 | 2020-12-11 | 海信视像科技股份有限公司 | Display device |
| CN110636353B (en) * | 2019-06-10 | 2022-09-02 | 海信视像科技股份有限公司 | Display device |
| CN111010513A (en) * | 2019-12-23 | 2020-04-14 | 北大方正集团有限公司 | Screen capture method, system and terminal device |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2016145831A1 (en) | 2016-09-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10827140B2 (en) | Photographing method for terminal and terminal | |
| KR102314594B1 (en) | Image display method and electronic device | |
| CN107704798B (en) | Image blurring method, apparatus, computer-readable storage medium, and computer device | |
| WO2015003604A1 (en) | Method, device, and terminal for image processing | |
| KR20160118963A (en) | Real-time image stitching apparatus and real-time image stitching method | |
| CN105049728A (en) | Method and device for acquiring shot image | |
| CN106506932A (en) | The acquisition methods and device of image | |
| US9332195B2 (en) | Image processing apparatus, imaging apparatus, and image processing method | |
| CN107690673A (en) | Image processing method and device and server | |
| US20120050561A1 (en) | Image processing apparatus, control method thereof, and program | |
| CN107909569A (en) | One kind flower screen detection method, flower screen detection device and electronic equipment | |
| CN104754223A (en) | Method for generating thumbnail and shooting terminal | |
| CN104780313A (en) | Image processing method and mobile terminal | |
| CN107532881A (en) | The method and terminal of a kind of measurement | |
| CN105262948A (en) | Panorama capturing method and mobile terminal | |
| WO2017088609A1 (en) | Image denoising apparatus and method | |
| US10547785B2 (en) | Photographing method including image registration based on reference image, shake information, and a motion vector table | |
| CN106303235A (en) | Photographing processing method and device | |
| CN104535178A (en) | A light intensity value detection method and terminal | |
| WO2015196681A1 (en) | Picture processing method and electronic device | |
| CN101472064A (en) | Filming system and method for processing scene depth | |
| CN105867858A (en) | Control method, control device and electronic device | |
| CN102780842B (en) | Handheld electronic device and dual image capturing method applicable thereto | |
| CN103795927A (en) | Photographing method and system | |
| CN106254790A (en) | Take pictures processing method and processing device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20170315 |
|
| WD01 | Invention patent application deemed withdrawn after publication |