Movatterモバイル変換


[0]ホーム

URL:


CN105282455B - A kind of photographic method, device and mobile terminal - Google Patents

A kind of photographic method, device and mobile terminal
Download PDF

Info

Publication number
CN105282455B
CN105282455BCN201410278405.1ACN201410278405ACN105282455BCN 105282455 BCN105282455 BCN 105282455BCN 201410278405 ACN201410278405 ACN 201410278405ACN 105282455 BCN105282455 BCN 105282455B
Authority
CN
China
Prior art keywords
camera
photo
photos
taken
target
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.)
Active
Application number
CN201410278405.1A
Other languages
Chinese (zh)
Other versions
CN105282455A (en
Inventor
杜峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lingxiu Electronic Technology Co ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Yulong Computer Telecommunication Scientific Shenzhen Co LtdfiledCriticalYulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201410278405.1ApriorityCriticalpatent/CN105282455B/en
Publication of CN105282455ApublicationCriticalpatent/CN105282455A/en
Application grantedgrantedCritical
Publication of CN105282455BpublicationCriticalpatent/CN105282455B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

Translated fromChinese

本发明公开一种拍照方法、装置及移动终端,其中,方法包括步骤:在进行拍照时,第一摄像头及第二摄像头同时开启,并分别连续拍摄若干张照片,并记录各张照片拍摄时的时间戳;查找出第一摄像头或第二摄像头拍摄的差异化最小的两张照片作为比对照片,并根据这两张比对照片的时间戳获取对应的第二摄像头或第一摄像头拍摄的两张照片作为目标照片,并将两张目标照片合成为一张照片,再进行显示。本发明通过利用两个摄像头来同时拍照,通过其中一个摄像头拍摄的抖动最小的两张照片获取到另外一个摄像头相应的两张照片,从而提高了拍摄的照片的质量。

The invention discloses a photographing method, device, and mobile terminal, wherein the method includes the steps of: when photographing, the first camera and the second camera are turned on at the same time, and several photographs are successively photographed respectively, and the recording time of each photograph is recorded. Timestamp; find out the two photos with the smallest difference taken by the first camera or the second camera as the comparison photos, and obtain the corresponding two photos taken by the second camera or the first camera according to the timestamps of the two comparison photos. photo as the target photo, and combine the two target photos into one photo, and then display it. The present invention uses two cameras to take pictures at the same time, and obtains two corresponding pictures from the other camera through the two pictures with the least shake taken by one of the cameras, thereby improving the quality of the pictures taken.

Description

Translated fromChinese
一种拍照方法、装置及移动终端A photographing method, device and mobile terminal

技术领域technical field

本发明涉及拍照摄像领域,尤其涉及一种拍照方法、装置及移动终端。The present invention relates to the field of photographing and photographing, in particular to a photographing method, device and mobile terminal.

背景技术Background technique

随着移动终端与互联网的发展与融合,具备拍照功能的终端应用越来越广泛,但用户在拍照时,难以避免会因为抖动,导致用户经常重复拍摄以便得到清晰的照片。现有技术中,部分终端中会加入一定的算法及处理措施对所拍摄照片进行处理,以减少抖动对照片效果的影响。在目前的处理方法中,软件处理方法其数据量大,处理速度慢,以牺牲速度换取去除抖动的效果,因而用户体验不佳;而另外的硬件处理方法中,加入硬件防抖器件,会使得终端成本增加,不利于缩减成本。With the development and integration of mobile terminals and the Internet, terminals with camera functions are more and more widely used. However, when users take pictures, it is unavoidable that they will shake frequently, causing users to often take pictures repeatedly in order to obtain clear pictures. In the prior art, certain algorithms and processing measures are added to some terminals to process the photographed photos, so as to reduce the influence of shaking on the photo effect. In the current processing method, the software processing method has a large amount of data and slow processing speed, and sacrifices speed for the effect of removing jitter, so the user experience is not good; while in other hardware processing methods, adding hardware anti-shake devices will make The terminal cost increases, which is not conducive to cost reduction.

因此,现有技术还有待于改进和发展。Therefore, the prior art still needs to be improved and developed.

发明内容Contents of the invention

鉴于上述现有技术的不足,本发明的目的在于提供一种拍照方法、装置及移动终端,旨在解决现有终端拍照时所获得的照片清晰度不佳的问题。In view of the above deficiencies in the prior art, the purpose of the present invention is to provide a photographing method, device and mobile terminal, aiming at solving the problem of poor clarity of photographs obtained when photographing with existing terminals.

本发明的技术方案如下:Technical scheme of the present invention is as follows:

一种拍照方法,其中,包括步骤:A method for taking pictures, comprising the steps of:

在进行拍照时,第一摄像头及第二摄像头同时开启,并分别连续拍摄若干张照片,并记录各张照片拍摄时的时间戳;When taking pictures, the first camera and the second camera are turned on at the same time, and several pictures are taken continuously respectively, and the time stamps when each picture is taken are recorded;

查找出第一摄像头或第二摄像头拍摄的差异化最小的两张照片作为比对照片,并根据这两张比对照片的时间戳获取对应的第二摄像头或第一摄像头拍摄的两张照片作为目标照片,并将两张目标照片合成为一张照片,再进行显示。Find the two photos with the least difference taken by the first camera or the second camera as the comparison photos, and obtain the corresponding two photos taken by the second camera or the first camera according to the time stamps of the two comparison photos as target photo, and combine two target photos into one photo, and then display it.

所述的拍照方法,其中,所述在进行拍照时,第一摄像头及第二摄像头同时开启,并分别连续拍摄若干张照片,并记录各张照片拍摄时的时间戳的步骤具体包括:The photographing method described above, wherein, when photographing, the first camera and the second camera are turned on at the same time, and successively photograph several photographs respectively, and the step of recording the time stamp of each photograph specifically includes:

将第一摄像头及第二摄像头拍摄的若干张照片按照预定规则进行缓存得到缓存信息。The cache information is obtained by caching several photos taken by the first camera and the second camera according to predetermined rules.

所述的拍照方法,其中,所述缓存的步骤具体包括:The described photographing method, wherein the step of caching specifically includes:

将第一摄像头及第二摄像头拍摄的第一张照片进行完整缓存;Completely cache the first photo taken by the first camera and the second camera;

将第一摄像头及第二摄像头拍摄的其他照片与相应摄像头拍摄的第一张照片的差异化数据缓存。Cache the differential data of other photos taken by the first camera and the second camera and the first photo taken by the corresponding camera.

所述的拍照方法,其中,在缓存信息中加入标志位,当查找出与相应摄像头拍摄的第一张照片差异化最小的照片时,则将标志位置位。In the photographing method described above, a flag is added to the cache information, and when the photo with the smallest difference from the first photo taken by the corresponding camera is found, the flag is set.

所述的拍照方法,其中,在获取两张目标照片后,判断目标照片的清晰度是否在合格阈值内,当是时,将两张目标照片合成为一张照片。In the photographing method described above, after acquiring the two target photos, it is judged whether the sharpness of the target photo is within the qualified threshold, and if yes, the two target photos are synthesized into one photo.

一种拍照装置,其中,包括:A photographing device, including:

照片捕获模块,用于在进行拍照时,第一摄像头及第二摄像头同时开启,并分别连续拍摄若干张照片,并记录各张照片拍摄时的时间戳;The photo capture module is used to open the first camera and the second camera at the same time when taking pictures, and take several photos continuously respectively, and record the time stamp when each photo is taken;

照片合成模块,用于查找出第一摄像头或第二摄像头拍摄的差异化最小的两张照片作为比对照片,并根据这两张比对照片的时间戳获取对应的第二摄像头或第一摄像头拍摄的两张照片作为目标照片,并将两张目标照片合成为一张照片,再进行显示。The photo synthesis module is used to find out the two photos with the least difference taken by the first camera or the second camera as the comparison photos, and obtain the corresponding second camera or the first camera according to the time stamps of the two comparison photos The two photos taken are used as the target photos, and the two target photos are combined into one photo, and then displayed.

所述的拍照装置,其中,所述照片捕获模块具体包括:The photographing device, wherein the photo capture module specifically includes:

缓存单元,用于将第一摄像头及第二摄像头拍摄的若干张照片按照预定规则进行缓存得到缓存信息。The cache unit is configured to cache several photos taken by the first camera and the second camera according to predetermined rules to obtain cache information.

所述的拍照装置,其中,所述缓存单元具体包括:The photographing device, wherein the cache unit specifically includes:

完整缓存子单元,用于将第一摄像头及第二摄像头拍摄的第一张照片进行完整缓存;A full cache subunit, configured to fully cache the first photo taken by the first camera and the second camera;

部分缓存子单元,用于将第一摄像头及第二摄像头拍摄的其他照片与相应摄像头拍摄的第一张照片的差异化数据缓存。A part of the cache subunit is used for caching the differentiated data of other photos taken by the first camera and the second camera and the first photo taken by the corresponding camera.

所述的拍照装置,其中,所述缓存单元还包括:The photographing device, wherein the cache unit also includes:

标志位设置子单元,用于当查找出与相应摄像头拍摄的第一张照片差异化最小的照片时,则将标志位置位。The flag bit setting subunit is configured to set the flag bit when the photo with the smallest difference from the first photo taken by the corresponding camera is found.

一种移动终端,其中,包括如上所述的拍照装置。A mobile terminal includes the above-mentioned photographing device.

有益效果:本发明在利用一个摄像头进行拍照时,同时开启另一个摄像头同时拍摄照片,在挑选照片时,根据其中一个摄像头拍摄的抖动较小的两张照片的时间戳,来筛选出另一个摄像头拍摄的两张照片,通过进行上述处理,使得最后挑选合成的照片抖动最小,质量最佳。Beneficial effects: when using one camera to take pictures, the present invention simultaneously turns on another camera to take photos at the same time, and when selecting photos, the other camera is screened out according to the time stamps of the two photos with less jitter taken by one of the cameras Through the above-mentioned processing of the two photos taken, the finally selected and synthesized photo has the least shake and the best quality.

附图说明Description of drawings

图1为本发明一种拍照方法较佳实施例的流程图。Fig. 1 is a flowchart of a preferred embodiment of a photographing method of the present invention.

图2为本发明的拍照方法较佳实施例的模型图。Fig. 2 is a model diagram of a preferred embodiment of the photographing method of the present invention.

图3为本发明的拍照方法较佳实施例中缓存信息存储格式示意图。Fig. 3 is a schematic diagram of a storage format of cached information in a preferred embodiment of the photographing method of the present invention.

图4为本发明的拍照方法较佳实施例中照片缓存时的流程图。Fig. 4 is a flow chart of photo buffering in a preferred embodiment of the photographing method of the present invention.

图5为本发明的拍照方法较佳实施例中照片处理时的流程图。Fig. 5 is a flowchart of photo processing in a preferred embodiment of the photographing method of the present invention.

图6为本发明的拍照装置较佳实施例的结构框图。Fig. 6 is a structural block diagram of a preferred embodiment of the photographing device of the present invention.

具体实施方式Detailed ways

本发明提供一种拍照方法、装置及移动终端,为使本发明的目的、技术方案及效果更加清楚、明确,以下对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。The present invention provides a photographing method, device and mobile terminal. In order to make the purpose, technical solution and effect of the present invention clearer and clearer, the present invention will be further described in detail below. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

请参阅图1,图1为本发明一种拍照方法较佳实施例的流程图,如图所示,其包括步骤:Please refer to Fig. 1, Fig. 1 is a flow chart of a preferred embodiment of a photographing method of the present invention, as shown in the figure, it includes steps:

S101、在进行拍照时,第一摄像头及第二摄像头同时开启,并分别连续拍摄若干张照片,并记录各张照片拍摄时的时间戳;S101. When taking pictures, the first camera and the second camera are turned on at the same time, and several pictures are taken continuously respectively, and the time stamps when each picture is taken are recorded;

S102、查找出第一摄像头或第二摄像头拍摄的差异化最小的两张照片作为比对照片,并根据这两张比对照片的时间戳获取对应的第二摄像头或第一摄像头拍摄的两张照片作为目标照片,并将两张目标照片合成为一张照片,再进行显示。S102. Find out the two photos with the smallest difference taken by the first camera or the second camera as the comparison photos, and obtain the corresponding two photos taken by the second camera or the first camera according to the time stamps of the two comparison photos The photo is used as the target photo, and the two target photos are synthesized into one photo, and then displayed.

在本实施例中,在进行拍照时,同时开启两个摄像头:第一摄像头及第二摄像头,本发明实施例就是利用这两个摄像头来同时拍摄照片,然后根据其中一个摄像头拍摄的差异化最小的相邻两张照片,来获取另一个摄像头拍摄对应的两张照片作为目标照片,再将两张目标照片合成为一张照片进行显示。In this embodiment, when taking pictures, two cameras are turned on at the same time: the first camera and the second camera. In this embodiment of the invention, these two cameras are used to take pictures at the same time, and then the difference taken by one of the cameras is the smallest. Two adjacent photos of the camera are used to obtain two corresponding photos taken by another camera as the target photo, and then the two target photos are synthesized into one photo for display.

较佳的,所述的第一摄像头及第二摄像头分别为前置摄像头及后置摄像头,因为目前的大多数移动终端例如手机都具有前后两个摄像头,本发明实施例利用这些现有的装置来优化拍照方法,有利于推广使用。Preferably, the first camera and the second camera are respectively a front camera and a rear camera, because most current mobile terminals such as mobile phones have two front and rear cameras, and the embodiment of the present invention utilizes these existing devices To optimize the method of taking pictures, which is conducive to popularization and use.

这样,在利用后置摄像头进行拍照时,前置摄像头会在后台同步打开,拍照模型如图2所示,移动终端(B)中后置摄像头的捕获的景物范围会随着与景物(A)的距离增大而增加。通常来说,后置摄像头与景物的距离较远,而前置摄像头与拍摄时的人体或其他物体相距较近,并且前置摄像头像素一般也比后置摄像头低,所以当景物与终端距离比终端与人体距离大时,前置摄像头所捕获的图像信息量比后置摄像头的小,那么拍照时,前置摄像头与后置摄像头同时打开进行拍照时,通过筛选出前置摄像头拍摄的抖动较小(即差异化较小)的两张照片,并根据这两张照片的时间戳获取到同一时间戳的后置摄像头所拍摄的两张照片,这两张照片也是后置摄像头抖动较小的两张照片,即为较理想的照片组,最后将这两张照片进行合成处理,获得一张最优选的照片,即挑选出最佳的一张照片。由于在此实施例中,是通过筛选前置摄像头所拍摄的照片进而获取后置摄像头拍摄的较佳的照片,因而其数据处理量相比直接通过后置摄像头进行筛选时的数据处理量小的多,分析量也是最小的,算法处理更快,所以既能保证筛选到较佳的照片,又能保证快速处理。In this way, when using the rear camera to take pictures, the front camera will be turned on synchronously in the background, and the camera model is shown in Figure 2. increases as the distance increases. Generally speaking, the distance between the rear camera and the scene is relatively long, while the distance between the front camera and the human body or other objects during shooting is relatively close, and the pixels of the front camera are generally lower than those of the rear camera. When the distance between the terminal and the human body is large, the amount of image information captured by the front camera is smaller than that of the rear camera, so when taking pictures, when the front camera and the rear camera are turned on at the same time to take pictures, the jitter captured by the front camera is filtered out. Two photos that are small (that is, less differentiated), and obtain two photos taken by the rear camera with the same timestamp according to the timestamps of these two photos, and these two photos are also the ones with less shake of the rear camera The two photos are an ideal photo group. Finally, the two photos are combined to obtain the most optimal photo, that is, the best photo is selected. Since in this embodiment, the better photos taken by the rear camera are obtained by filtering the photos taken by the front camera, the amount of data processing is smaller than the data processing amount when filtering directly through the rear camera More, the amount of analysis is also the smallest, and the algorithm processing is faster, so it can not only ensure that the best photos are screened, but also ensure fast processing.

在利用前置摄像头进行拍照时,后置摄像头会在后台同步打开,此时,后置摄像头与景物距离较远,从图2中的拍照模型可知,后置摄像头捕获的图像抖动会比前置摄像头大,因此,只需要获取到后置摄像头拍摄的稳定的照片,即可得到前置摄像头拍摄的更稳定的照片,利用这一原理,同样利用两个摄像头同时拍摄照片,再获取到后置摄像头拍摄的抖动较小的两张照片,再根据这两张照片的时间戳获取到同一时间戳的前置摄像头拍摄的两张照片作为目标照片,最后进行合成处理,获得最优化的照片。为了提高数据处理速度,在此实施例中,更优选的是在后置摄像头进行拍摄时,只对一参照物进行拍摄,后置摄像头可自动对具有明显特征的景物进行拍摄,并自动对该参照物进行对焦拍摄,而不是拍摄全景照片,这样更有利于提高处理速度,且由于用户此时并不是利用后置摄像头进行拍摄,所以也无需拍摄全景照片,只需选取后置摄像头正对其中一个参照物进行对焦拍摄即可,其所拍摄图像的信息量将比全景拍摄小很多,处理速度也相应加快,而整个后置摄像头的处理过程并不在界面上显示,所以对用户来说,还是前置摄像头拍摄。通过这样的处理过程,就能保证前置摄像头拍摄的照片既能得到抖动最小的照片,又能保证较佳的用户体验。When using the front camera to take pictures, the rear camera will be turned on synchronously in the background. At this time, the distance between the rear camera and the scene is far away. From the camera model in Figure 2, we can see that the image captured by the rear camera will shake more than the front camera. The camera is large, so you only need to obtain stable photos taken by the rear camera to get more stable photos taken by the front camera. Using this principle, you can also use two cameras to take photos at the same time, and then get them to the rear The camera takes two photos with less jitter, and then obtains the two photos taken by the front camera with the same timestamp according to the timestamps of the two photos as the target photos, and finally performs composite processing to obtain the optimized photo. In order to improve the data processing speed, in this embodiment, it is more preferable that only one reference object is photographed when the rear camera is photographed, and the rear camera can automatically photograph the scene with obvious features, and automatically Focusing on the reference object instead of taking a panoramic photo is more conducive to improving the processing speed, and since the user is not using the rear camera to shoot at this time, there is no need to take a panoramic photo, just select the rear camera to face it A reference object can be used for focusing and shooting, and the amount of information in the captured image will be much smaller than that of panoramic shooting, and the processing speed will be correspondingly accelerated. However, the processing process of the entire rear camera is not displayed on the interface, so for users, it is still Shot by the front camera. Through such a processing process, it can be ensured that the photos taken by the front camera can not only obtain the photos with the least jitter, but also ensure a better user experience.

作为本发明更优选的实施例,在第一摄像头及第二摄像头同时捕获照片时还包括步骤:As a more preferred embodiment of the present invention, when the first camera and the second camera simultaneously capture photos, steps are also included:

将第一摄像头及第二摄像头捕获的若干张照片按照预定规则进行缓存得到缓存信息。The several photos captured by the first camera and the second camera are cached according to predetermined rules to obtain cache information.

即将第一摄像头及第二摄像头捕获的若干张照片按照某种方式进行缓存,从而获得缓存信息即保存的照片信息,以便在之后查找出其中一个摄像头差异化最小的两张照片,并根据这两张照片的时间戳获取到另一个摄像头拍摄的两张照片。That is, several photos captured by the first camera and the second camera are cached in a certain way, so as to obtain the cached information, that is, the saved photo information, so as to find out the two photos with the smallest difference between one of the cameras later, and based on these two Two photos taken by another camera are obtained by using the time stamp of the first photo.

对于缓存的方式,可以采用对每张照片进行完整缓存的方式,但这种方式要求较大的缓存空间,并且会影响后续算法处理速度,本发明更优选的方式是:For the way of caching, it is possible to adopt the method of carrying out a complete cache for each photo, but this way requires a large cache space and will affect the processing speed of subsequent algorithms. The more preferred way of the present invention is:

将第一摄像头及第二摄像头捕获的第一张照片进行完整缓存;Complete cache of the first photo captured by the first camera and the second camera;

将第一摄像头及第二摄像头捕获的其他照片与相应摄像头捕获的第一张照片的差异化数据缓存。Cache the differential data of other photos captured by the first camera and the second camera and the first photo captured by the corresponding camera.

即将两个摄像头拍摄的第一张照片进行完整的缓存,即缓存两张照片的完整数据,而之后拍摄的其他照片,则只缓存与相应摄像头拍摄的第一张照片之间的差异化数据,比如第一摄像头缓存第一张照片的完整数据,同时缓存第二张照片与第一张照片之间的差异化数据,以及后续的第三、第四…与第一张照片之间的差异化数据,第二摄像头同理。The first photo taken by the two cameras will be fully cached, that is, the complete data of the two photos will be cached, and other photos taken after that will only be cached. Differential data between the first photo taken by the corresponding camera, For example, the first camera caches the complete data of the first photo, and at the same time caches the difference data between the second photo and the first photo, and the difference between the subsequent third, fourth... and the first photo data, the same goes for the second camera.

其中的差异化数据是指两张照片之间的像素差异数据以及清晰度差异数据。The difference data refers to pixel difference data and definition difference data between two photos.

这样能最大化的减少缓存的信息量,加快后续的算法处理速度,又不影响后续的照片合成等处理过程。In this way, the amount of cached information can be minimized, and the subsequent algorithm processing speed can be accelerated without affecting the subsequent photo synthesis and other processing processes.

同时上述缓存方式还有利于后续的照片查找及筛选,在查找照片时,优选将相应摄像头拍摄的第一张照片以及与该第一张照片差异化最小的照片查找出来,即将第一张照片以及与该第一张照片差异化最小的照片作为比对照片;因为第一张照片往往是用户最想要拍摄的场景,但由于第一张照片效果可能并不是最佳,所以需要将与其抖动最小的照片查找出来,由于采用上述缓存方式,就能快速查找到与第一张照片之间差异化最小的照片,即本实施例中的两张比对照片,其中一张为其中一个摄像头拍摄的第一张照片,另外一张为筛选出的与之差异化最小的照片,两张目标照片,其中一张为另外一个摄像头拍摄的第一张照片,另外一张为筛选出的照片对应时间戳的照片,在后续实施例中,为方便说明,只将筛选出的比对照片称为比对照片(非第一张照片),将对应的目标照片作为目标照片(非第一张照片)。At the same time, the above-mentioned caching method is also conducive to subsequent photo search and screening. When searching for photos, it is preferred to find the first photo taken by the corresponding camera and the photo with the smallest difference from the first photo, that is, the first photo and the first photo. The photo with the smallest difference from the first photo is used as the comparison photo; because the first photo is often the scene that the user most wants to shoot, but because the effect of the first photo may not be the best, it is necessary to minimize the jitter with it The photo is found out, because the above-mentioned caching method is adopted, the photo with the smallest difference from the first photo can be quickly found, that is, the two comparison photos in this embodiment, one of which is taken by one of the cameras The first photo, the other is the selected photo with the least difference, two target photos, one of which is the first photo taken by another camera, and the other is the time stamp corresponding to the filtered photo In the subsequent embodiments, for convenience of description, only the selected comparison photos are referred to as comparison photos (not the first photo), and the corresponding target photos are used as target photos (not the first photo).

至于两个摄像头拍摄照片的数量,可以依据终端设备的配置情况和所拍摄对象的移动速度进行调整,例如对于处理器速度较快的终端,可以多拍摄几张照片,移动速度较快的拍摄对象,则适当较少拍摄张数。As for the number of photos taken by the two cameras, it can be adjusted according to the configuration of the terminal equipment and the moving speed of the subject. For example, for a terminal with a faster processor, you can take a few more photos. , the number of shots is appropriately reduced.

较佳的,在具体实施时,可以以列表的形式缓存两个摄像头拍摄的照片信息,如图3所示,在列表中以拍摄先后顺序记录每张照片的时间戳,同时记录两个摄像头(前置摄像头简称前摄,后置摄像头简称后摄)在各时间戳拍摄的第一张照片完整数据以及之后的差异化数据。这样根据该时间戳就能更快的定位到两个摄像头拍摄的照片信息。Preferably, during specific implementation, the photo information taken by the two cameras can be cached in the form of a list, as shown in Figure 3, the time stamps of each photo are recorded in the list in order of shooting, and the two cameras ( The front camera is referred to as the front camera, and the rear camera is referred to as the rear camera) The complete data of the first photo taken at each time stamp and the differentiated data after that. In this way, the photo information taken by the two cameras can be located more quickly according to the time stamp.

较佳的,在缓存信息中加入标志位,即在该列表中加入标志位,每一摄像头在每一时间戳下具有一个标志位,例如前置摄像头在时刻1时拍摄的照片的标志位为A1,在时刻2的为A2,…,在时刻n的为An;后置摄像头在时刻1时拍摄的照片的标志位为B1,在时刻2的为B2,…,在时刻n的为Bn;那么在查找出第一摄像头或第二摄像头拍摄的与相应摄像头拍摄的第一张照片差异化最小的比对照片时,则将该比对照片对应的标志位置位,这样在找到该比对照片时,根据标志位就能快速定位到对应的时间戳,并根据时间戳找到另外一个摄像头拍摄的目标照片,对于第一张照片直接取出即可。Preferably, a flag is added to the cache information, that is, a flag is added to the list, and each camera has a flag at each time stamp. For example, the flag of the photo taken by the front camera at time 1 is A1, at time 2 is A2,..., at time n is An; the flag of the photo taken by the rear camera at time 1 is B1, at time 2 is B2,..., at time n is Bn; Then when finding out the comparison photo with the smallest difference between the first photo taken by the first camera or the second camera and the first photo taken by the corresponding camera, the corresponding flag position of the comparison photo is set, so that when the comparison photo is found , the corresponding time stamp can be quickly located according to the flag, and the target photo taken by another camera can be found according to the time stamp, and the first photo can be directly taken out.

如图4所示,其为后置摄像头在照片缓存时一个较佳实施例的流程图:As shown in Figure 4, it is a flowchart of a preferred embodiment when the rear camera is caching photos:

S201、初始化M=1;S201, initialize M=1;

S202、将后置摄像头拍摄的第一张照片进行完整缓存,并将标志位B1清理;S202. Completely cache the first photo taken by the rear camera, and clear the flag B1;

S203、将M加1:M=M+1;S203. Add 1 to M: M=M+1;

S204、将第M张照片与第一张照片之间的差异化数据进行缓存;S204. Cache the difference data between the Mth photo and the first photo;

S205、判断该差异化数据的值是否小于差异阈值,当是时执行步骤S206,否则执行步骤S207;例如将该差异化数据量化,求取该差异化数据与第一张照片完整数据的百分比,然后将该百分比与差异阈值进行比较,判断孰大孰小。S205. Judging whether the value of the differential data is less than the difference threshold, if so, execute step S206, otherwise execute step S207; for example, quantify the differential data, and calculate the percentage of the differential data and the complete data of the first photo, This percentage is then compared to a difference threshold to determine which is greater and which is less.

S206、将标志位BM置位,再执行步骤S208;S206, set the flag bit BM, and then execute step S208;

S207、将标志位BM清零,再执行步骤S208;S207, clear the flag bit BM, and then execute step S208;

S208、判断M是否小于或等于N,当是时,返回步骤S203,否则进入步骤S209;其中的N代表前置摄像头拍摄的照片张数,或者后置摄像头拍摄的照片张数(前置摄像头拍摄的照片张数与后置摄像头拍摄的照片张数相同)。S208, judge whether M is less than or equal to N, when yes, return to step S203, otherwise enter step S209; wherein N represents the number of photos taken by the front camera, or the number of photos taken by the rear camera (shot by the front camera) The number of photos is the same as the number of photos taken by the rear camera).

