WO2019071548A1 - Terminal photograph capturing control method, mobile terminal, and readable storage medium - Google Patents

Terminal photograph capturing control method, mobile terminal, and readable storage medium Download PDF

Info

Publication number
WO2019071548A1
WO2019071548A1 PCT/CN2017/105969 CN2017105969W WO2019071548A1 WO 2019071548 A1 WO2019071548 A1 WO 2019071548A1 CN 2017105969 W CN2017105969 W CN 2017105969W WO 2019071548 A1 WO2019071548 A1 WO 2019071548A1
Authority
WO
WIPO (PCT)
Prior art keywords
preview image
terminal
control method
aspect ratio
photo
Prior art date
Application number
PCT/CN2017/105969
Other languages
French (fr)
Chinese (zh)
Inventor
张学熙
Original Assignee
深圳传音通讯有限公司
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 深圳传音通讯有限公司 filed Critical 深圳传音通讯有限公司
Priority to PCT/CN2017/105969 priority Critical patent/WO2019071548A1/en
Priority to CN201780095919.5A priority patent/CN111213363A/en
Publication of WO2019071548A1 publication Critical patent/WO2019071548A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to a terminal photographing control method.
  • the camera function of the mobile terminal is one of the most commonly used functions of the user, and the special wide and high ratio camera mode such as the square photo is obviously different from the photo effect taken by the current mainstream 16:9 or 4:3 size photo mode.
  • the preview image stored in the mobile terminal cache needs to be reloaded to adjust the aspect ratio of the preview image, and the process of reloading the preview image will produce an obvious jam, especially When the user takes a photo using the no-delay mode, the normal use of the user is adversely affected, thereby reducing the user experience.
  • the main purpose of the present invention is to provide a terminal photographing control method, which aims to solve the problem of jamming caused by the need to reload the preview image when the photographing mode is switched when the photographing is performed using the mobile terminal.
  • the present invention provides a terminal photographing control method, and the terminal photographing control method includes the following steps:
  • the preset image edge region of the preview image in the terminal buffer is occluded
  • the preset edge area in the preview image is cropped to obtain the target photo corresponding to the mode switching instruction.
  • the step of occluding the preview image preset edge region stored in the terminal cache includes:
  • the shooting parameter of the terminal photographing mode is updated according to the mode switching instruction
  • the preset edge area in the preview image in the terminal buffer is determined, and the preview image preset edge area is occluded.
  • the determining, according to the aspect ratio in the updated shooting parameters, the determining the preset edge region in the preview image in the terminal cache includes:
  • the geometric center as a geometric center, generating a geometric shape in which the width of the preview image is a width and the length satisfies the aspect ratio of the shooting;
  • the generated geometry is compared with the preview image, and the area in which the preview image is not in the geometry is set as the preset edge area.
  • the comparing the generated geometric figure with the preview image, and the step of the preview image not being in the geometric figure being the preset edge area comprises:
  • the edge area is not displayed when it is displayed.
  • the step of cutting the preset edge region in the preview image to obtain the target photo corresponding to the mode switching instruction includes:
  • the aspect ratio of the preview image is made to satisfy the aspect ratio of the target photograph by trimming the preset edge region.
  • the step of trimming the preset edge region such that the aspect ratio of the preview image satisfies the aspect ratio of the target photo includes:
  • the step of compressing the trimmed preview image to generate a target photo in a preset format and saving the method includes:
  • the target photo is sent to a third-party application for processing and the returned photo is saved.
  • the present invention further provides a mobile terminal, where the mobile terminal includes: a memory, a processor, and a terminal photographing control method program stored on the memory and operable on the processor, where The steps of the terminal photographing control method method as described above are implemented when the terminal photographing control method program is executed by the processor.
  • the present invention further provides a computer readable storage medium, the terminal photographing control method program stored on the computer readable storage medium, and the terminal photographing control method program is implemented by the processor as described above The steps of the method for controlling the terminal photographing method.
  • the terminal photographing control method proposed by the invention can process the squared mode aspect ratio by occluding the already stored preview image in the cache when the user is in the no-delay photographing mode and switching the square mode. Instead of reloading the preview image of the square mode aspect ratio, the mobile terminal does not cause a jam due to reloading the preview image, and the user is photographed by cropping and adjusting the preview image to the square mode configuration.
  • the square photo allows the user to use the square photo more smoothly and smoothly, which improves the user experience.
  • FIG. 1 is a schematic structural diagram of a terminal/device in a hardware operating environment according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of an embodiment of a method for controlling a terminal of a terminal according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of the steps of the step S20 in another embodiment of the terminal photographing control method according to the present invention.
  • FIG. 4 is a schematic diagram of a scene for cropping a preview image according to a terminal photographing control method of the present invention.
  • FIG. 1 is a schematic structural diagram of a terminal in a hardware operating environment according to an embodiment of the present invention.
  • the terminal of the embodiment of the invention may also be a smart phone, a tablet computer, an e-book reader, and an MP3 (Moving Picture) Experts Group Audio Layer III, Motion Picture Expert Compress Standard Audio Level 3) Player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video experts compress standard audio layers 3) Players, portable computers and other portable terminal devices with display functions.
  • MP3 Moving Picture
  • MP4 Moving Picture Experts Group Audio Layer IV, dynamic video experts compress standard audio layers 3 Players
  • the terminal may include a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection communication between these components.
  • the user interface 1003 can include a display, an input unit such as a keyboard, and the optional user interface 1003 can also include a standard wired interface, a wireless interface.
  • the network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage.
  • the memory 1005 can also optionally be a storage device independent of the aforementioned processor 1001.
  • the terminal may further include a camera, RF (Radio) Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more.
  • sensors such as light sensors, motion sensors, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display according to the brightness of the ambient light, and the proximity sensor may turn off the display and/or when the mobile terminal moves to the ear. Backlighting.
  • the gravity acceleration sensor can detect the magnitude of acceleration in each direction (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. No longer.
  • terminal structure shown in FIG. 1 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
  • a memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a square mode photographing program.
  • the network interface 1004 is mainly used to connect to the background server and perform data communication with the background server;
  • the user interface 1003 is mainly used to connect the client (user end), and perform data communication with the client;
  • the processor 1001 can be used to call a square mode photographing program stored in the memory 1005 and perform the following operations:
  • the preview image stored in the cache is occluded
  • the preview image is cropped and saved.
  • processor 1001 can call the square mode photographing program stored in the memory 1005, and also perform the following operations:
  • the shooting parameter of the terminal photographing mode is updated according to the mode switching instruction
  • the preset edge area in the preview image in the terminal buffer is determined, and the preview image preset edge area is occluded.
  • the determining, according to the aspect ratio in the updated shooting parameters, the determining the preset edge region in the preview image in the terminal cache includes:
  • the geometric center as a geometric center, generating a geometric shape in which the width of the preview image is a width and the length satisfies the aspect ratio of the shooting;
  • the generated geometry is compared with the preview image, and the area in which the preview image is not in the geometry is set as the preset edge area.
  • the comparing the generated geometric figure with the preview image, and the step of the preview image not being in the geometric figure is set as the preset edge area, and the following steps are:
  • the edge area is not displayed when it is displayed.
  • processor 1001 can call the square mode photographing program stored in the memory 1005, and also perform the following operations:
  • the aspect ratio of the preview image is made to satisfy the aspect ratio of the target photograph by trimming the preset edge region.
  • the step of trimming the preset edge region such that the aspect ratio of the preview image satisfies the aspect ratio of the target photo includes:
  • the step of compressing the trimmed preview image to generate a target photo in a preset format and saving the method includes:
  • the target photo is sent to a third-party application for processing and the returned photo is saved.
  • the step of detecting whether a processing request sent by a third-party application is received includes:
  • the target photo file is saved locally according to the preset path.
  • a first embodiment of the present invention provides a terminal photographing control method, where the terminal photographing control method includes:
  • Step S10 detecting a mode switching instruction of the user input received by the terminal
  • the size ratio of the default photo mode of the mobile terminal is 16:9 or 4:3 (the size ratio of some large-screen mobile terminals is also close to 2:1), and now due to the development and improvement of the photographing technology, More and more special proportion photos have been used, including square photos with an aspect ratio of 1:1, and users can switch the camera mode according to their own preferences and needs during the photo process.
  • the photographing mode is switched, the user inputs a switching instruction by selecting a photographing mode or the like to control the switching of the photographing mode by the mobile terminal.
  • Step S20 If the terminal receives the mode switching instruction, the preset image edge region of the preview image in the terminal buffer is occluded;
  • the preview image stored in the cache also needs to be correspondingly performed, and then since the switching of the photographing mode is only the adjustment of the aspect ratio, the content does not substantially change, and the conventional The way to cache the content is to reload the preview image, but the reloading is too large, which will cause obvious jamming. Therefore, the present invention uses the occlusion processing of the cached image, and the preview image aspect ratio after occlusion is blocked. It is consistent with the aspect ratio of the photo mode, and the photo content is clearly different.
  • Step S30 when receiving the photographing instruction, trimming the preset edge region in the preview image to obtain the target photo corresponding to the mode switching instruction;
  • the preview image is cropped (the occlusion is previewed, so the actual aspect ratio is not changed), the preview image is cropped to the same aspect ratio as the photo mode, and the preview image is compressed into a preset photo format by compression. Finally, save and complete the photo.
  • ZSD zero-latency camera mode
  • the preview image is the currently acquired scene of the camera, and can be roughly regarded as the currently photographable photo, since the preview image needs to be updated. , so the preview image is stored in the cache (because the cache is faster than other storage).
  • the aspect ratio of the photo is different from the default aspect ratio of the mobile terminal (generally, the default ratio is 16:9 or 4:3), so when the square photo mode is selected, Need to adjust multiple parameters.
  • the method used in the prior art is to set the aspect ratio of the preview and the photographing to a ratio of 1:1, and the process of switching the aspect ratio requires first closing the preview image of the original aspect ratio, and re-empting 1: 1 aspect ratio opens the preview image, but since the process of closing the original preview image to opening the new preview image has a large amount of calculation on the system, it will cause obvious jamming phenomenon when used, and the specific use is When the user switches the photo mode, he or she feels that there is a noticeable jam when switching, which greatly damages the user experience.
  • the definition of the obtained screen content assuming that the aspect ratio is 16:9, the user takes a picture of a certain camera setting (including the camera distance such as the focus distance and the aperture size) to obtain a 16-length, 9-meter-wide screen content. If the user switches to the square photo mode and shoots the same position with the same camera settings, the screen content will be 9 meters long. Changing the aspect ratio will also reduce the content acquired in the picture. Why do you still want to do this? For different devices, the larger the aspect ratio, the better.
  • the aspect ratio switching also allows the user to take a photo that highlights a certain problem. For example, when a user takes a photo of a character, the character will be highlighted as much as possible, and one of the ways is to make the character occupy as much as possible. A lot of pictures, so that the main body of the picture is highlighted. But in most cases, for a variety of reasons (assuming the subject is a character, taking a certain distance to capture the panorama of the character, or need to reflect the background image of the person, etc., then the character can only occupy a small part of the picture ), so that when the photo is taken, the screen theme can only occupy a small part of the picture.
  • Switching to a photo mode with a smaller aspect ratio can solve this problem to a certain extent, because the aspect ratio is reduced, so that the content acquired by the photo is correspondingly reduced, and since the size of the character is not reduced, the character is made This picture body is more prominent in the entire picture. Therefore, when shooting a character or having a specific theme, selecting a photo mode with a small aspect ratio helps to highlight the subject of the shot, while photographing the landscape has no obvious theme, and only to highlight the beautiful picture of the picture, it is better to choose the width. High ratio photo mode.
  • the invention does not close the data in the cache when switching the square photo mode, because the data stored in the buffer is the picture content when the width and height are relatively large, and when switching to the square photo mode, since the aspect ratio is The size of the screen will be reduced to a certain extent, so the image data stored in the cache (the photo with larger width and height) is a preview image (the photo with smaller width and height) after the aspect ratio is switched. Therefore, the present invention performs a certain cropping on the stored screen content in the cache, and displays the screen content in a switched proportion (a common schematic diagram of photo cropping is shown in FIG. 4), so that the user can quickly obtain the aspect ratio after switching. preview.
  • the preview image after switching the aspect ratio is obtained by cropping the original preview image
  • the newly obtained preview image is not exactly the same (because some photo parameters may be adjusted, such as resolution, etc.)
  • the preview effect there is no significant difference between the two, and the preview is only a means for the user to initially judge the shooting effect, and the specific shooting effect needs to be identified by photographing.
  • the present invention does not actually switch the preview size, the parameters of the photographing size are still adjusted, so that after the user takes the photograph, the obtained photograph is still the aspect ratio after the switching. And because the step of re-executing the preview image buffer is eliminated, the user does not feel the obvious jam, thereby improving the user experience.
  • the step of occluding the preview image preset edge region stored in the terminal cache includes:
  • Step S21 If the terminal receives the mode switching instruction, update the shooting parameters of the terminal photographing mode according to the mode switching instruction;
  • the photographing configuration is adjusted according to the instruction of the photo mode switching. For example, the height and width of the photo, the format of the photo, and the like.
  • Step S22 Determine, according to the aspect ratio in the updated shooting parameters, a preset edge region in the preview image in the terminal buffer, and occlude the preview image preset edge region.
  • the aspect ratio of the preview image is different from the aspect ratio of the shooting mode, and the preview image needs to be partially occluded.
  • the displayed preview image satisfies the aspect ratio of the shooting mode, and the occluded area is the edge region.
  • the parameters of the shooting mode are further changed, such as resolution, aspect ratio, and the like.
  • the aspect ratio of the preview image is not the same as the aspect ratio of the shooting mode, so it is not possible to directly display the preview image, so the preview image is partially occluded so that the displayed preview image aspect ratio satisfies the shooting mode. Aspect ratio.
  • the step of determining, according to the aspect ratio in the updated shooting parameters, the preset edge region in the preview image in the terminal buffer according to step S22 includes:
  • Step S23 determining the geometric center of the preview image by the intersection of the diagonal lines, using the geometric center as the geometric center, and generating a geometric shape with the width of the preview image as the width and the length satisfying the shooting aspect ratio;
  • the intersection of the two diagonal lines of the rectangle is the geometric center
  • the geometric center is located at the center of the geometric figure
  • the main content of the photo is generally close to the center position, so when the preview image is occluded, the preview will be previewed.
  • the geometric center of the image is the geometric center of the final displayed image, and since the width of the square graphic is the same as the width of the preview image, the width is constant, and the length can be derived from the width and aspect ratio to obtain the final display.
  • the geometry after drawing the width and height of the graph, and the geometric center of the preview image coincides with the geometric center of the geometry, so that the final displayed image position can be determined.
  • step S24 the generated geometric figure is compared with the preview image, and the area where the preview image is not in the geometric figure is set as the preset edge area.
  • the excess portion of the preview image relative to the final displayed geometry is set as the edge region.
  • the edge area is generally unimportant. Therefore, when occluding the preview image, try to block the edge area and preserve the content of the center as much as possible. .
  • the intersection of the two diagonal lines of the rectangle is the geometric center, and in order to better preserve the content of the central part, the preview image and the geometric center of the final displayed image are set to a point, and then the data such as the aspect ratio can be used. Get the final displayed graphic. And set the extra part to the edge area.
  • the preview image is finally displayed to the user's image closer to the center portion, thereby maximally displaying the content of the preview image near the center portion.
  • step S24 the generated geometric figure is compared with the preview image, and the step that the preview image is not in the geometric figure is set as the preset edge area, and then includes:
  • step S25 by setting the brightness of the preset edge area to zero, the edge area is not displayed when displayed.
  • the edge area is not displayed.
  • the edge area of the preview image cannot be displayed, which has an occlusion effect and makes the portion of the preview image displayed.
  • the aspect ratio is consistent with the aspect ratio of the shooting mode.
  • the preview image in the cache is not reloaded, but only part of the image content is occluded to achieve the aspect ratio of the image to be captured, the reloading of the preview image is prevented, so that the calculation amount of the mobile terminal is increased, and The mobile terminal has a stuck phenomenon.
  • the step of cutting the preset edge region in the preview image to obtain the target photo corresponding to the mode switching instruction includes:
  • step S31 if the photographing instruction is received, the aspect ratio of the preview image is satisfied by clipping the preset edge region.
  • the photographing instruction is sent, and the mobile terminal receives the photographing instruction, so that after receiving the photographing instruction, the current current obtained through the camera is needed.
  • the scene picture is captured, and the photo data stored in the cache is the current scene picture acquired by the camera. Therefore, the captured photo data is partially processed, and the current scene picture is completed, that is, the photographing instruction is completed.
  • the real-time preview is stored in the cache for the preview image captured by the camera, and the preview image in the current time buffer is received when the shooting command is received. It is the picture that the user wants to take, and after trimming the edge area of the preview image, the picture that the user wants to take is obtained.
  • step S31 the step of trimming the preset edge region such that the aspect ratio of the preview image satisfies the aspect ratio of the target photo includes:
  • step 32 the trimmed preview image is compressed to generate a target photo in a preset format and saved.
  • the cropped photo is the target photo that the user wants to take.
  • compression processing is also required, the photo is compressed into a dedicated image format, and the compressed photo is saved in the storage space. For subsequent user viewing or modification operations.
  • the image data in the buffer (this image data is the image data for previewing) is the size ratio of the non-square mode, and the user selects the square mode to take the photo, and the final result must be A square photo, so it is necessary to trim the image data obtained in the cache to change the aspect ratio. Because the portion of the photo that is cropped is the edge portion, cropping does not have a significant impact on the content and quality of the photo, and the reduction in aspect ratio can instead highlight the photo theme (because the subject matter in the photo is throughout the photo) The proportion in the increase has increased, so it will stand out).
  • step of compressing the trimmed preview image in step S32 to generate a target photo in a preset format and saving the method includes:
  • Step S33 detecting whether a processing request sent by a third-party application is received
  • some photos may require a third-party application to perform post-shooting processing, so that the effect of the photo is perfect, so the photo is detected whether there is a processing request of the third-party application.
  • Step S331 if a processing request issued by the third-party application is detected, the target photo is sent to a third-party application for processing, and the fed-back photo is saved.
  • the photo data is sent to the third-party application, so that the third-party application can complete the optimization of the photo.
  • optimizing photos through third-party applications is a common way of photo optimization.
  • the shortcomings of mobile terminals can be improved.
  • the third-party application is more powerful than the camera optimization program of the mobile terminal, so the third-party application is used to optimize the photo, which can complement the weakness of the mobile terminal for photo optimization, and There is no need to increase the user's use cost (the third-party application is often free or the usage cost is very low), so if the photo data after the photo is processed by a third-party application, the photo data is sent to the third-party application. Processing (for example, after the photo is taken, the user can select the character whitening function, and the third party application can whiten the characters in the photo). By detecting whether a processing request of a third-party application is received, the user can perform a better beautification of the photo effect.
  • step S33 the step of detecting whether the processing request sent by the third-party application is received in step S33 comprises:
  • Step S332 if the processing request of the third-party application is not detected, the target photo file is saved locally according to the preset path.
  • the file is stored in a predetermined image storage path, and is saved in the form of a file, and the stored path is a preset path, so that the user can quickly Find the captured photo by path.
  • the photo After the user takes a photo, the photo needs to be stored locally for subsequent viewing, editing, and the like. Since the photo is not generated in the preset format, it will not be modified too much, etc., so it needs to be stored in the storage.
  • the storage can store data for a long time, but the reading speed is slower than the data stored in the cache. However, the data in the cache cannot be stored without restriction (because the cache needs to be powered under normal conditions, Storage space, such as a hard disk, can save data in case of power failure. Therefore, after the photo is taken, storing the photos in the storage space of the preset path can facilitate the user to view the photos and so on.
  • the present invention also provides a mobile terminal having a terminal photographing control method.
  • the mobile terminal based on the terminal photographing control method of the present invention comprises: a memory, a processor, and a square mode photographing program stored on the memory and operable on the processor, wherein the square mode photographing program is executed by the processor
  • the terminal photographing control method steps as described above are implemented.
  • embodiments of the present invention also provide a computer readable storage medium.
  • the square readable photographing program is stored on the computer readable storage medium of the present invention, and the square mode photographing program is executed by the processor to implement the steps of the terminal photographing control method as described above.
  • portions of the technical solution of the present invention that contribute substantially or to the prior art may be embodied in the form of a software product stored in a storage medium (such as a ROM/RAM as described above). , a disk, an optical disk, including a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, a mobile terminal, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
  • a terminal device which may be a mobile phone, a computer, a server, a mobile terminal, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Telephone Function (AREA)

Abstract

Disclosed are a terminal photograph capturing control method, a mobile terminal, and a readable storage medium. The terminal photograph capturing control method comprises the following steps: detecting whether a mode switching instruction inputted by a user is received by a terminal; if the mode switching instruction is received by the terminal, shielding a preset peripheral area of a preview image buffered in the terminal; when a photograph capturing instruction is received, cropping the preset peripheral area in the preview image so as to acquire a target photograph corresponding to the mode switching instruction. The present invention is such that, first, a preview image of an original size is shielded to form a new preview image when the user switches to a square photographing mode, then, the preview image is cropped and saved in a specific format to produce a photograph. The present invention, by performing processing such as cropping of a preview image, produces a photograph identical in terms of aspect ratio to a photograph capturing mode, thus preventing lagging caused by the reloading of the preview image, implementing smooth operation of the mobile terminal when switching photograph modes, and enhancing user experience.

Description

终端拍照控制方法、移动终端及可读储存介质  Terminal photographing control method, mobile terminal and readable storage medium
技术领域Technical field
本发明涉及图像处理技术领域,尤其涉及一种终端拍照控制方法。The present invention relates to the field of image processing technologies, and in particular, to a terminal photographing control method.
背景技术Background technique
目前移动终端的拍照功能是用户最常用的功能之一,而方形照片等特殊宽高比例的拍照模式由于与目前主流的16:9或者4:3尺寸的照片模式拍出的照片效果有明显区别,使得用户体验较高。但在设置方形拍照等模式时,首先需要将移动终端缓存中储存的预览图像进行重新加载,来调整预览图像的宽高比例,而重新加载预览图像的过程会产生一个明显的卡顿,特别是在用户使用无延时模式进行拍照时,使得用户的正常使用受到不良影响影响,从而降低使用体验。At present, the camera function of the mobile terminal is one of the most commonly used functions of the user, and the special wide and high ratio camera mode such as the square photo is obviously different from the photo effect taken by the current mainstream 16:9 or 4:3 size photo mode. To make the user experience higher. However, when setting a square photo mode, firstly, the preview image stored in the mobile terminal cache needs to be reloaded to adjust the aspect ratio of the preview image, and the process of reloading the preview image will produce an obvious jam, especially When the user takes a photo using the no-delay mode, the normal use of the user is adversely affected, thereby reducing the user experience.
发明内容Summary of the invention
本发明的主要目的在于提供一种终端拍照控制方法,旨在解决在使用移动终端进行拍照时,因为切换拍照模式时导致需要重新加载预览图像所造成的卡顿问题。The main purpose of the present invention is to provide a terminal photographing control method, which aims to solve the problem of jamming caused by the need to reload the preview image when the photographing mode is switched when the photographing is performed using the mobile terminal.
为实现上述目的,本发明提供一种终端拍照控制方法,所述终端拍照控制方法包括以下步骤:To achieve the above objective, the present invention provides a terminal photographing control method, and the terminal photographing control method includes the following steps:
检测终端是否接收的用户输入的模式切换指令;Detecting a mode switching instruction of a user input received by the terminal;
若终端接收到模式切换指令,将终端缓存中的预览图像预设边缘区域进行遮挡;If the terminal receives the mode switching instruction, the preset image edge region of the preview image in the terminal buffer is occluded;
在接收到拍照指令时,将预览图像中预设边缘区域进行剪裁,以获取模式切换指令对应的目标照片。When receiving the photographing instruction, the preset edge area in the preview image is cropped to obtain the target photo corresponding to the mode switching instruction.
可选地,所述若终端接收到模式切换指令,将终端缓存中储存的预览图像预设边缘区域进行遮挡的步骤包括:Optionally, if the terminal receives the mode switching instruction, the step of occluding the preview image preset edge region stored in the terminal cache includes:
若终端接收到模式切换指令,根据模式切换指令,对终端拍照模式的拍摄参数进行更新;If the terminal receives the mode switching instruction, the shooting parameter of the terminal photographing mode is updated according to the mode switching instruction;
根据更新后拍摄参数中的宽高比,确定终端缓存中预览图像中的预设边缘区域,并对预览图像预设边缘区域进行遮挡。According to the aspect ratio in the updated shooting parameters, the preset edge area in the preview image in the terminal buffer is determined, and the preview image preset edge area is occluded.
可选地,所述根据更新后拍摄参数中的宽高比,确定终端缓存中预览图像中的预设边缘区域的步骤包括:Optionally, the determining, according to the aspect ratio in the updated shooting parameters, the determining the preset edge region in the preview image in the terminal cache includes:
通过对角线的交点确定预览图像的几何中心;Determining the geometric center of the preview image by the intersection of the diagonal lines;
将该几何中心作为几何中心,生成以预览图像的宽度为宽度,长度满足拍摄宽高比的几何图形;Using the geometric center as a geometric center, generating a geometric shape in which the width of the preview image is a width and the length satisfies the aspect ratio of the shooting;
将生成的几何图形与预览图像进行比对,预览图像不处于几何图形中的区域为设为预设边缘区域。The generated geometry is compared with the preview image, and the area in which the preview image is not in the geometry is set as the preset edge area.
可选地,所述将生成的几何图形与预览图像进行比对,预览图像不处于几何图形中的区域为设为预设边缘区域的步骤之后包括:Optionally, the comparing the generated geometric figure with the preview image, and the step of the preview image not being in the geometric figure being the preset edge area comprises:
通过将预设边缘区域亮度设为零,使得边缘区域在显示时不会进行显示。By setting the brightness of the preset edge area to zero, the edge area is not displayed when it is displayed.
可选地,所述在接收到拍照指令时,将预览图像中预设边缘区域进行剪裁,以获取模式切换指令对应的目标照片的步骤包括:Optionally, when the photographing instruction is received, the step of cutting the preset edge region in the preview image to obtain the target photo corresponding to the mode switching instruction includes:
若接收拍照指令,通过将预设边缘区域进行剪裁,使得预览图像的宽高比满足目标照片的宽高比。If the photographing instruction is received, the aspect ratio of the preview image is made to satisfy the aspect ratio of the target photograph by trimming the preset edge region.
可选地,所述通过将预设边缘区域进行剪裁使得预览图像的宽高比满足目标照片的宽高比的步骤之后包括:Optionally, the step of trimming the preset edge region such that the aspect ratio of the preview image satisfies the aspect ratio of the target photo includes:
将剪裁后的预览图像进行压缩,生成预设格式的目标照片并保存。Compress the cropped preview image to generate a target photo in a preset format and save it.
可选地,所述将剪裁后的预览图像进行压缩,生成预设格式的目标照片并保存的步骤之后包括:Optionally, the step of compressing the trimmed preview image to generate a target photo in a preset format and saving the method includes:
检测是否接收到第三方应用程序发出的处理请求;Detecting whether a processing request from a third-party application is received;
若检测到第三方应用程序发出的处理请求,则将目标照片发送至第三方应用程序进行处理,并对反馈的照片进行保存。If a processing request from a third-party application is detected, the target photo is sent to a third-party application for processing and the returned photo is saved.
此外,为实现上述目的,本发明还提供一种移动终端,所述移动终端包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的终端拍照控制方法程序,所述终端拍照控制方法程序被所述处理器执行时实现如上所述终端拍照控制方法方法的步骤。In addition, in order to achieve the above object, the present invention further provides a mobile terminal, where the mobile terminal includes: a memory, a processor, and a terminal photographing control method program stored on the memory and operable on the processor, where The steps of the terminal photographing control method method as described above are implemented when the terminal photographing control method program is executed by the processor.
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储的终端拍照控制方法程序,所述终端拍照控制方法程序被处理器执行时实现如上所述的终端拍照控制方法方法的步骤。In addition, in order to achieve the above object, the present invention further provides a computer readable storage medium, the terminal photographing control method program stored on the computer readable storage medium, and the terminal photographing control method program is implemented by the processor as described above The steps of the method for controlling the terminal photographing method.
本发明提出的终端拍照控制方法,在用户处于无延时拍照下,切换方形模式时,能够通过对缓存中的已经储存的预览图像进行遮挡等方式进行处理,得到方形模式宽高比的预览图像,而不要重新加载方形模式宽高比的预览图像,使得移动终端不会因重新加载预览图像产生卡顿,并且用户拍照时,通过将预览图像剪裁与调整至方形模式的配置,而得到所拍摄的方形照片,使得用户能够正常更加流畅的使用方形拍照,提升了用户的使用体验。The terminal photographing control method proposed by the invention can process the squared mode aspect ratio by occluding the already stored preview image in the cache when the user is in the no-delay photographing mode and switching the square mode. Instead of reloading the preview image of the square mode aspect ratio, the mobile terminal does not cause a jam due to reloading the preview image, and the user is photographed by cropping and adjusting the preview image to the square mode configuration. The square photo allows the user to use the square photo more smoothly and smoothly, which improves the user experience.
附图说明DRAWINGS
图1是本发明实施例方案涉及的硬件运行环境的终端\装置结构示意图;1 is a schematic structural diagram of a terminal/device in a hardware operating environment according to an embodiment of the present invention;
图2为本发明终端拍照控制方法一实施例的流程示意图;2 is a schematic flowchart of an embodiment of a method for controlling a terminal of a terminal according to an embodiment of the present invention;
图3为本发明终端拍照控制方法另一实施例中S20的步骤的细化流程示意图;3 is a schematic flowchart of the steps of the step S20 in another embodiment of the terminal photographing control method according to the present invention;
图4为本发明终端拍照控制方法剪裁预览图像的场景示意图。FIG. 4 is a schematic diagram of a scene for cropping a preview image according to a terminal photographing control method of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
如图1所示,图1是本发明实施例方案涉及的硬件运行环境的终端结构示意图。As shown in FIG. 1, FIG. 1 is a schematic structural diagram of a terminal in a hardware operating environment according to an embodiment of the present invention.
本发明实施例终端也可以是智能手机、平板电脑、电子书阅读器、MP3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面3)播放器、便携计算机等具有显示功能的可移动式终端设备。The terminal of the embodiment of the invention may also be a smart phone, a tablet computer, an e-book reader, and an MP3 (Moving Picture) Experts Group Audio Layer III, Motion Picture Expert Compress Standard Audio Level 3) Player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video experts compress standard audio layers 3) Players, portable computers and other portable terminal devices with display functions.
如图1所示,该终端可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1, the terminal may include a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to implement connection communication between these components. The user interface 1003 can include a display, an input unit such as a keyboard, and the optional user interface 1003 can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1005 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage. The memory 1005 can also optionally be a storage device independent of the aforementioned processor 1001.
可选地,终端还可以包括摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。其中,传感器比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示屏的亮度,接近传感器可在移动终端移动到耳边时,关闭显示屏和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;当然,移动终端还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。Optionally, the terminal may further include a camera, RF (Radio) Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more. Among them, sensors such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display according to the brightness of the ambient light, and the proximity sensor may turn off the display and/or when the mobile terminal moves to the ear. Backlighting. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. No longer.
本领域技术人员可以理解,图1中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。It will be understood by those skilled in the art that the terminal structure shown in FIG. 1 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及方形模式拍照程序。As shown in FIG. 1, a memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a square mode photographing program.
在图1所示的终端中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的方形模式拍照程序,并执行以下操作:In the terminal shown in FIG. 1, the network interface 1004 is mainly used to connect to the background server and perform data communication with the background server; the user interface 1003 is mainly used to connect the client (user end), and perform data communication with the client; and the processor 1001 can be used to call a square mode photographing program stored in the memory 1005 and perform the following operations:
检测是否接收的用户输入的照片模式切换指令;Detecting whether a received photo mode switching instruction of the user input is received;
若接收到照片模式切换指令,将缓存中储存的预览图像进行遮挡;If the photo mode switching instruction is received, the preview image stored in the cache is occluded;
接收到拍照指令时,将预览图像进行剪裁并保存。When a photo command is received, the preview image is cropped and saved.
进一步地,处理器1001可以调用存储器1005中存储的方形模式拍照程序,还执行以下操作:Further, the processor 1001 can call the square mode photographing program stored in the memory 1005, and also perform the following operations:
若终端接收到模式切换指令,根据模式切换指令,对终端拍照模式的拍摄参数进行更新;If the terminal receives the mode switching instruction, the shooting parameter of the terminal photographing mode is updated according to the mode switching instruction;
根据更新后拍摄参数中的宽高比,确定终端缓存中预览图像中的预设边缘区域,并对预览图像预设边缘区域进行遮挡。According to the aspect ratio in the updated shooting parameters, the preset edge area in the preview image in the terminal buffer is determined, and the preview image preset edge area is occluded.
所述根据更新后拍摄参数中的宽高比,确定终端缓存中预览图像中的预设边缘区域的步骤包括:The determining, according to the aspect ratio in the updated shooting parameters, the determining the preset edge region in the preview image in the terminal cache includes:
通过对角线的交点确定预览图像的几何中心;Determining the geometric center of the preview image by the intersection of the diagonal lines;
将该几何中心作为几何中心,生成以预览图像的宽度为宽度,长度满足拍摄宽高比的几何图形;Using the geometric center as a geometric center, generating a geometric shape in which the width of the preview image is a width and the length satisfies the aspect ratio of the shooting;
将生成的几何图形与预览图像进行比对,预览图像不处于几何图形中的区域为设为预设边缘区域。The generated geometry is compared with the preview image, and the area in which the preview image is not in the geometry is set as the preset edge area.
所述将生成的几何图形与预览图像进行比对,预览图像不处于几何图形中的区域为设为预设边缘区域的步骤之后包括:The comparing the generated geometric figure with the preview image, and the step of the preview image not being in the geometric figure is set as the preset edge area, and the following steps are:
通过将预设边缘区域亮度设为零,使得边缘区域在显示时不会进行显示。By setting the brightness of the preset edge area to zero, the edge area is not displayed when it is displayed.
进一步地,处理器1001可以调用存储器1005中存储的方形模式拍照程序,还执行以下操作:Further, the processor 1001 can call the square mode photographing program stored in the memory 1005, and also perform the following operations:
若接收拍照指令,通过将预设边缘区域进行剪裁,使得预览图像的宽高比满足目标照片的宽高比。If the photographing instruction is received, the aspect ratio of the preview image is made to satisfy the aspect ratio of the target photograph by trimming the preset edge region.
所述通过将预设边缘区域进行剪裁使得预览图像的宽高比满足目标照片的宽高比的步骤之后包括:The step of trimming the preset edge region such that the aspect ratio of the preview image satisfies the aspect ratio of the target photo includes:
将剪裁后的预览图像进行压缩,生成预设格式的目标照片并保存。Compress the cropped preview image to generate a target photo in a preset format and save it.
所述将剪裁后的预览图像进行压缩,生成预设格式的目标照片并保存的步骤之后包括:The step of compressing the trimmed preview image to generate a target photo in a preset format and saving the method includes:
检测是否接收到第三方应用程序发出的处理请求;Detecting whether a processing request from a third-party application is received;
若检测到第三方应用程序发出的处理请求,则将目标照片发送至第三方应用程序进行处理,并对反馈的照片进行保存。If a processing request from a third-party application is detected, the target photo is sent to a third-party application for processing and the returned photo is saved.
所述检测是否接收到第三方应用程序发出的处理请求的步骤包括:The step of detecting whether a processing request sent by a third-party application is received includes:
若未检测到第三方应用程序的处理请求,则根据预设路径将目标照片文件保存在本地。If the processing request of the third-party application is not detected, the target photo file is saved locally according to the preset path.
参照图2,本发明第一实施例提供一种终端拍照控制方法,所述终端拍照控制方法包括: Referring to FIG. 2, a first embodiment of the present invention provides a terminal photographing control method, where the terminal photographing control method includes:
步骤S10,检测终端是否接收的用户输入的模式切换指令;Step S10, detecting a mode switching instruction of the user input received by the terminal;
具体地,一般而言,移动终端默认照片模式的尺寸比例为16:9或者4:3(也有部分大屏幕的移动终端的尺寸比例接近2:1),而现在由于拍照技术的发展与提升,越来越多的特殊比例照片已经运用,包括宽高比为1:1的方形照片等,而用户在拍照过程中,根据自身喜好与需求,可以对拍照模式进行切换。切换拍照模式时,用户通过选择拍照模式等方式输入切换指令来控制移动终端进行拍照模式的切换。Specifically, in general, the size ratio of the default photo mode of the mobile terminal is 16:9 or 4:3 (the size ratio of some large-screen mobile terminals is also close to 2:1), and now due to the development and improvement of the photographing technology, More and more special proportion photos have been used, including square photos with an aspect ratio of 1:1, and users can switch the camera mode according to their own preferences and needs during the photo process. When the photographing mode is switched, the user inputs a switching instruction by selecting a photographing mode or the like to control the switching of the photographing mode by the mobile terminal.
步骤S20,若终端接收到模式切换指令,将终端缓存中的预览图像预设边缘区域进行遮挡;Step S20: If the terminal receives the mode switching instruction, the preset image edge region of the preview image in the terminal buffer is occluded;
具体地,在接收到拍照模式的切换指令后,缓存中储存的预览图像也需要对应进行更行,然后由于拍照模式的切换仅仅是宽高比例的调整,因此内容并无实质性变化,而常规的更行缓存内容的方式是重新加载预览图像,但是重新加载由于计算量过大,会造成明显的卡顿现象,因此本发明使用了将缓存图片进行遮挡处理,遮挡后的预览图像宽高比与拍照模式的宽高比一致,并且照片内容物明显差距。Specifically, after receiving the switching instruction of the photographing mode, the preview image stored in the cache also needs to be correspondingly performed, and then since the switching of the photographing mode is only the adjustment of the aspect ratio, the content does not substantially change, and the conventional The way to cache the content is to reload the preview image, but the reloading is too large, which will cause obvious jamming. Therefore, the present invention uses the occlusion processing of the cached image, and the preview image aspect ratio after occlusion is blocked. It is consistent with the aspect ratio of the photo mode, and the photo content is clearly different.
步骤S30,在接收到拍照指令时,将预览图像中预设边缘区域进行剪裁,以获取模式切换指令对应的目标照片;Step S30, when receiving the photographing instruction, trimming the preset edge region in the preview image to obtain the target photo corresponding to the mode switching instruction;
具体地,在用户发出拍照指令时,即用户想要将当前预览图像的内容进行拍摄。因此将预览图像进行剪裁(预览时为遮挡,因此实际宽高比并未改变),将预览图像剪裁至与拍照模式的宽高比相同,并通过压缩将预览图片压缩为预设的照片格式,最后进行保存即完成本次拍照。Specifically, when the user issues a photographing instruction, that is, the user wants to photograph the content of the current preview image. Therefore, the preview image is cropped (the occlusion is previewed, so the actual aspect ratio is not changed), the preview image is cropped to the same aspect ratio as the photo mode, and the preview image is compressed into a preset photo format by compression. Finally, save and complete the photo.
现在人们使用移动终端进行拍照已经成为了生活中的一种习惯,并且随着技术的迅速发展,拍照模式也变得更加丰富,不同的宽高比,以及各种参数的调整都可以使用户发觉并获得更多拍照的乐趣。其中包括零延时拍照模式(ZSD),零延时拍照模式最大的特点就是可以快速进行连续拍摄,而不会在拍摄时对照片进行美化与修正。由于零延时拍照需要进行快速的连续拍摄,因此用户需要根据预览图像来判断是否拍摄,预览图片是摄像头当前获取的景象,可以粗略的认为是当前能够拍摄的照片,由于预览图片需要实施进行更新,因此预览图片是储存在缓存中(因为缓存的计算速度比其他储存空间快)。Nowadays people use mobile terminals to take pictures has become a habit in life, and with the rapid development of technology, the camera mode has become more abundant, different aspect ratios, and various parameter adjustments can make users aware. And get more photos for fun. Including zero-latency camera mode (ZSD), the biggest feature of the zero-latency camera mode is that it can quickly shoot continuously without beautifying and correcting the photos when shooting. Since the zero-latency photographing requires rapid continuous shooting, the user needs to judge whether to shoot according to the preview image. The preview image is the currently acquired scene of the camera, and can be roughly regarded as the currently photographable photo, since the preview image needs to be updated. , so the preview image is stored in the cache (because the cache is faster than other storage).
由于方形等特殊拍照模式下,照片的宽高比与移动终端默认的宽高比(一般而言,默认比例为16:9或者4:3)有较大不同,因此在选择方形照片模式时,需要对多个参数进行调整。现有技术中使用的方式是将预览和拍照的宽高比均设置为1:1的比例,而切换宽高比的过程由于需要首先将原宽高比的预览图像关闭,在重新以1:1宽高比打开预览图像,但是由于从关闭原有预览图像到打开新预览图像的过程对系统的运算量较大,因此在使用时会造成明显的卡顿现象,具体在使用中的体现就是用户在切换照片模式时,会感觉切换时有明显的卡顿,因此对用户的使用体验造成极大的破坏。Due to the special photo mode such as square, the aspect ratio of the photo is different from the default aspect ratio of the mobile terminal (generally, the default ratio is 16:9 or 4:3), so when the square photo mode is selected, Need to adjust multiple parameters. The method used in the prior art is to set the aspect ratio of the preview and the photographing to a ratio of 1:1, and the process of switching the aspect ratio requires first closing the preview image of the original aspect ratio, and re-empting 1: 1 aspect ratio opens the preview image, but since the process of closing the original preview image to opening the new preview image has a large amount of calculation on the system, it will cause obvious jamming phenomenon when used, and the specific use is When the user switches the photo mode, he or she feels that there is a noticeable jam when switching, which greatly damages the user experience.
照片宽高比的切换,实际问题就是将相同的内容如何装进不同的照片中,而宽高比则一定程度表示这个照片能够装入多少的内容,所以照片模式的切换,实质上就对拍照所获取到的画面内容的限定,假设宽高比为16:9时,用户以某一相机设置(包括对焦距离、光圈大小等相机设置)拍照获取到了16长,9米宽的画面内容了,而用户若是切换为方形照片模式,以相同的相机设置拍摄相同的位置,则会获取到长为9米的画面内容。改变了宽高比还会减少画面中获取的内容,为何还要这样做?针对不同的设备,并不是宽高比越大越好,因为一个设备的最大像素(图像元素,分辨率的尺寸单位,越高位的像素,其拥有的色板也就越丰富,也就越能表达颜色的真实感。)往往是固定的,而拍摄越大的照片,对于像素的要求也越高,否则会出现画面模糊等情况。而相应的在尺寸比例相应减小的情况下,由于设备最大像素不变,因此可以使得拍摄出来的照片画面更为真实,并且更加清晰。The switch between the aspect ratio of the photo, the actual problem is how to put the same content into different photos, and the aspect ratio indicates to some extent how much content the photo can be loaded, so the photo mode is switched, essentially taking pictures. The definition of the obtained screen content, assuming that the aspect ratio is 16:9, the user takes a picture of a certain camera setting (including the camera distance such as the focus distance and the aperture size) to obtain a 16-length, 9-meter-wide screen content. If the user switches to the square photo mode and shoots the same position with the same camera settings, the screen content will be 9 meters long. Changing the aspect ratio will also reduce the content acquired in the picture. Why do you still want to do this? For different devices, the larger the aspect ratio, the better. Because the maximum pixel of a device (image element, resolution size unit, higher bit pixel, the more swatch it has, the more it can express The realism of color.) is often fixed, and the larger the photo, the higher the requirements for the pixel, otherwise the picture will be blurred. Correspondingly, when the size ratio is correspondingly reduced, since the maximum pixel of the device is unchanged, the photographed picture can be made more realistic and clearer.
宽高比的切换,还可以使得用户拍摄出更加突出某个出题的照片,例如用户拍摄一个人物照片时,会将人物尽可能的进行突出,而其中一个办法就是使得人物尽可能的占据更多的画面,从而使得画面的主体得到突出。但是在多数情况下,由于各种原因(假设主题是人物,在需要一定的距离来拍摄人物的全景,或者需要体现出人物所在的背景画面等情况,则使得人物只能够占据一小部分的画面),使得拍摄照片时,画面主题仅仅能够占据一小部分的画面。而切换为宽高比更小的照片模式,则可以一定程度的解决这个问题,因为宽高比减小,使得照片的获取的内容也对应减少,而由于人物的尺寸并没有减小,使得人物这个画面主体在整个画面中显得更为突出。因此对于拍摄人物或者有特定主题时,选择宽高比小的照片模式有助于将拍摄的主题进行突出,而拍摄风景等无明显主题,仅仅为了突出画面美感的照片时,则最好选择宽高比大的照片模式。The aspect ratio switching also allows the user to take a photo that highlights a certain problem. For example, when a user takes a photo of a character, the character will be highlighted as much as possible, and one of the ways is to make the character occupy as much as possible. A lot of pictures, so that the main body of the picture is highlighted. But in most cases, for a variety of reasons (assuming the subject is a character, taking a certain distance to capture the panorama of the character, or need to reflect the background image of the person, etc., then the character can only occupy a small part of the picture ), so that when the photo is taken, the screen theme can only occupy a small part of the picture. Switching to a photo mode with a smaller aspect ratio can solve this problem to a certain extent, because the aspect ratio is reduced, so that the content acquired by the photo is correspondingly reduced, and since the size of the character is not reduced, the character is made This picture body is more prominent in the entire picture. Therefore, when shooting a character or having a specific theme, selecting a photo mode with a small aspect ratio helps to highlight the subject of the shot, while photographing the landscape has no obvious theme, and only to highlight the beautiful picture of the picture, it is better to choose the width. High ratio photo mode.
本发明在进行方形照片模式的切换时,不会关闭缓存中的数据,因为缓存中储存的数据是宽高比较大时的画面内容,而在切换至方形照片模式时,由于宽高比是由大变小,因此画面内容也会有着一定程度的减少,所以缓存中储存的图像数据(宽高比较大的照片)是包含了宽高比切换后的预览图(宽高比较小的照片),因此本发明将缓存中的储存的画面内容进行一定的剪裁,以切换后的比例将画面内容进行展示(照片剪裁的常见示意图如图4),即可使用户快速的得到切换宽高比后的预览图。虽然通过对原有预览图进行剪裁来得到切换宽高比后的预览图与切换宽高比后从新获得的预览图并不完全相同(因为部分照片参数可能会进行调整,例如分辨率等),但是对于预览效果而言,二者并没有显著差异,而预览仅仅只是用户初步判断拍摄效果的一个手段,具体的拍摄效果还需要通过拍照后来鉴别。而本发明虽然没有真正切换预览尺寸,但是拍照尺寸的参数还是会进行调整,因此用户在进行拍摄后,所得到的照片依旧是切换后的宽高比。并且因为免去了重新进行预览图像缓存的步骤,使得用户不会感觉到明显卡顿,从而提高了的用户的使用体验。The invention does not close the data in the cache when switching the square photo mode, because the data stored in the buffer is the picture content when the width and height are relatively large, and when switching to the square photo mode, since the aspect ratio is The size of the screen will be reduced to a certain extent, so the image data stored in the cache (the photo with larger width and height) is a preview image (the photo with smaller width and height) after the aspect ratio is switched. Therefore, the present invention performs a certain cropping on the stored screen content in the cache, and displays the screen content in a switched proportion (a common schematic diagram of photo cropping is shown in FIG. 4), so that the user can quickly obtain the aspect ratio after switching. preview. Although the preview image after switching the aspect ratio is obtained by cropping the original preview image, the newly obtained preview image is not exactly the same (because some photo parameters may be adjusted, such as resolution, etc.), However, for the preview effect, there is no significant difference between the two, and the preview is only a means for the user to initially judge the shooting effect, and the specific shooting effect needs to be identified by photographing. However, although the present invention does not actually switch the preview size, the parameters of the photographing size are still adjusted, so that after the user takes the photograph, the obtained photograph is still the aspect ratio after the switching. And because the step of re-executing the preview image buffer is eliminated, the user does not feel the obvious jam, thereby improving the user experience.
进一步地,参照图3,步骤S20若终端接收到模式切换指令,将终端缓存中储存的预览图像预设边缘区域进行遮挡的步骤包括:Further, referring to FIG. 3, if the terminal receives the mode switching instruction, the step of occluding the preview image preset edge region stored in the terminal cache includes:
步骤S21,若终端接收到模式切换指令,根据模式切换指令,对终端拍照模式的拍摄参数进行更新;Step S21: If the terminal receives the mode switching instruction, update the shooting parameters of the terminal photographing mode according to the mode switching instruction;
具体地,接收到用户切换方形照片模式的指令后,首先获取移动终端当前的照片模式,同时获取当前照片模式对应的宽高比,若是照片的宽高比与方形照片模式的比例不同,则将照片宽高比调整至方形照片模式的1:1。并且在获取到当前照片模式的宽高比等相关数据后,根据照片模式切换的指令对拍照配置进行对应调整。例如照片的高宽尺寸、照片的格式等。Specifically, after receiving the instruction that the user switches the square photo mode, first acquiring the current photo mode of the mobile terminal, and acquiring the aspect ratio corresponding to the current photo mode, if the ratio of the aspect ratio of the photo to the square photo mode is different, The photo aspect ratio is adjusted to 1:1 in square photo mode. After the related data such as the aspect ratio of the current photo mode is acquired, the photographing configuration is adjusted according to the instruction of the photo mode switching. For example, the height and width of the photo, the format of the photo, and the like.
步骤S22,根据更新后拍摄参数中的宽高比,确定终端缓存中预览图像中的预设边缘区域,并对预览图像预设边缘区域进行遮挡。Step S22: Determine, according to the aspect ratio in the updated shooting parameters, a preset edge region in the preview image in the terminal buffer, and occlude the preview image preset edge region.
具体地,预览图像的宽高比与拍摄模式的宽高比不同,需要对预览图像进行部分遮挡来是的显示的预览图像满足拍摄模式的宽高比,被遮挡的区域为边缘区域。Specifically, the aspect ratio of the preview image is different from the aspect ratio of the shooting mode, and the preview image needs to be partially occluded. The displayed preview image satisfies the aspect ratio of the shooting mode, and the occluded area is the edge region.
接收到模式切换指令后,首先对拍摄模式的各项参数进行更行,例如分辨率,宽高比等。而预览图像宽高比与拍摄模式的宽高比并不相同,因此直接将预览图像进行显示是不行的,所以通过将预览图像进行部分遮挡,以使得显示出来的预览图像宽高比满足拍摄模式宽高比。After receiving the mode switching instruction, first, the parameters of the shooting mode are further changed, such as resolution, aspect ratio, and the like. The aspect ratio of the preview image is not the same as the aspect ratio of the shooting mode, so it is not possible to directly display the preview image, so the preview image is partially occluded so that the displayed preview image aspect ratio satisfies the shooting mode. Aspect ratio.
进一步地,参照图3,步骤S22所述根据更新后拍摄参数中的宽高比,确定终端缓存中预览图像中的预设边缘区域的步骤包括:Further, referring to FIG. 3, the step of determining, according to the aspect ratio in the updated shooting parameters, the preset edge region in the preview image in the terminal buffer according to step S22 includes:
步骤S23,通过对角线的交点确定预览图像的几何中心,将该几何中心作为几何中心,生成以预览图像的宽度为宽度,长度满足拍摄宽高比的几何图形;Step S23, determining the geometric center of the preview image by the intersection of the diagonal lines, using the geometric center as the geometric center, and generating a geometric shape with the width of the preview image as the width and the length satisfying the shooting aspect ratio;
具体地,通过几何规律,矩形两条对角线的交点为几何中心,几何中心位于几何图形的中心位置,而照片的主要内容也一般会靠近中心位置,因此对预览图像进行遮挡时,将预览图像的几何中心作为最终显示出来的图像的几何中心,而由于方形的图形宽度与预览图像的宽度是相同的,因此宽度不变,而长度可以由宽度和宽高比得出,从而得到最终显示的几何图形,得出图形的宽与高后,而预览图像的几何中心与几何图形的几何中心相重合,因此可以确定出最终显示的图像位置。Specifically, by geometric law, the intersection of the two diagonal lines of the rectangle is the geometric center, the geometric center is located at the center of the geometric figure, and the main content of the photo is generally close to the center position, so when the preview image is occluded, the preview will be previewed. The geometric center of the image is the geometric center of the final displayed image, and since the width of the square graphic is the same as the width of the preview image, the width is constant, and the length can be derived from the width and aspect ratio to obtain the final display. The geometry, after drawing the width and height of the graph, and the geometric center of the preview image coincides with the geometric center of the geometry, so that the final displayed image position can be determined.
步骤S24,将生成的几何图形与预览图像进行比对,预览图像不处于几何图形中的区域为设为预设边缘区域。In step S24, the generated geometric figure is compared with the preview image, and the area where the preview image is not in the geometric figure is set as the preset edge area.
在得到显示的图像后,将预览图像中相对最终显示的几何图形多余的部分设为边缘区域。After the displayed image is obtained, the excess portion of the preview image relative to the final displayed geometry is set as the edge region.
拍摄照片时,人们往往会将主要内容集中在靠近中心部分,而边缘区域一般都是不重要的内容,因此在对预览图像进行遮挡时,也尽量遮挡边缘区域,尽可能的保留中心部分的内容。通过几何关系,矩形的两条对角线交点即是几何中心,而为了更好地保存中心部分的内容,将预览图像与最终显示的图像几何中心设为一点,然后通过宽高比等数据可以得出最终显示的图形。并且将多余部分设为边缘区域。通过对几何关系的运行,使得预览图像最终显示给用户的图像更为靠近中心部分,从而能够最大限度的将预览图像中靠近中心部分的内容进行显示。When taking photos, people tend to focus on the main part, and the edge area is generally unimportant. Therefore, when occluding the preview image, try to block the edge area and preserve the content of the center as much as possible. . Through the geometric relationship, the intersection of the two diagonal lines of the rectangle is the geometric center, and in order to better preserve the content of the central part, the preview image and the geometric center of the final displayed image are set to a point, and then the data such as the aspect ratio can be used. Get the final displayed graphic. And set the extra part to the edge area. By running the geometric relationship, the preview image is finally displayed to the user's image closer to the center portion, thereby maximally displaying the content of the preview image near the center portion.
进一步地,步骤S24,所述将生成的几何图形与预览图像进行比对,预览图像不处于几何图形中的区域为设为预设边缘区域的步骤之后包括:Further, in step S24, the generated geometric figure is compared with the preview image, and the step that the preview image is not in the geometric figure is set as the preset edge area, and then includes:
步骤S25,通过将预设边缘区域亮度设为零,使得边缘区域在显示时不会进行显示。In step S25, by setting the brightness of the preset edge area to zero, the edge area is not displayed when displayed.
具体地,通过将边缘区域亮度调整为零,使得边缘区域的不会显示。Specifically, by adjusting the brightness of the edge area to zero, the edge area is not displayed.
将一个区域的亮度调为零后,则该区域的内容变成黑色,无法正常进行显示,通过该方法,使得预览图像的边缘区域无法显示,起到了遮挡的效果,并且使得预览图像显示的部分宽高比与拍摄模式的宽高比一致。同时由于缓存中的预览图像并未进行重新加载,而仅仅是将部分图像内容进行遮挡来达到显示的图像满足拍摄模式的宽高比,避免了重新加载预览图片使得移动终端计算量增加,并且造成移动终端出现卡顿现象。After the brightness of an area is turned to zero, the content of the area becomes black and cannot be displayed normally. By this method, the edge area of the preview image cannot be displayed, which has an occlusion effect and makes the portion of the preview image displayed. The aspect ratio is consistent with the aspect ratio of the shooting mode. At the same time, since the preview image in the cache is not reloaded, but only part of the image content is occluded to achieve the aspect ratio of the image to be captured, the reloading of the preview image is prevented, so that the calculation amount of the mobile terminal is increased, and The mobile terminal has a stuck phenomenon.
进一步地,步骤S30在接收到拍照指令时,将预览图像中预设边缘区域进行剪裁,以获取模式切换指令对应的目标照片的步骤包括:Further, when the step S30 receives the photographing instruction, the step of cutting the preset edge region in the preview image to obtain the target photo corresponding to the mode switching instruction includes:
步骤S31,若接收拍照指令,通过将预设边缘区域进行剪裁,使得预览图像的宽高比满足目标照片的宽高比。In step S31, if the photographing instruction is received, the aspect ratio of the preview image is satisfied by clipping the preset edge region.
具体地,用户在拍摄时,通过按下拍摄键(或者通过其他方式发送拍照指令),会发送拍照指令,移动终端会接收到拍照指令,从而接收到拍照指令后,需要对通过摄像头取得的当前场景画面进行拍摄,而缓存中储存的照片数据就是通过摄像头获取的当前场景画面,因此获取到缓存中的照片数据并进行部分处理,就完成了对当前场景画面的拍摄,即完成了拍照指令。Specifically, when the user shoots, by pressing the shooting button (or sending a photographing instruction by other means), the photographing instruction is sent, and the mobile terminal receives the photographing instruction, so that after receiving the photographing instruction, the current current obtained through the camera is needed. The scene picture is captured, and the photo data stored in the cache is the current scene picture acquired by the camera. Therefore, the captured photo data is partially processed, and the current scene picture is completed, that is, the photographing instruction is completed.
在接收到拍照指令后,由于零延时的照片模式需要非常快的拍摄速度,因此实时在缓存中储存有摄像头捕捉的用于预览图像,在接收到拍摄命令时,当前时刻缓存中的预览图像则是用户想要拍摄的画面,而在将预览图像的边缘区域进行剪裁后,则得到用户想要拍摄的照片。After receiving the photographing instruction, since the zero-delay photo mode requires a very fast shooting speed, the real-time preview is stored in the cache for the preview image captured by the camera, and the preview image in the current time buffer is received when the shooting command is received. It is the picture that the user wants to take, and after trimming the edge area of the preview image, the picture that the user wants to take is obtained.
进一步地,步骤S31通过将预设边缘区域进行剪裁使得预览图像的宽高比满足目标照片的宽高比的步骤之后包括:Further, after step S31, the step of trimming the preset edge region such that the aspect ratio of the preview image satisfies the aspect ratio of the target photo includes:
步骤32,将剪裁后的预览图像进行压缩,生成预设格式的目标照片并保存。In step 32, the trimmed preview image is compressed to generate a target photo in a preset format and saved.
具体地,经过剪裁后的照片即是用户想要拍摄的目标照片,照片拍摄完毕后,还需要进行压缩等处理,将照片压缩为专用的图片格式,并将完成压缩的照片保存在储存空间中,用以后续用户进行查看或者修改等操作。Specifically, the cropped photo is the target photo that the user wants to take. After the photo is taken, compression processing is also required, the photo is compressed into a dedicated image format, and the compressed photo is saved in the storage space. For subsequent user viewing or modification operations.
由于预览的设置不是与方形模式对应设置,因此缓存中的图像数据(此图像数据即是用以预览的图像数据)是非方形模式的尺寸比例,而用户选择方形模式进行拍照,最终得到的必须是方形的照片,因此需要将缓存中获取到的图像数据进行剪裁等处理来改变宽高比。因为照片被剪裁的部分为边缘部分,因此剪裁不会对照片的内容与质量造成明显的影响,而宽高比的缩小反而可以起到突出照片主题的作用(因为照片中的主题内容在整个照片中的比例增加了,因此会显得突出)。Since the setting of the preview is not set corresponding to the square mode, the image data in the buffer (this image data is the image data for previewing) is the size ratio of the non-square mode, and the user selects the square mode to take the photo, and the final result must be A square photo, so it is necessary to trim the image data obtained in the cache to change the aspect ratio. Because the portion of the photo that is cropped is the edge portion, cropping does not have a significant impact on the content and quality of the photo, and the reduction in aspect ratio can instead highlight the photo theme (because the subject matter in the photo is throughout the photo) The proportion in the increase has increased, so it will stand out).
进一步地,步骤S32所述将剪裁后的预览图像进行压缩,生成预设格式的目标照片并保存的步骤之后包括:Further, the step of compressing the trimmed preview image in step S32 to generate a target photo in a preset format and saving the method includes:
步骤S33,检测是否接收到第三方应用程序发出的处理请求;Step S33, detecting whether a processing request sent by a third-party application is received;
具体地,照片拍摄后,根据用户不同的需求,部分照片会需要第三方的应用程序进行拍摄后的处理,使得照片的效果增加完美,因此检测照片有无第三方应用程序的处理请求。Specifically, after the photo is taken, according to different needs of the user, some photos may require a third-party application to perform post-shooting processing, so that the effect of the photo is perfect, so the photo is detected whether there is a processing request of the third-party application.
步骤S331,若检测到第三方应用程序发出的处理请求,则将目标照片发送至第三方应用程序进行处理,并对反馈的照片进行保存。Step S331, if a processing request issued by the third-party application is detected, the target photo is sent to a third-party application for processing, and the fed-back photo is saved.
具体地,检测照片到由第三方应用程序需进行优化处理的请求时,将照片数据发送至第三方应用程序,使第三方应用程序能够完成对照片的优化处理。Specifically, when the photo is detected to a request that is optimized by the third-party application, the photo data is sent to the third-party application, so that the third-party application can complete the optimization of the photo.
目前通过第三方应用程序对照片进行优化处理是照片优化的常见方式,通过第三方应用程序,可以完善移动终端自身的不足。对于照片的优化处理来说,第三方应用程序相比移动终端的相机优化程序往往功能更为强大,因此使用第三方应用程序对照片进行优化处理,能够拟补移动终端对于照片优化的弱项,并且不用增加用户的使用成本(第三方应用程序往往是免费的,或者使用成本非常低),因此拍照后的照片数据若是有第三方应用程序的处理请求,则将照片数据发送至第三方应用程序进行处理(例如拍完照后可以用户选择人物美白功能,通过第三方应用程序对照片中的人物进行美白处理)。通过检测是否接收到第三方应用程序的处理请求,使得用户能够将照片效果进行更好的美化处理。At present, optimizing photos through third-party applications is a common way of photo optimization. Through third-party applications, the shortcomings of mobile terminals can be improved. For the optimization of photos, the third-party application is more powerful than the camera optimization program of the mobile terminal, so the third-party application is used to optimize the photo, which can complement the weakness of the mobile terminal for photo optimization, and There is no need to increase the user's use cost (the third-party application is often free or the usage cost is very low), so if the photo data after the photo is processed by a third-party application, the photo data is sent to the third-party application. Processing (for example, after the photo is taken, the user can select the character whitening function, and the third party application can whiten the characters in the photo). By detecting whether a processing request of a third-party application is received, the user can perform a better beautification of the photo effect.
进一步的,步骤S33检测是否接收到第三方应用程序发出的处理请求的步骤包括:Further, the step of detecting whether the processing request sent by the third-party application is received in step S33 comprises:
步骤S332,若未检测到第三方应用程序的处理请求,则根据预设路径将目标照片文件保存在本地。Step S332, if the processing request of the third-party application is not detected, the target photo file is saved locally according to the preset path.
具体地,在照片完成压缩并生成预设图片格式的文件后,将该文件储存在预定好的图片储存路径中,以文件的形式保存,储存的路径为预设的路径,以便用户能够快速的通过路径查找到所拍摄的照片。Specifically, after the photo is compressed and the file in the preset image format is generated, the file is stored in a predetermined image storage path, and is saved in the form of a file, and the stored path is a preset path, so that the user can quickly Find the captured photo by path.
用户拍摄照片后,需要将照片储存在本地,用以后续查看、编辑等操作。因为照片在以预设格式生成后,已经不会做出过多的修改等,因此需要储存在储存器中。储存器可以长时间的数据进行储存,但是读取的速度要慢于储存在缓存中的数据,然而缓存中的数据不能无限制的进行储存(因为缓存需要在供电的条件下才能正常工作,而储存空间,例如硬盘等可以在断电的情况下保存数据),因此完成照片拍摄后,将照片储存在预设路径的储存空间能够方便用户后续查看照片等操作After the user takes a photo, the photo needs to be stored locally for subsequent viewing, editing, and the like. Since the photo is not generated in the preset format, it will not be modified too much, etc., so it needs to be stored in the storage. The storage can store data for a long time, but the reading speed is slower than the data stored in the cache. However, the data in the cache cannot be stored without restriction (because the cache needs to be powered under normal conditions, Storage space, such as a hard disk, can save data in case of power failure. Therefore, after the photo is taken, storing the photos in the storage space of the preset path can facilitate the user to view the photos and so on.
本发明还提供具有一种终端拍照控制方法的移动终端。The present invention also provides a mobile terminal having a terminal photographing control method.
本发明基于终端拍照控制方法的移动终端包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的方形模式拍照程序,所述方形模式拍照程序被所述处理器执行时实现如上所述的终端拍照控制方法步骤。The mobile terminal based on the terminal photographing control method of the present invention comprises: a memory, a processor, and a square mode photographing program stored on the memory and operable on the processor, wherein the square mode photographing program is executed by the processor The terminal photographing control method steps as described above are implemented.
其中,在所述处理器上运行的方形模式拍照程序被执行时所实现的方法可参照本发明终端拍照控制方法各个实施例,在此不再赘述。For the method that is implemented when the square mode photographing program running on the processor is executed, reference may be made to various embodiments of the terminal photographing control method of the present invention, and details are not described herein again.
此外本发明实施例还提出一种计算机可读存储介质。Furthermore, embodiments of the present invention also provide a computer readable storage medium.
本发明计算机可读存储介质上存储有方形模式拍照程序,所述方形模式拍照程序被处理器执行时实现如上所述的终端拍照控制方法的步骤。The square readable photographing program is stored on the computer readable storage medium of the present invention, and the square mode photographing program is executed by the processor to implement the steps of the terminal photographing control method as described above.
其中,在所述处理器上运行的方形模式拍照程序被执行时所实现的方法可参照本发明终端拍照控制方法各个实施例,在此不再赘述。For the method that is implemented when the square mode photographing program running on the processor is executed, reference may be made to various embodiments of the terminal photographing control method of the present invention, and details are not described herein again.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, item, or system. An element defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in a process, method, article, or system that includes the element, without further limitation.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,移动终端,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, portions of the technical solution of the present invention that contribute substantially or to the prior art may be embodied in the form of a software product stored in a storage medium (such as a ROM/RAM as described above). , a disk, an optical disk, including a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, a mobile terminal, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (10)

  1. 一种终端拍照控制方法,其特征在于,所述终端拍照控制方法包括以下步骤: A terminal photographing control method is characterized in that the terminal photographing control method comprises the following steps:
    检测终端是否接收的用户输入的模式切换指令;Detecting a mode switching instruction of a user input received by the terminal;
    若终端接收到模式切换指令,将终端缓存中的预览图像预设边缘区域进行遮挡;If the terminal receives the mode switching instruction, the preset image edge region of the preview image in the terminal buffer is occluded;
    在接收到拍照指令时,将预览图像中预设边缘区域进行剪裁,以获取模式切换指令对应的目标照片。When receiving the photographing instruction, the preset edge area in the preview image is cropped to obtain the target photo corresponding to the mode switching instruction.
  2. 如权利要求1所述的终端拍照控制方法,其特征在于,所述若终端接收到模式切换指令,将终端缓存中储存的预览图像预设边缘区域进行遮挡的步骤包括:The terminal photographing control method according to claim 1, wherein the step of occluding the preset image edge region of the preview image stored in the terminal cache if the terminal receives the mode switching instruction comprises:
    若终端接收到模式切换指令,根据模式切换指令,对终端拍照模式的拍摄参数进行更新;If the terminal receives the mode switching instruction, the shooting parameter of the terminal photographing mode is updated according to the mode switching instruction;
    根据更新后拍摄参数中的宽高比,确定终端缓存中预览图像中的预设边缘区域,并对预览图像预设边缘区域进行遮挡。According to the aspect ratio in the updated shooting parameters, the preset edge area in the preview image in the terminal buffer is determined, and the preview image preset edge area is occluded.
  3. 如权利要求2所述的终端拍照控制方法,其特征在于,所述根据更新后拍摄参数中的宽高比,确定终端缓存中预览图像中的预设边缘区域的步骤包括:The terminal photographing control method according to claim 2, wherein the determining the preset edge region in the preview image in the buffer of the terminal according to the aspect ratio in the updated shooting parameter comprises:
    通过对角线的交点确定预览图像的几何中心,将该几何中心作为几何中心,生成以预览图像的宽度为宽度,长度满足拍摄宽高比的几何图形;Determine the geometric center of the preview image by the intersection of the diagonal lines, and use the geometric center as the geometric center to generate a geometric shape with the width of the preview image as the width and the length satisfying the shooting aspect ratio;
    将生成的几何图形与预览图像进行比对,预览图像不处于几何图形中的区域为设为预设边缘区域。The generated geometry is compared with the preview image, and the area in which the preview image is not in the geometry is set as the preset edge area.
  4. 如权利要求3所述的终端拍照控制方法,其特征在于,所述将生成的几何图形与预览图像进行比对,预览图像不处于几何图形中的区域为设为预设边缘区域的步骤之后包括:The terminal photographing control method according to claim 3, wherein the comparing the generated geometric figure with the preview image, and the area where the preview image is not in the geometric figure is after the step of setting the preset edge area :
    通过将预设边缘区域亮度设为零,使得边缘区域在显示时不会进行显示。By setting the brightness of the preset edge area to zero, the edge area is not displayed when it is displayed.
  5. 如权利要求1所述的终端拍照控制方法,其特征在于,所述在接收到拍照指令时,将预览图像中预设边缘区域进行剪裁,以获取模式切换指令对应的目标照片的步骤包括:The terminal photographing control method according to claim 1, wherein the step of cropping the preset edge region in the preview image to obtain the target photo corresponding to the mode switching instruction when the photographing instruction is received includes:
    若接收拍照指令,通过将预设边缘区域进行剪裁,使得预览图像的宽高比满足目标照片的宽高比。If the photographing instruction is received, the aspect ratio of the preview image is made to satisfy the aspect ratio of the target photograph by trimming the preset edge region.
  6. 如权利要求5所述的终端拍照控制方法,其特征在于,所述通过将预设边缘区域进行剪裁使得预览图像的宽高比满足目标照片的宽高比的步骤之后包括:The terminal photographing control method according to claim 5, wherein the step of cropping the preset edge region such that the aspect ratio of the preview image satisfies the aspect ratio of the target photo comprises:
    将剪裁后的预览图像进行压缩,生成预设格式的目标照片并保存。Compress the cropped preview image to generate a target photo in a preset format and save it.
  7. 如权利要求6所述的终端拍照控制方法,其特征在于,所述将剪裁后的预览图像进行压缩,生成预设格式的目标照片并保存的步骤之后包括:The terminal photographing control method according to claim 6, wherein the step of compressing the cropped preview image to generate a target photo in a preset format and saving the method comprises:
    检测是否接收到第三方应用程序发出的处理请求;Detecting whether a processing request from a third-party application is received;
    若检测到第三方应用程序发出的处理请求,则将目标照片发送至第三方应用程序进行处理,并对反馈的照片进行保存。If a processing request from a third-party application is detected, the target photo is sent to a third-party application for processing and the returned photo is saved.
  8. 如权利要求7所述的终端拍照控制方法,其特征在于,所述检测是否接收到第三方应用程序发出的处理请求的步骤包括:The terminal photographing control method according to claim 7, wherein the step of detecting whether a processing request issued by a third-party application is received comprises:
    若未检测到第三方应用程序的处理请求,则根据预设路径将目标照片文件保存在本地。If the processing request of the third-party application is not detected, the target photo file is saved locally according to the preset path.
  9. 一种移动终端,其特征在于,所述移动终端包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的方形模式拍照程序,所述方形模式拍照程序被所述处理器执行时实现如权利要求1至8中任一项所述的终端拍照控制方法的步骤。A mobile terminal, comprising: a memory, a processor, and a square mode photographing program stored on the memory and operable on the processor, wherein the square mode photographing program is The step of implementing the terminal photographing control method according to any one of claims 1 to 8 when the processor executes.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有方形模式拍照程序,所述方形模式拍照程序被处理器执行时实现如权利要求1至8中任一项所述的终端拍照控制方法的步骤。 A computer readable storage medium, wherein the computer readable storage medium stores a square mode photographing program, and the square mode photographing program is executed by a processor to implement any one of claims 1 to 8. The steps of the terminal photographing control method.
PCT/CN2017/105969 2017-10-13 2017-10-13 Terminal photograph capturing control method, mobile terminal, and readable storage medium WO2019071548A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/105969 WO2019071548A1 (en) 2017-10-13 2017-10-13 Terminal photograph capturing control method, mobile terminal, and readable storage medium
CN201780095919.5A CN111213363A (en) 2017-10-13 2017-10-13 Terminal photographing control method, mobile terminal and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/105969 WO2019071548A1 (en) 2017-10-13 2017-10-13 Terminal photograph capturing control method, mobile terminal, and readable storage medium

Publications (1)

Publication Number Publication Date
WO2019071548A1 true WO2019071548A1 (en) 2019-04-18

Family

ID=66101089

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/105969 WO2019071548A1 (en) 2017-10-13 2017-10-13 Terminal photograph capturing control method, mobile terminal, and readable storage medium

Country Status (2)

Country Link
CN (1) CN111213363A (en)
WO (1) WO2019071548A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110602410A (en) * 2019-10-25 2019-12-20 深圳市道通智能航空技术有限公司 Image processing method and device, aerial camera and storage medium
CN111324763A (en) * 2020-02-07 2020-06-23 Tcl移动通信科技(宁波)有限公司 Photo preview method and system, storage medium and terminal equipment
CN112073765A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 Display device
CN113766120A (en) * 2021-08-09 2021-12-07 荣耀终端有限公司 Shooting mode switching method and electronic equipment
WO2022037348A1 (en) * 2020-08-18 2022-02-24 北京达佳互联信息技术有限公司 Video generation method and apparatus

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113422906B (en) * 2021-06-22 2022-08-26 平安普惠企业管理有限公司 Method and device for setting resolution, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070201744A1 (en) * 2006-02-24 2007-08-30 Canon Kabushiki Kaisha Image processing method and image processing apparatus
US20150124078A1 (en) * 2012-07-04 2015-05-07 Sony Corporation Information processing apparatus, information processing method, program, and microscope system
CN105611147A (en) * 2015-10-30 2016-05-25 北京旷视科技有限公司 Shooting method and device
CN106657761A (en) * 2016-09-29 2017-05-10 乐视控股(北京)有限公司 Picture shooting method and device for intelligent terminal
CN107105117A (en) * 2017-03-16 2017-08-29 芜湖星途机器人科技有限公司 High photographing instrument image processing system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004146873A (en) * 2002-10-21 2004-05-20 Sony Corp Photographing apparatus
US7085590B2 (en) * 2003-12-31 2006-08-01 Sony Ericsson Mobile Communications Ab Mobile terminal with ergonomic imaging functions
JP2013090146A (en) * 2011-10-18 2013-05-13 Nikon Corp Imaging device and control program for imaging device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070201744A1 (en) * 2006-02-24 2007-08-30 Canon Kabushiki Kaisha Image processing method and image processing apparatus
US20150124078A1 (en) * 2012-07-04 2015-05-07 Sony Corporation Information processing apparatus, information processing method, program, and microscope system
CN105611147A (en) * 2015-10-30 2016-05-25 北京旷视科技有限公司 Shooting method and device
CN106657761A (en) * 2016-09-29 2017-05-10 乐视控股(北京)有限公司 Picture shooting method and device for intelligent terminal
CN107105117A (en) * 2017-03-16 2017-08-29 芜湖星途机器人科技有限公司 High photographing instrument image processing system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112073765A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 Display device
CN110602410A (en) * 2019-10-25 2019-12-20 深圳市道通智能航空技术有限公司 Image processing method and device, aerial camera and storage medium
WO2021078269A1 (en) * 2019-10-25 2021-04-29 深圳市道通智能航空技术有限公司 Image processing method and apparatus, aerial camera and storage medium
US20220247928A1 (en) * 2019-10-25 2022-08-04 Autel Robotics Co, Ltd. Image processing method and apparatus, aerial camera and storage medium
CN111324763A (en) * 2020-02-07 2020-06-23 Tcl移动通信科技(宁波)有限公司 Photo preview method and system, storage medium and terminal equipment
CN111324763B (en) * 2020-02-07 2023-08-15 Tcl移动通信科技(宁波)有限公司 Photo preview method and system, storage medium and terminal equipment thereof
WO2022037348A1 (en) * 2020-08-18 2022-02-24 北京达佳互联信息技术有限公司 Video generation method and apparatus
CN113766120A (en) * 2021-08-09 2021-12-07 荣耀终端有限公司 Shooting mode switching method and electronic equipment
CN113766120B (en) * 2021-08-09 2022-08-09 荣耀终端有限公司 Shooting mode switching method and electronic equipment

Also Published As

Publication number Publication date
CN111213363A (en) 2020-05-29

Similar Documents

Publication Publication Date Title
WO2019071548A1 (en) Terminal photograph capturing control method, mobile terminal, and readable storage medium
US10469746B2 (en) Camera and camera control method
WO2021051995A1 (en) Photographing method and terminal
WO2020171583A1 (en) Electronic device for stabilizing image and method for operating same
WO2017206456A1 (en) Method and apparatus for presenting video image in video call
KR101433157B1 (en) Mobile terminal and method for transmitting image thereof
WO2013122394A1 (en) Data processing apparatus and method using a camera
WO2015143841A1 (en) Mobile terminal and shooting method thereof
WO2019143095A1 (en) Method and server for generating image data by using multiple cameras
KR100617702B1 (en) Portable terminal capable of editing image and image edition method using that
US20080136942A1 (en) Image sensor equipped photographing apparatus and picture photographing method
WO2015186964A1 (en) Imaging device and video generation method by imaging device
WO2021157954A1 (en) Video recording method using plurality of cameras, and device therefor
WO2021013147A1 (en) Video processing method, device, terminal, and storage medium
WO2021056766A1 (en) Video screen capture method, terminal, and computer-readable storage medium
WO2015093732A1 (en) Mobile terminal and control method therefor
US20200059597A1 (en) Shooting method and terminal
US20240080567A1 (en) Photographing Method, Electronic Device and Non-transitory Computer-Readable Storage Medium
JP5594485B2 (en) Portable communication device
WO2019064757A1 (en) Image pickup device, image pickup method and program
KR20110090098A (en) Apparatus for processing digital image and thereof method
CN111406399A (en) Terminal shooting frame rate selection method, terminal and computer readable storage medium
CN112087570B (en) Image shooting method and device, electronic equipment and readable storage medium
US11412173B2 (en) Image processing device and image processing method
WO2021162301A1 (en) Electronic device and time-lapse image generation method of electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17928805

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17928805

Country of ref document: EP

Kind code of ref document: A1