S209、照片缓存结束。S209, the photo cache ends.

作为本发明更优选的实施例,在获取目标照片(非第一张照片)后,还要判断该目标照片的清晰度是否在合格阈值内,当是时,将该目标照片与第一张照片合成为一张照片。As a more preferred embodiment of the present invention, after obtaining the target photo (not the first photo), it is also necessary to judge whether the sharpness of the target photo is within the qualified threshold, and if so, compare the target photo with the first photo combined into one photo.

在获取到目标照片后,还要分析该目标照片是否符合清晰度要求,因为根据本发明实施例的方法所筛选出的照片只是抖动较小的照片,但并不一定都符合清晰度的要求,所以还需要进行筛选,只有目标照片的清晰度在合格阈值内,才将目标照片与第一张照片合成为一张照片。对于不符合要求的情况,则将该目标照片以及与之对应的比对照片缓存的差异化数据删除,并需要重新筛选出第一摄像头或第二摄像头拍摄的与第一张照片差异化最小的比对照片,然后再根据重新筛选的照片的时间戳来获取另外一个摄像头拍摄的目标照片,重新进行判断,只有在符合清晰度要求的情况下,才进行合成处理,使得用户获取到符合要求的照片。After obtaining the target photo, it is also necessary to analyze whether the target photo meets the definition requirement, because the photos screened out according to the method of the embodiment of the present invention are only photos with less jitter, but they do not necessarily all meet the definition requirement. Therefore, screening is still required, and only when the resolution of the target photo is within the qualified threshold, the target photo and the first photo are combined into one photo. If the requirements are not met, delete the target photo and the difference data of the corresponding comparison photo cache, and re-screen out the image with the smallest difference from the first photo taken by the first camera or the second camera Compare the photos, and then obtain the target photos taken by another camera according to the time stamp of the re-screened photos, and make a new judgment. Only when the definition requirements are met, the synthesis process is performed, so that the user can obtain the required photos. photo.

如图5所示,其为步骤S102中拍照处理流程的一个较佳实施例的具体流程图:As shown in Figure 5, it is a specific flow chart of a preferred embodiment of the photographing process in step S102:

S301、后置摄像头开始拍照;S301, the rear camera starts to take pictures;

S302、前置摄像头同时在后台启动,前置摄像头与后置摄像头同步采集N张照片进行缓存;S302, the front camera starts simultaneously in the background, and the front camera and the rear camera synchronously collect N photos for buffering;

S303、从前置摄像头所拍摄的照片中筛选出与第一张照片差异化最小的照片作为比对照片;S303. From the photos taken by the front camera, select the photo with the smallest difference from the first photo as the comparison photo;

S304、根据该比对照片的时间戳查找对应的后置摄像头拍摄的目标照片;S304, according to the time stamp of the compared photo, search for the target photo taken by the corresponding rear camera;

S305、判断目标照片的清晰度是否在合格阈值内,当是时,进入步骤S306,否则转入步骤S308,删除该目标照片与对应的比对照片的差异化数据,再返回步骤S303重新筛选差异化最小的比对照片;S305. Determine whether the sharpness of the target photo is within the qualified threshold. If so, go to step S306, otherwise go to step S308, delete the difference data between the target photo and the corresponding comparison photo, and then return to step S303 to re-screen the difference Minimize comparison photos;

S306、将目标照片与第一张照片进行合成处理;S306. Synthesize the target photo and the first photo;

S307、拍照结束。S307. The photographing ends.

在合成处理步骤中,可将两张照片进行分块处理,将照片分割成分割区域一致的若干个小块,然后从两张照片中挑选出抖动最小、最清晰的小块重新组合成最优化的照片。在最后的合成处理步骤中,还可以对照片加入一些美化效果,例如添加不同样式的相框、去噪、添加水印等。In the synthesis processing step, the two photos can be divided into blocks, and the photos can be divided into several small blocks with the same segmentation area, and then the smallest and clearest small blocks can be selected from the two photos to recombine into an optimized image. Photo. In the final synthesis processing step, some beautification effects can also be added to the photos, such as adding different styles of photo frames, denoising, adding watermarks, etc.

基于上述方法,本发明还提供一种拍照装置,如图6所示,其包括:Based on the above method, the present invention also provides a photographing device, as shown in Figure 6, which includes:

照片捕获模块100,用于在进行拍照时,第一摄像头及第二摄像头同时开启,并分别连续拍摄若干张照片,并记录各张照片拍摄时的时间戳;The photo capture module 100 is used to open the first camera and the second camera at the same time when taking pictures, and take several photos continuously respectively, and record the time stamp when each photo is taken;

照片合成模块200,用于查找出第一摄像头或第二摄像头拍摄的差异化最小的两张照片作为比对照片,并根据这两张比对照片的时间戳获取对应的第二摄像头或第一摄像头拍摄的两张照片作为目标照片,并将两张目标照片合成为一张照片,再进行显示。The photo synthesis module 200 is configured to find out the two photos with the smallest difference taken by the first camera or the second camera as comparison photos, and obtain the corresponding second camera or first photo according to the time stamps of the two comparison photos. The two photos taken by the camera are used as the target photos, and the two target photos are synthesized into one photo, and then displayed.

进一步,所述照片捕获模块100具体包括:Further, the photo capture module 100 specifically includes:

缓存单元,用于将第一摄像头及第二摄像头拍摄的若干张照片按照预定规则进行缓存得到缓存信息。The cache unit is configured to cache several photos taken by the first camera and the second camera according to predetermined rules to obtain cache information.

进一步,所述缓存单元具体包括:Further, the cache unit specifically includes:

完整缓存子单元,用于将第一摄像头及第二摄像头拍摄的第一张照片进行完整缓存;A full cache subunit, configured to fully cache the first photo taken by the first camera and the second camera;

部分缓存子单元,用于将第一摄像头及第二摄像头拍摄的其他照片与相应摄像头拍摄的第一张照片的差异化数据缓存。A part of the cache subunit is used for caching the differentiated data of other photos taken by the first camera and the second camera and the first photo taken by the corresponding camera.

进一步,所述缓存单元还包括:Further, the cache unit also includes:

标志位设置子单元,用于当查找出与相应摄像头拍摄的第一张照片差异化最小的照片时,则将标志位置位。The flag bit setting subunit is configured to set the flag bit when the photo with the smallest difference from the first photo taken by the corresponding camera is found.

进一步,所述照片合成模块200还包括:Further, the photo synthesis module 200 also includes:

判断单元,用于在获取两张目标照片后,判断目标照片的清晰度是否在合格阈值内,当是时,将两张目标照片合成为一张照片。The judging unit is configured to judge whether the sharpness of the target photo is within a qualified threshold after acquiring the two target photos, and if yes, combine the two target photos into one photo.

关于上述模块单元的技术细节在前面的方法中已有详述,故不再赘述。The technical details about the above-mentioned modular units have been described in detail in the previous method, so they will not be repeated here.

基于上述拍照装置,本发明还提供一种移动终端,其包括如上所述的拍照装置。该移动终端可以是手机或平板电脑等便携式智能设备。Based on the above photographing device, the present invention further provides a mobile terminal, which includes the above photographing device. The mobile terminal can be a portable smart device such as a mobile phone or a tablet computer.

综上所述,本发明在利用一个摄像头进行拍照时,同时开启另一个摄像头同时捕获照片,在挑选照片时,根据其中一个摄像头拍摄的抖动较小的两张照片的时间戳,来筛选出另一个摄像头拍摄的两张照片,通过进行上述处理,使得最后挑选合成的照片抖动最小,质量最佳。To sum up, in the present invention, when one camera is used to take pictures, the other camera is turned on at the same time to capture the photos, and when the photos are selected, the time stamps of the two photos with less jitter taken by one of the cameras are used to filter out the other photos. Two photos taken by a camera, through the above-mentioned processing, make the finally selected and synthesized photos shake the least and have the best quality.

应当理解的是,本发明的应用不限于上述的举例,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,所有这些改进和变换都应属于本发明所附权利要求的保护范围。It should be understood that the application of the present invention is not limited to the above examples, and those skilled in the art can make improvements or transformations according to the above descriptions, and all these improvements and transformations should belong to the protection scope of the appended claims of the present invention.

Claims (10)

CN201410278405.1A2014-06-202014-06-20A kind of photographic method, device and mobile terminalActiveCN105282455B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201410278405.1ACN105282455B (en)2014-06-202014-06-20A kind of photographic method, device and mobile terminal

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201410278405.1ACN105282455B (en)2014-06-202014-06-20A kind of photographic method, device and mobile terminal

Publications (2)

Publication NumberPublication Date
CN105282455A CN105282455A (en)2016-01-27
CN105282455Btrue CN105282455B (en)2018-06-19

Family

ID=55150689

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201410278405.1AActiveCN105282455B (en)2014-06-202014-06-20A kind of photographic method, device and mobile terminal

Country Status (1)

CountryLink
CN (1)CN105282455B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105827964B (en)*2016-03-242019-05-17维沃移动通信有限公司 An image processing method and mobile terminal
CN107395967A (en)*2017-07-202017-11-24深圳市欧唯科技有限公司Image processing method and its system based on more exposure fusions with backtracking algorithm
CN108810201B (en)*2018-06-042020-07-17Oppo广东移动通信有限公司Electronic device and method for taking photo by using same
CN109089053B (en)*2018-10-232021-03-05Oppo广东移动通信有限公司Image transmission method, image transmission device, electronic equipment and storage medium
CN113477550B (en)*2021-08-242024-11-22安徽顺鼎阿泰克科技有限公司 Glass bottle spraying line material feeding level detection method and device
CN115580689B (en)*2022-11-302023-03-10武汉凡德智能科技有限公司Synchronous synthesis method and device for multiple cameras to collect moving target side photos

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP2007036363A (en)*2005-07-222007-02-08Sharp Corp Imaging device
CN1941851A (en)*2005-09-302007-04-04三洋电机株式会社Image taking apparatus and program
CN101444084A (en)*2006-05-092009-05-27夏普株式会社 camera device
CN101656829A (en)*2008-08-212010-02-24英华达(上海)电子有限公司Digital photographic device and anti-shake method thereof
JP2010103694A (en)*2008-10-222010-05-06Seiko Precision IncCamera with translation function, and method of displaying text
CN102393796A (en)*2011-07-252012-03-28金宇Control method based on winking-characteristic extraction and shooting spectacles based on the same

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP2007036363A (en)*2005-07-222007-02-08Sharp Corp Imaging device
CN1941851A (en)*2005-09-302007-04-04三洋电机株式会社Image taking apparatus and program
CN101444084A (en)*2006-05-092009-05-27夏普株式会社 camera device
CN101656829A (en)*2008-08-212010-02-24英华达(上海)电子有限公司Digital photographic device and anti-shake method thereof
JP2010103694A (en)*2008-10-222010-05-06Seiko Precision IncCamera with translation function, and method of displaying text
CN102393796A (en)*2011-07-252012-03-28金宇Control method based on winking-characteristic extraction and shooting spectacles based on the same

Also Published As

Publication numberPublication date
CN105282455A (en)2016-01-27

Similar Documents

PublicationPublication DateTitle
CN105282455B (en)A kind of photographic method, device and mobile terminal
CN106937039B (en)Imaging method based on double cameras, mobile terminal and storage medium
CN105100615B (en) Image preview method, device and terminal
CN110324532B (en) An image blurring method, device, storage medium and electronic device
CN108898567A (en)Image denoising method, apparatus and system
KR20210110499A (en)Method and apparatus for obtaining sample image set
CN103780839B (en)A kind of photographic method and photo terminal
CN105578061A (en) A method, device and mobile terminal for anti-shake taking pictures
US9179091B2 (en)Avoiding flash-exposed frames during video recording
CN112017137B (en)Image processing method, device, electronic equipment and computer readable storage medium
CN105049695A (en)Video recording method and device
CN106231200B (en)A kind of photographic method and device
CN114143471B (en)Image processing method, system, mobile terminal and computer readable storage medium
WO2017128750A1 (en)Image collection method and image collection device
CN104506775A (en)Image collection jitter removing method and device based on stereoscopic visual matching
CN108513069A (en)Image processing method, image processing device, storage medium and electronic equipment
CN108259767B (en)Image processing method, image processing device, storage medium and electronic equipment
CN108513057A (en) Image processing method and device
CN105120153B (en)A kind of image capturing method and device
CN117642771A (en)Photographic image processing method and device
CN112188095B (en)Photographing method, photographing device and storage medium
CN105516594A (en) Image capturing method and device
CN118118782A (en) Image processing method, image processing device and storage medium
JP2017184021A (en) Content providing apparatus and content providing program
CN108431867B (en) A data processing method and terminal

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
TR01Transfer of patent right
TR01Transfer of patent right

Effective date of registration:20250723

Address after:518100 Guangdong Province Shenzhen City Bao'an District Xixiang Street Taoyuan Community Hangcheng Industrial Park Shenzhen Zhihui Innovation Center Building A 3A20

Patentee after:Shenzhen Lingxiu Electronic Technology Co.,Ltd.

Country or region after:China

Address before:518057 South Mountain High-tech Industrial Park North District, Shenzhen City, Guangdong Province, 1 Kupai Information Port, 6 floors

Patentee before:YULONG COMPUTER TELECOMMUNICATION SCIENTIFIC (SHENZHEN) Co.,Ltd.

Country or region before:China


[8]ページ先頭

©2009-2025 Movatter.jp