WO2017219442A1 - 一种图像预览方法和装置 - Google Patents

一种图像预览方法和装置 Download PDF

Info

Publication number
WO2017219442A1
WO2017219442A1 PCT/CN2016/092084 CN2016092084W WO2017219442A1 WO 2017219442 A1 WO2017219442 A1 WO 2017219442A1 CN 2016092084 W CN2016092084 W CN 2016092084W WO 2017219442 A1 WO2017219442 A1 WO 2017219442A1
Authority
WO
WIPO (PCT)
Prior art keywords
preview image
magnification
preview
image
pixel size
Prior art date
Application number
PCT/CN2016/092084
Other languages
English (en)
French (fr)
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 中兴通讯股份有限公司
Publication of WO2017219442A1 publication Critical patent/WO2017219442A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/44Receiver circuitry for the reception of television signals according to analogue transmission standards
    • H04N5/445Receiver circuitry for the reception of television signals according to analogue transmission standards for displaying additional information

Definitions

  • the present application relates to, but is not limited to, the field of communication technologies, and in particular, to an image preview method and apparatus.
  • the embodiment of the invention provides an image preview method and device, which solves the problem that the preview image cannot be enlarged according to the pixel size of the target element in the image during image preview.
  • An image preview method comprising:
  • the preview image is enlarged and displayed according to the magnification of the preview image.
  • An image preview device includes: an acquisition module, a target element pixel size acquisition module, a magnification calculation module, and a display module.
  • the acquisition module is set to control the camera to capture a preview image.
  • a target element pixel size obtaining module is configured to obtain a pixel size of a target element in the preview image.
  • a magnification calculation module configured to acquire the preview according to a pixel size of the target element The magnification of the image.
  • the display module is configured to display the preview image in an enlarged manner according to a magnification of the preview image.
  • a computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the image preview method.
  • the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores one or more programs executable by a computer, and when the one or more programs are executed by the computer, the computer is executed as described above.
  • An image preview method is provided.
  • the preview image can be enlarged according to the pixel size of the target element in the image during image preview.
  • FIG. 1 is a flowchart of an image preview method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of another image preview method according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of still another image preview method according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of still another image preview method according to an embodiment of the present invention.
  • FIG. 5 is a structural diagram of an image preview apparatus according to an embodiment of the present invention.
  • FIG. 6 is a structural diagram of an image preview apparatus according to an embodiment of the present invention.
  • FIG. 7 is a structural diagram of another image preview apparatus according to an embodiment of the present invention.
  • FIG. 8 is a structural diagram of still another image preview apparatus according to an embodiment of the present invention.
  • FIG. 9 is a structural diagram of still another image preview apparatus according to an embodiment of the present invention.
  • an embodiment of the present invention provides an image preview method, including steps S101-S104:
  • Step S101 Control the camera to collect a preview image.
  • the camera is configured to collect a preview image. For example, when photographing or photographing, the camera captures a certain area, and the captured area of the camera changes with the movement of the camera. The image of these areas is the preview image.
  • Step S102 Acquire a pixel size of a target element in the preview image.
  • the target element in the preview image may be a text in the preview image, a face in the preview image, an avatar in the preview image, and the like.
  • the pixel size of the target element may be an average value, a median value, a minimum value, a maximum value, and the like of each character pixel size;
  • the pixel size of the target element may be The pixel size of the nose, the pixel size of the eye, the pixel size of the ear, the average, median, minimum or maximum value of the pixel size of the mouth; when the target element is a human avatar, according to the pixel size of the avatar, It is also possible to refer to the manner in which the pixel size of the above face is determined.
  • the determination of the target element may determine the target element according to the color feature, the texture feature, the edge feature, and the like of the target element.
  • the pixel calculation of the character is used in the embodiment of the present invention, and the calculation of other pixel sizes can refer to the calculation method of the pixel size of the character.
  • the step of calculating the pixel size of the text object in the preview image may be: determining the leftmost pixel point and the rightmost pixel point of the character in the X-axis direction as the start point and the end point of the character in the X-axis direction; determining the text on the Y-axis
  • the pixel points at the top and bottom of the direction are used as the start and end points of the text in the Y-axis direction, and the pixel coordinates of the start and end points of the X-axis and the Y-axis are calculated.
  • Step S103 Acquire a magnification of the preview image according to a pixel size of the target element.
  • the obtaining the magnification of the preview image according to the pixel size of the target element includes:
  • a ratio of a preset pixel size to a pixel size of the target element is calculated, and the calculated ratio is used as a magnification of the preview image.
  • the preset pixel size may be the pixel size of the system default font, such as a small font, a normal font, a large font, a pixel size of a large text, or a user according to his own needs and Like the size of the settings.
  • the preset pixel size can also be reduced as the resolution of the preview image is set to increase, for example, they are inversely proportional to each other, or a proportional function with a slope less than 0.
  • the preview image resolution is 16 million pixels.
  • the preview image resolution is 10 million pixels corresponding to the normal text pixel size
  • the preview image resolution is 8 million pixels corresponding to the large text pixel size
  • the preview image resolution is 5 million pixels corresponding to the large text pixel size.
  • Step S104 The preview image is enlarged and displayed according to the magnification of the preview image.
  • the pixel size of the target element in the preview image is collected, and the magnification is determined according to different scenes, and the preview image is enlarged when the image is previewed, thereby achieving preview according to the pixel size of the target element in the image.
  • the foregoing method further includes:
  • the photographing command may be a photographing button, and the user may send a photographing command by operating the photographing button, and the command may also be specific voice information, such as “photographing”, “eggplant”, and the like. After the device receives the photographing command, the photographing operation is performed, so that the enlarged preview image can be stored.
  • the preset pixel size is a pixel size of a system default font or a pixel size associated with a preview image resolution.
  • the enlarged preview image is stored by means of photographing, so that the user is more convenient when viewing the target element in the image, thereby providing convenience for the user to view the target element.
  • an embodiment of the present invention provides another image preview method, including steps S201-207:
  • Step S201 Control the camera to collect a preview image.
  • the camera is configured to collect a preview image. For example, when photographing or photographing, the camera captures a certain area, and the captured area of the camera changes with the movement of the camera. The image of these areas is the preview image.
  • Step S202 Acquire a pixel size of a target element in the preview image.
  • the target element in the preview image may be a text in the preview image, a face in the preview image, an avatar in the preview image, and the like.
  • the pixel size of the target element may be an average value, a median value, a minimum value, a maximum value, and the like of each character pixel size;
  • the pixel size of the target element may be The pixel size of the nose, the pixel size of the eye, the pixel size of the ear, the average, median, minimum or maximum value of the pixel size of the mouth; when the target element is a human avatar, according to the pixel size of the avatar, It is also possible to refer to the manner in which the pixel size of the above face is determined.
  • the determination of the target element may be based on the color feature, the texture feature, the edge feature, and the like of the target element, or may be combined with the color feature, the texture feature, and the edge feature of the target element to determine the target element.
  • the pixel calculation of the character is used in the embodiment of the present invention, and the calculation of other pixel sizes can refer to the calculation method of the pixel size of the character.
  • the step of calculating the pixel size of the text object in the preview image may be: determining the leftmost pixel point and the rightmost pixel point of the character in the X-axis direction as the start point and the end point of the character in the X-axis direction; determining the text on the Y-axis
  • the pixel points at the top and bottom of the direction are used as the start and end points of the text in the Y-axis direction, and the pixel coordinates of the start and end points of the X-axis and the Y-axis are calculated.
  • Step S203 Acquire a magnification of the preview image according to a pixel size of the target element.
  • the obtaining the magnification of the preview image according to the pixel size of the target element includes:
  • a ratio of a preset pixel size to a pixel size of the target element is calculated, and the calculated ratio is used as a magnification of the preview image.
  • the pixel size of the system default font may be the default size of the mobile device's default large font, large font, medium font or small font. These font sizes can also be set according to their own needs and preferences.
  • the above-mentioned process of correlating the pixel size associated with the preview image resolution may be such that the preset pixel size decreases as the preview image resolution increases, for example, an inverse proportional function relationship between them, or a positive proportional function relationship with a slope less than zero.
  • the preset pixel size may also be corresponding to the size of the text pixel in the mobile device, such as a small font, a normal font, a large font, a pixel size of a large text, for example, a preview image resolution of 16 million pixels corresponding to a small text pixel size
  • the preview image resolution is 10 million pixels corresponding to the normal text pixel size
  • the preview image resolution is 8 million pixels corresponding to the large text pixel size
  • the preview image resolution is 5 million.
  • the pixel corresponds to the size of the oversized text pixel.
  • the above magnification may be an integer or a decimal.
  • Step S204 Acquire an edge coordinate of an area associated with the target element and an edge coordinate of the preview image, where the area associated with the target element is an area of a plurality of areas pre-divided in the preview image.
  • the pre-divided plurality of regions may be divided according to the target element.
  • the region may be divided according to the text or the text group, or the preview image may be divided into the text regions.
  • For non-text areas select the edge coordinates of the text area when determining the edge coordinates; when the target element is a face or an avatar, divide the area according to the face or avatar, and select the face or avatar area when determining the edge coordinates.
  • the pre-divided area may be divided according to the object attached to the target element, for example, the text on the book, and the book may be used as an area when the area is divided, and the associated edge coordinate of the time is the edge coordinate of the book.
  • the text on the tea box can be used as an area when dividing the area.
  • the associated edge coordinates at this time are the edge coordinates of the tea box.
  • the present embodiment exemplifies the target element as a text, and the reference coordinates of the coordinates of the text are consistent with the reference coordinates of the preview image, and the edge coordinates of the obtained text or text group are (X1, Y1) (X2) , Y2) (X3, Y3) (X4, Y4) (X5, Y5) (X6, Y6) (X7, Y7) (X8, Y8) (Xn, Yn).
  • X1, Y1) (X2) , Y2) (X3, Y3)
  • What needs to be explained here is that when there is only one text, only the edge coordinates of the text are obtained; when there are multiple characters, the edge coordinates of the text group are obtained, and the associated edge coordinates at this time are the edge coordinates or characters of the text.
  • Step S205 A minimum value of a ratio of edge coordinates of the preview image and an edge coordinate of the region associated with the target element is used as a reference magnification of the preview image.
  • the ratio is determined as: determining a minimum value and a maximum value of the abscissa direction of the preview image and a minimum value and a maximum value of the ordinate direction; determining a minimum value, a maximum value, and an ordinate of the abscissa direction of the associated area of the target element
  • the minimum and maximum values of the direction then the following values are respectively obtained, the minimum value in the abscissa direction of the preview image/the minimum value in the abscissa direction of the associated region of the target element, and the maximum value in the abscissa direction of the preview image/the associated region of the target element
  • the maximum value of the abscissa direction, preview The minimum value of the ordinate direction of the image/the minimum value of the ordinate direction of the target element-related area and the maximum value of the ordinate direction of the preview image/the maximum value of the ordinate direction of the target element-related area.
  • the minimum value of the above ratio is taken as the reference magnification of the preview image
  • Step S206 determining a magnification of the preview image and a size of the reference magnification. If the magnification of the preview image is greater than or equal to the reference magnification, the magnification of the preview image is set to the reference amplification. multiple.
  • Step S207 The preview image is enlarged and displayed according to the magnification of the preview image.
  • the foregoing method further includes:
  • the photographing command may be a photographing button, and the user may send a photographing command by operating the photographing button, and the command may also be specific voice information, such as “photographing”, “eggplant”, and the like. After the device receives the photographing command, the photographing operation is performed, so that the enlarged preview image can be stored.
  • the preset pixel size is a pixel size of a system default font or a pixel size associated with a preview image resolution.
  • the reference magnification is determined by the edge coordinates of the target element associated region and the edge coordinates of the preview image, so that the enlarged preview image is prevented from being too large, and the enlarged target region of the target element may exceed the original preview image. size.
  • the embodiment of the present invention provides another image previewing method, including steps S301-S307:
  • Step S301 Control the camera to collect a preview image.
  • the camera is configured to collect a preview image. For example, when photographing or photographing, the camera captures a certain area, and the captured area of the camera changes with the movement of the camera. The image of these areas is the preview image.
  • Step S302 Acquire a pixel size of a target element in the preview image.
  • the target element in the preview image may be a text in the preview image, a face in the preview image, an avatar in the preview image, and the like.
  • the pixel size of the target element may be an average value, a median value, a minimum value, a maximum value, and the like of each character pixel size;
  • the pixel size of the above target element may be the pixel size of the nose of the human face, the pixel size of the eye, the pixel size of the ear, the average value, the median, the minimum value or the maximum value of the pixel size of the mouth.
  • the target element When the target element is a human avatar, it may be determined according to the pixel size of the avatar or the pixel size of the above-mentioned face. The determination of the target element may be based on the color feature, the texture feature, the edge feature, and the like of the target element, or may be combined with the color feature, the texture feature, and the edge feature of the target element to determine the target element.
  • the pixel calculation of the character is used in the embodiment of the present invention, and the calculation of other pixel sizes can refer to the calculation method of the pixel size of the character.
  • the step of calculating the pixel size of the text object in the preview image may be: determining the leftmost pixel point and the rightmost pixel point of the character in the X-axis direction as the start point and the end point of the character in the X-axis direction; determining the text on the Y-axis
  • the pixel points at the top and bottom of the direction are used as the start and end points of the text in the Y-axis direction, and the pixel coordinates of the start and end points of the X-axis and the Y-axis are calculated.
  • Step S303 Acquire a magnification of the preview image according to a pixel size of the target element.
  • the obtaining the magnification of the preview image according to the pixel size of the target element includes:
  • a ratio of a preset pixel size to a pixel size of the target element is calculated, and the calculated ratio is used as a magnification of the preview image.
  • the pixel size of the system default font may be the default size of the mobile device's default large font, large font, medium font or small font. These font sizes can also be set according to their own needs and preferences.
  • the above-mentioned process of correlating the pixel size associated with the preview image resolution may be such that the preset pixel size decreases as the preview image resolution increases, for example, an inverse proportional function relationship between them, or a positive proportional function relationship with a slope less than zero.
  • the preset pixel size may also be corresponding to the size of the text pixel in the mobile device, such as a small font, a normal font, a large font, a pixel size of a large text, for example, a preview image resolution of 16 million pixels corresponding to a small text pixel size
  • the preview image has a resolution of 10 million pixels corresponding to the normal text pixel size, and the preview image resolution is 8 million pixels corresponding to a large text pixel size, and the preview image resolution is 5 million pixels corresponding to a large text pixel size.
  • the above magnification may be an integer or a decimal.
  • Step S304 Acquire a horizontal resolution of the screen of the mobile device and a resolution of the preview image.
  • Step S305 using a ratio of a resolution of the preview image to a horizontal resolution of the screen of the mobile device as a reference magnification of the preview image.
  • a 5-inch screen with a resolution of 1280*720 the corresponding preview image resolution can be 16 million (4928*3264), 10 million (3876*2584), 8 million (3264*2448), 5 million. (2580*1936), its horizontal resolution ratio to the screen is 4.5 times, 3.6 times, 3.4 times, 2.7 times.
  • the preview image resolution is 16 million (4928*3264)
  • the corresponding preview image has a reference magnification of 4.5 times.
  • Step S306 determining a magnification of the preview image and a size of the reference magnification. If the magnification of the preview image is greater than or equal to the reference magnification, the magnification of the preview image is set to the reference amplification. multiple.
  • Step S307 The preview image is enlarged and displayed according to the magnification of the preview image.
  • the foregoing method further includes:
  • the photographing command may be a photographing button, and the user may send a photographing command by operating the photographing button, and the command may also be specific voice information, such as “photographing”, “eggplant”, and the like. After the device receives the photographing command, the photographing operation is performed, so that the enlarged preview image can be stored.
  • the preset pixel size is a pixel size of a system default font or a pixel size associated with a preview image resolution.
  • the reference magnification is determined by the preview image resolution of the device and the horizontal resolution of the screen, thereby ensuring that the target element associated region is enlarged and displayed on the original preview image interface.
  • an embodiment of the present invention provides an image preview method, including steps S401-S405:
  • Step S401 Control the camera to collect a preview image.
  • the camera is configured to collect a preview image. For example, when photographing or photographing, the camera captures a certain area, and the captured area of the camera changes with the movement of the camera. The image of these areas is the preview image.
  • Step S402 Acquire a pixel size of a target element in the preview image.
  • the target element in the preview image may be a text in the preview image, a face in the preview image, an avatar in the preview image, and the like.
  • the pixel size of the target element may be an average value, a median value, a minimum value, a maximum value, and the like of each character pixel size;
  • the pixel size of the target element may be The pixel size of the nose, the pixel size of the eye, the pixel size of the ear, the average, median, minimum or maximum value of the pixel size of the mouth; when the target element is a human avatar, according to the pixel size of the avatar, It is also possible to refer to the manner in which the pixel size of the above face is determined.
  • the determination of the target element may be based on the color feature, the texture feature, the edge feature, and the like of the target element, or may be combined with the color feature, the texture feature, and the edge feature of the target element to determine the target element.
  • the pixel calculation of the character is used in the embodiment of the present invention, and the calculation of other pixel sizes can refer to the calculation method of the pixel size of the character.
  • the step of calculating the pixel size of the text object in the preview image may be: determining the leftmost pixel point and the rightmost pixel point of the character in the X-axis direction as the start point and the end point of the character in the X-axis direction; determining the text on the Y-axis
  • the pixel points at the top and bottom of the direction are used as the start and end points of the text in the Y-axis direction, and the pixel coordinates of the start and end points of the X-axis and the Y-axis are calculated.
  • Step S403 Acquire a magnification of the preview image according to a pixel size of the target element.
  • the obtaining the magnification of the preview image according to the pixel size of the target element includes:
  • a ratio of a preset pixel size to a pixel size of the target element is calculated, and the calculated ratio is used as a magnification of the preview image.
  • the pixel size of the system default font may be the default size of the mobile device's default large font, large font, medium font or small font. These font sizes can also be set according to their own needs and preferences.
  • the above-mentioned process of correlating the pixel size associated with the preview image resolution may be such that the preset pixel size decreases as the preview image resolution increases, for example, an inverse proportional function relationship between them, or a positive proportional function relationship with a slope less than zero.
  • the preset pixel size may also be corresponding to the size of the text pixel in the mobile device, such as a small font, a normal font, a large font, a pixel size of a large text, for example, a preview image resolution of 16 million pixels corresponding to a small text pixel size
  • the preview image resolution is 10 million pixels corresponding to the normal text pixel size
  • the preview image resolution is 8 million pixels corresponding to the large text pixel size
  • the preview image resolution is 5 million.
  • the pixel corresponds to the size of the oversized text pixel.
  • the above magnification may be an integer or a decimal.
  • Step S404 determining a magnification of the preview image and a maximum magnification M allowed by the mobile device. If the magnification of the preview image is greater than or equal to M, setting the magnification of the preview image to M times. .
  • the maximum magnification allowed by the mobile device may be the maximum magnification set by the user or the maximum magnification allowed by the mobile device hardware.
  • Step S405 The preview image is enlarged and displayed according to the magnification of the preview image.
  • the foregoing method further includes:
  • the photographing command may be a photographing button, and the user may send a photographing command by operating the photographing button, and the command may also be specific voice information, such as “photographing”, “eggplant”, and the like. After the device receives the photographing command, the photographing operation is performed, so that the enlarged preview image can be stored.
  • the preset pixel size is a pixel size of a system default font or a pixel size associated with a preview image resolution.
  • the maximum magnification allowed by the mobile device ensures that the preview image in the technical solution in this embodiment can be normally enlarged and displayed.
  • an embodiment of the present invention further provides an image preview apparatus 50, including: an acquisition module 51, a target element pixel size acquisition module 52, a magnification calculation module 53, and a display module 54.
  • the acquisition module 51 is configured to control the camera to collect a preview image.
  • the target element pixel size obtaining module 52 is configured to acquire a pixel size of the target element in the preview image.
  • the magnification calculation module 53 is configured to acquire the magnification of the preview image according to the pixel size of the target element.
  • the display module 54 is configured to display the preview image in an enlarged manner according to the magnification of the preview image.
  • the amplification calculation module acquires the according to a pixel size of the target element.
  • the magnification of the preview image includes:
  • a ratio of a preset pixel size to a pixel size of the target element is calculated, and the calculated ratio is used as a magnification of the preview image.
  • the preset pixel size is a pixel size of a system default font or a pixel size associated with a preview image resolution.
  • the image preview apparatus 50 further includes: a receiving module 55 and a response module 56.
  • the receiving module 55 is configured to receive a photographing command.
  • the response module 56 is configured to store the enlarged preview image in response to the photographing command.
  • the image preview apparatus 50 further includes an edge coordinate acquiring module 57 , a first reference magnification acquiring module 58 , and a first preview image magnification acquiring module 59 .
  • the edge coordinate acquiring module 57 is configured to acquire edge coordinates of the region associated with the target element and edge coordinates of the preview image before the display module enlarges the preview image according to the magnification of the preview image.
  • the area associated with the target element is an area of a plurality of areas pre-divided in the preview image.
  • the first reference magnification obtaining module 58 is configured to set a minimum value of a ratio of edge coordinates of the preview image and an edge coordinate of the region to which the target element is associated as a reference magnification of the preview image.
  • the first preview image magnification obtaining module 59 is configured to determine a magnification of the preview image and a size of the reference magnification, and if the magnification of the preview image is greater than or equal to the reference magnification, the preview image The magnification is set to the reference magnification.
  • the preview device 50 further includes: a resolution acquiring module 510, a second reference magnification acquiring module 511, and a second preview image magnification acquiring module 512.
  • the resolution obtaining module 510 is configured to acquire a horizontal resolution of the screen of the mobile device and a resolution of the preview image before the display module enlarges the preview image according to the magnification of the preview image.
  • the second reference magnification obtaining module 511 is configured to use a ratio of a resolution of the preview image to a horizontal resolution of the screen of the mobile device as a reference magnification of the preview image.
  • the second preview image magnification obtaining module 512 is configured to determine a magnification of the preview image and a size of the reference magnification, and if the magnification of the preview image is greater than or equal to the reference magnification, the preview image The magnification is set to the reference magnification.
  • the image preview apparatus 50 further includes: a third preview image magnification multiple acquiring module 513 .
  • the third preview image magnification obtaining module 513 is configured to determine the magnification of the preview image and the maximum magnification allowed by the mobile device before the display module enlarges the preview image according to the magnification of the preview image.
  • the size of M if the magnification of the preview image is greater than or equal to M, the magnification of the preview image is set to M times.
  • the image preview device 50 can implement each of the processes implemented in the method embodiments of FIG. 1 to FIG. 4, and details are not described herein again to avoid repetition.
  • the image preview device 50 can achieve a technical effect of magnifying the preview image according to the pixel size of the target element in the image.
  • a computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the image preview method.
  • the preview image is enlarged and displayed according to the magnification of the preview image.
  • the method further includes:
  • the enlarged preview image is stored in response to the photographing command.
  • the obtaining the magnification of the preview image according to the pixel size of the target element includes:
  • the preset pixel size is a pixel size of a system default font or a pixel size associated with a preview image resolution.
  • the method further includes: obtaining an edge coordinate of an area associated with the target element and an edge coordinate of the preview image, before the preview image is enlarged according to a magnification of the preview image, where
  • the area associated with the target element is an area of a plurality of areas pre-divided in the preview image.
  • a minimum value of a ratio of an edge coordinate of the preview image and an edge coordinate of a region to which the target element is associated is used as a reference magnification of the preview image.
  • Determining a magnification of the preview image and a size of the reference magnification If the magnification of the preview image is greater than or equal to the reference magnification, the magnification of the preview image is set to the reference magnification.
  • the method further comprises: obtaining a horizontal resolution of the screen of the mobile device and a resolution of the preview image before the preview image is enlarged according to the magnification of the preview image.
  • a ratio of a resolution of the preview image to a horizontal resolution of the screen of the mobile device is used as a reference magnification of the preview image.
  • Determining a magnification of the preview image and a size of the reference magnification If the magnification of the preview image is greater than or equal to the reference magnification, the magnification of the preview image is set to the reference magnification.
  • the method further includes: before zooming in on the preview image according to a magnification of the preview image, determining a magnification of the preview image and a maximum magnification M allowed by the mobile device, if When the magnification of the preview image is greater than or equal to M, the magnification of the preview image is set to M times.
  • the storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • the device/function module/functional unit in the above embodiment When the device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the preview image can be enlarged according to the pixel size of the target element in the image during image preview.

Landscapes

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

Abstract

本申请提供一种图像预览方法和装置,所述方法包括:控制摄像头采集预览图像,获取所述预览图像中目标元素的像素大小,根据所述目标元素的像素大小获取所述预览图像的放大倍数,按照所述预览图像的放大倍数对所述预览图像进行放大显示。

Description

一种图像预览方法和装置 技术领域
本申请涉及但不限于通信技术领域,尤其涉及一种图像预览方法和装置。
背景技术
随着科学技术的发展,移动装置的应用也越来越广泛,同时,越来越多的人们通过摄像头采集预览图像中的目标元素,例如采集预览图像中的文字信息、采集预览图像中的人脸信息等等。但是,在采集预览图像中的目标元素过程中由于手机的屏幕分辨率变得越高,预览图像的目标元素所占的屏幕像素变得越小,特别是本身占用像素较小的目标元素在默认的预览图像经常显示不清楚,用户需要在预览时对预览图像进行手动放大,操作麻烦。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供了一种图像预览方法和装置,解决了图像预览时不能根据图像中的目标元素的像素大小对预览图像放大的问题。
一种图像预览方法,包括:
控制摄像头采集预览图像。
获取所述预览图像中目标元素的像素大小。
根据所述目标元素的像素大小获取所述预览图像的放大倍数。
按照所述预览图像的放大倍数对所述预览图像进行放大显示。
一种图像预览装置,包括:采集模块、目标元素像素大小获取模块、放大倍数计算模块和显示模块。
采集模块,设置为控制摄像头采集预览图像。
目标元素像素大小获取模块,设置为获取所述预览图像中目标元素的像素大小。
放大倍数计算模块,设置为根据所述目标元素的像素大小获取所述预览 图像的放大倍数。
显示模块,设置为按照所述预览图像的放大倍数对所述预览图像进行放大显示。
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现所述的图像预览方法。
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行的一个或多个程序,所述一个或多个程序被所述计算机执行时使所述计算机执行如上述提供的一种图像预览方法。
本发明实施例方案具有如下优点或有益效果:
通过控制摄像头采集预览图像,获取所述预览图像中目标元素的像素大小,根据所述目标元素的像素大小获取所述预览图像的放大倍数,按照所述预览图像的放大倍数对所述预览图像进行放大显示,在图像预览时可以根据图像中的目标元素的像素大小对预览图像进行放大。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为本发明实施例提供的一种图像预览方法的流程图;
图2为本发明实施例提供的另一种图像预览方法的流程图;
图3为本发明实施例提供的再一种图像预览方法的流程图;
图4为本发明实施例提供的还一种图像预览方法的流程图;
图5为本发明实施例提供的一种图像预览装置的结构图;
图6为本发明实施例提供的一种图像预览装置的结构图;
图7为本发明实施例提供的另一种图像预览装置的结构图;
图8为本发明实施例提供再一种图像预览装置的结构图;
图9为本发明实施例提供的还一种图像预览装置的结构图。
本发明的实施方式
下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在 不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
如图1所示,本发明实施例提供一种图像预览方法,包括步骤S101-S104:
步骤S101、控制摄像头采集预览图像。
其中,上述摄像头设置为采集预览图像,例如,平时拍照或者摄影的时候,摄像头会采集到一定的区域,摄像头采集到区域随着摄像头的移动而变化,这些区域的图像就是上述预览图像。
步骤S102、获取所述预览图像中目标元素的像素大小。
其中,上述预览图像中的目标元素可以是预览图像中的文字、预览图像中的人脸、预览图像中的头像等等。当目标元素为文字时,上述目标元素的像素大小可以是每个文字像素大小的平均值、中值、最小值、最大值等等;当目标元素为人脸时,上述目标元素的像素大小可以是人脸上鼻子的像素大小、眼睛的像素大小、耳朵的像素大小、嘴巴的像素大小中的平均值、中值、最小值或者最大值;当目标元素为人头像时,可以根据头像的像素大小,也可以参照上述人脸的像素大小的确定方式。关于目标元素的确定可以根据目标元素的颜色特征、纹理特征、边缘特征等来确定目标元素。
关于像素的大小的计算,本发明实施例当中以文字的像素计算来说明,其他的像素大小的计算可以参照文字的像素大小的计算方式。计算预览图像中文字对象所占像素大小的步骤可以为:确定文字在X轴方向上最左边的像素点与最右边的像素点作为文字在X轴方向上的起点和终点;确定文字在Y轴方向上顶部像素点与底部的像素点作为文字在Y轴方向上的起点与终点,通过X轴和Y轴起点和终点的像素坐标差,计算出文字所占像素大小。
步骤S103、根据所述目标元素的像素大小获取所述预览图像的放大倍数。
可选地,所述根据所述目标元素的像素大小获取所述预览图像的放大倍数包括:
计算预先设置的像素大小与所述目标元素的像素大小的比值,将计算出的所述比值作为所述预览图像的放大倍数。
其中,预先设置的像素大小可以为系统默认字体的像素大小,如小字体、正常字体、大字体、超大文字的像素大小,也可以是用户根据自己的需求和 喜好设置的大小。预先设置的像素大小还可以随着设置的预览图像分辨率的增大而减少,例如他们之间呈反比例函数关系,或者是斜率小于0的正比例函数关系,例如,预览图像分辨率为1600万像素时对应小文字像素大小,预览图像分辨率为1000万像素时对应正常文字像素大小,预览图像分辨率为800万像素时对应大文字像素大小,预览图像分辨率为500万像素时对应超大文字像素大小。
步骤S104、按照所述预览图像的放大倍数对所述预览图像进行放大显示。
本实施例中采集预览图像中目标元素的像素大小,并根据不同的场景来确定放大倍数,并在图像预览的时候对预览图像进行放大,从而达到了根据图像中的目标元素的像素大小对预览图像放大的技术效果。
可选地,上述方法还包括:
接收拍照命令;响应所述拍照命令,存储放大后的预览图像。
其中,上述拍照命令可以为拍照按钮,用户通过操作拍照按钮来发送拍照命令,上述命令也可以是特定的语音信息,如“拍照”、“茄子”等等。装置接收到拍照命令之后,执行拍照操作,这样就可以吧放大后的预览图像进行存储下来。
可选地,所述预先设置的像素大小为系统默认字体的像素大小或者与预览图像分辨率相关联的像素大小。
本实施例中通过拍照的方式把放大后的预览图像存储下来,这样用户在查看图像中的目标元素的时候更加方便,从而给用户对目标元素进行查看的时候提供了方便。
如图2所示,本发明实施例提供另一种图像预览方法,包括步骤S201-207:
步骤S201、控制摄像头采集预览图像。
其中,上述摄像头设置为采集预览图像,例如,平时拍照或者摄影的时候,摄像头会采集到一定的区域,摄像头采集到区域随着摄像头的移动而变化,这些区域的图像就是上述预览图像。
步骤S202、获取所述预览图像中目标元素的像素大小。
其中,上述预览图像中的目标元素可以是预览图像中的文字、预览图像中的人脸、预览图像中的头像等等。当目标元素为文字时,上述目标元素的像素大小可以是每个文字像素大小的平均值、中值、最小值、最大值等等;当目标元素为人脸时,上述目标元素的像素大小可以是人脸上鼻子的像素大小、眼睛的像素大小、耳朵的像素大小、嘴巴的像素大小中的平均值、中值、最小值或者最大值;当目标元素为人头像时,可以根据头像的像素大小,也可以参照上述人脸的像素大小的确定方式。关于目标元素的确定可以根据目标元素的颜色特征、纹理特征、边缘特征等,也可以结合目标元素的颜色特征、纹理特征、边缘特征来确定目标元素。
关于像素的大小的计算,本发明实施例当中以文字的像素计算来说明,其他的像素大小的计算可以参照文字的像素大小的计算方式。计算预览图像中文字对象所占像素大小的步骤可以为:确定文字在X轴方向上最左边的像素点与最右边的像素点作为文字在X轴方向上的起点和终点;确定文字在Y轴方向上顶部像素点与底部的像素点作为文字在Y轴方向上的起点与终点,通过X轴和Y轴起点和终点的像素坐标差,计算出文字所占像素大小。
步骤S203、根据所述目标元素的像素大小获取所述预览图像的放大倍数。
可选地,所述根据所述目标元素的像素大小获取所述预览图像的放大倍数包括:
计算预先设置的像素大小与所述目标元素的像素大小的比值,将计算出的所述比值作为所述预览图像的放大倍数。
其中,系统默认字体的像素大小可以是移动装置默认的超大字体、大字体、中字体或者小字体的像素大小,这些字体大小用户也可以根据自己的需求和喜好进行设置。上述与预览图像分辨率相关联的像素大小的关联过程可以是预先设置的像素大小随着预览图像分辨率的增大而减少例如他们之间是反比例函数关系,或者是斜率小于0的正比例函数关系;也可以将预先设置的像素大小对应为移动装置中的文字像素大小,如小字体、正常字体、大字体、超大文字的像素大小,例如,预览图像分辨率为1600万像素时对应小文字像素大小,预览图像分辨率为1000万像素时对应正常文字像素大小,预览图像分辨率为800万像素时对应大文字像素大小,预览图像分辨率为500万 像素时对应超大文字像素大小。上述放大倍数可以取整数,也可以取小数。
步骤S204、获取所述目标元素所关联区域的边缘坐标和所述预览图像的边缘坐标,其中,所述目标元素所关联区域为所述预览图像中预先划分的多个区域的一个区域。
其中,预先划分的多个区域可以是根据目标元素进行划分的,例如当预览图像有多处文字或者文字群时,可以根据文字或者文字群进行区域划分,也可以将预览图像划分为有文字区域非文字区域,在确定边缘坐标的时候选取有文字区域的边缘坐标;当目标元素为人脸或者头像的时候,则根据人脸或者头像进行区域划分,在确定边缘坐标的时候选取有人脸或者头像区域的边缘坐标。上述预先划分的区域可以根据目标元素所附属的实物来划分区域,例如书上的文字,在进行区域划分的时候可以将这本书作为一个区域,这个时候的关联的边缘坐标为书本的边缘坐标;茶叶盒上的文字,在进行区域划分的时候可以将这茶叶盒作为一个区域,这个时候的关联的边缘坐标为茶叶盒的边缘坐标。
在确定关联区域的边缘坐标本实施例以目标元素为文字进行举例说明,文字的坐标的参考坐标与预览图像的参考坐标保持一致,获取文字或者文字群的边缘坐标为(X1,Y1)(X2,Y2)(X3,Y3)(X4,Y4)(X5,Y5)(X6,Y6)(X7,Y7)(X8,Y8)……(Xn,Yn)。这里需要说明的是,当只有一个文字时候,仅仅获取这一个文字的边缘坐标;当有多个文字的时候则获取文字群的边缘坐标,这个时候的关联的边缘坐标为文字的边缘坐标或者文字群的边缘坐标。上述预览图像的边缘坐标为跟上述文字或者文字群的边缘坐标获取方式一样。
步骤S205、将所述预览图像的边缘坐标与所述目标元素所关联的区域的边缘坐标的比值的最小值作为所述预览图像的参考放大倍数。
其中,上述比值的确定为:确定预览图像的横坐标方向的最小值和最大值和纵坐标方向的最小值和最大值;确定目标元素关联区域的横坐标方向的最小值和最大值和纵坐标方向的最小值和最大值;然后分别求下列值,预览图像的横坐标方向的最小值/目标元素关联区域的横坐标方向的最小值,预览图像的横坐标方向的最大值/目标元素关联区域的横坐标方向的最大值,预览 图像的纵坐标方向的最小值/目标元素关联区域的纵坐标方向的最小值和预览图像的纵坐标方向的最大值/目标元素关联区域的纵坐标方向的最大值。最后取上述比值的最小值作为预览图像的参考放大倍数。
步骤S206、判断所述预览图像的放大倍数与所述参考放大倍数的大小,如果所述预览图像的放大倍数大于或者等于所述参考放大倍数时,则预览图像的放大倍数设置为所述参考放大倍数。
步骤S207、按照所述预览图像的放大倍数对所述预览图像进行放大显示。
可选地,上述方法还包括:
接收拍照命令;响应所述拍照命令,存储放大后的预览图像。
其中,上述拍照命令可以为拍照按钮,用户通过操作拍照按钮来发送拍照命令,上述命令也可以是特定的语音信息,如“拍照”、“茄子”等等。装置接收到拍照命令之后,执行拍照操作,这样就可以吧放大后的预览图像进行存储下来。
可选地,所述预先设置的像素大小为系统默认字体的像素大小或者与预览图像分辨率相关联的像素大小。
本实施例中通过目标元素关联区域的边缘坐标和预览图像的边缘坐标来确定参考放大倍数,这样可以防止放大后的预览图像过大而导致放大后的目标元素所关联区域会超过原始的预览图像大小。
如图3所示,本发明实施例提供再一种图像预览方法,包括步骤S301-S307:
步骤S301、控制摄像头采集预览图像。
其中,上述摄像头设置为采集预览图像,例如,平时拍照或者摄影的时候,摄像头会采集到一定的区域,摄像头采集到区域随着摄像头的移动而变化,这些区域的图像就是上述预览图像。
步骤S302、获取所述预览图像中目标元素的像素大小。
其中,上述预览图像中的目标元素可以是预览图像中的文字、预览图像中的人脸、预览图像中的头像等等。当目标元素为文字时,上述目标元素的像素大小可以是每个文字像素大小的平均值、中值、最小值、最大值等等; 当目标元素为人脸时,上述目标元素的像素大小可以是人脸上鼻子的像素大小、眼睛的像素大小、耳朵的像素大小、嘴巴的像素大小中的平均值、中值、最小值或者最大值;当目标元素为人头像时,可以根据头像的像素大小,也可以参照上述人脸的像素大小的确定方式。关于目标元素的确定可以根据目标元素的颜色特征、纹理特征、边缘特征等,也可以结合目标元素的颜色特征、纹理特征、边缘特征来确定目标元素。
关于像素的大小的计算,本发明实施例当中以文字的像素计算来说明,其他的像素大小的计算可以参照文字的像素大小的计算方式。计算预览图像中文字对象所占像素大小的步骤可以为:确定文字在X轴方向上最左边的像素点与最右边的像素点作为文字在X轴方向上的起点和终点;确定文字在Y轴方向上顶部像素点与底部的像素点作为文字在Y轴方向上的起点与终点,通过X轴和Y轴起点和终点的像素坐标差,计算出文字所占像素大小。
步骤S303、根据所述目标元素的像素大小获取所述预览图像的放大倍数。
可选地,所述根据所述目标元素的像素大小获取所述预览图像的放大倍数包括:
计算预先设置的像素大小与所述目标元素的像素大小的比值,将计算出的所述比值作为所述预览图像的放大倍数。
其中,系统默认字体的像素大小可以是移动装置默认的超大字体、大字体、中字体或者小字体的像素大小,这些字体大小用户也可以根据自己的需求和喜好进行设置。上述与预览图像分辨率相关联的像素大小的关联过程可以是预先设置的像素大小随着预览图像分辨率的增大而减少例如他们之间是反比例函数关系,或者是斜率小于0的正比例函数关系;也可以将预先设置的像素大小对应为移动装置中的文字像素大小,如小字体、正常字体、大字体、超大文字的像素大小,例如,预览图像分辨率为1600万像素时对应小文字像素大小,预览图像分辨率为1000万像素时对应正常文字像素大小,预览图像分辨率为800万像素时对应大文字像素大小,预览图像分辨率为500万像素时对应超大文字像素大小。上述放大倍数可以取整数,也可以取小数。
步骤S304、获取移动装置屏幕的水平分辨率和所述预览图像的分辨率。
步骤S305、将所述预览图像的分辨率与所述移动装置屏幕的水平分辨率的比值作为所述预览图像的参考放大倍数。
例如,一款5寸屏幕分辨率为1280*720的手机,对应的预览图像分辨率可以为1600万(4928*3264),1000万(3876*2584),800万(3264*2448),500万(2580*1936),其与屏幕的水平分辨率比值分别为4.5倍、3.6倍、3.4倍、2.7倍。当预览图像分辨率为1600万(4928*3264)的时候,其对应的预览图像的参考放大倍数为4.5倍。
步骤S306、判断所述预览图像的放大倍数与所述参考放大倍数的大小,如果所述预览图像的放大倍数大于或者等于所述参考放大倍数时,则预览图像的放大倍数设置为所述参考放大倍数。
步骤S307、按照所述预览图像的放大倍数对所述预览图像进行放大显示。
可选地,上述方法还包括:
接收拍照命令;响应所述拍照命令,存储放大后的预览图像。
其中,上述拍照命令可以为拍照按钮,用户通过操作拍照按钮来发送拍照命令,上述命令也可以是特定的语音信息,如“拍照”、“茄子”等等。装置接收到拍照命令之后,执行拍照操作,这样就可以吧放大后的预览图像进行存储下来。
可选地,所述预先设置的像素大小为系统默认字体的像素大小或者与预览图像分辨率相关联的像素大小。
本实施例中通过装置的预览图像分辨率和屏幕的水平分辨率来确定参考放大倍数,从而保证目标元素关联区域放大后在原始预览图像界面显示。
如图4所示,本发明实施例提供还一种图像预览方法,包括步骤S401-S405:
步骤S401、控制摄像头采集预览图像。
其中,上述摄像头设置为采集预览图像,例如,平时拍照或者摄影的时候,摄像头会采集到一定的区域,摄像头采集到区域随着摄像头的移动而变化,这些区域的图像就是上述预览图像。
步骤S402、获取所述预览图像中目标元素的像素大小。
其中,上述预览图像中的目标元素可以是预览图像中的文字、预览图像中的人脸、预览图像中的头像等等。当目标元素为文字时,上述目标元素的像素大小可以是每个文字像素大小的平均值、中值、最小值、最大值等等;当目标元素为人脸时,上述目标元素的像素大小可以是人脸上鼻子的像素大小、眼睛的像素大小、耳朵的像素大小、嘴巴的像素大小中的平均值、中值、最小值或者最大值;当目标元素为人头像时,可以根据头像的像素大小,也可以参照上述人脸的像素大小的确定方式。关于目标元素的确定可以根据目标元素的颜色特征、纹理特征、边缘特征等,也可以结合目标元素的颜色特征、纹理特征、边缘特征来确定目标元素。
关于像素的大小的计算,本发明实施例当中以文字的像素计算来说明,其他的像素大小的计算可以参照文字的像素大小的计算方式。计算预览图像中文字对象所占像素大小的步骤可以为:确定文字在X轴方向上最左边的像素点与最右边的像素点作为文字在X轴方向上的起点和终点;确定文字在Y轴方向上顶部像素点与底部的像素点作为文字在Y轴方向上的起点与终点,通过X轴和Y轴起点和终点的像素坐标差,计算出文字所占像素大小。
步骤S403、根据所述目标元素的像素大小获取所述预览图像的放大倍数。
可选地,所述根据所述目标元素的像素大小获取所述预览图像的放大倍数包括:
计算预先设置的像素大小与所述目标元素的像素大小的比值,将计算出的所述比值作为所述预览图像的放大倍数。
其中,系统默认字体的像素大小可以是移动装置默认的超大字体、大字体、中字体或者小字体的像素大小,这些字体大小用户也可以根据自己的需求和喜好进行设置。上述与预览图像分辨率相关联的像素大小的关联过程可以是预先设置的像素大小随着预览图像分辨率的增大而减少例如他们之间是反比例函数关系,或者是斜率小于0的正比例函数关系;也可以将预先设置的像素大小对应为移动装置中的文字像素大小,如小字体、正常字体、大字体、超大文字的像素大小,例如,预览图像分辨率为1600万像素时对应小文字像素大小,预览图像分辨率为1000万像素时对应正常文字像素大小,预览图像分辨率为800万像素时对应大文字像素大小,预览图像分辨率为500万 像素时对应超大文字像素大小。上述放大倍数可以取整数,也可以取小数。
步骤S404、判断所述预览图像的放大倍数与移动装置允许的最大放大倍数M的大小,如果所述预览图像的放大倍数大于或者等于M时,则将所述预览图像的放大倍数设置为M倍。
上述移动装置允许的最大放大倍数可以是用户设置的最大放大倍数,也可以是移动装置硬件所允许的最大放大倍数。
步骤S405、按照所述预览图像的放大倍数对所述预览图像进行放大显示。
可选地,上述方法还包括:
接收拍照命令;响应所述拍照命令,存储放大后的预览图像。
其中,上述拍照命令可以为拍照按钮,用户通过操作拍照按钮来发送拍照命令,上述命令也可以是特定的语音信息,如“拍照”、“茄子”等等。装置接收到拍照命令之后,执行拍照操作,这样就可以吧放大后的预览图像进行存储下来。
可选地,所述预先设置的像素大小为系统默认字体的像素大小或者与预览图像分辨率相关联的像素大小。
本实施例中通过移动装置允许的最大放大倍数来保证该实施例中的技术方案中的预览图像能正常放大显示。
如图5所示,本发明实施例还提供一种图像预览装置50,包括:采集模块51、目标元素像素大小获取模块52、放大倍数计算模块53和显示模块54。
采集模块51,设置为控制摄像头采集预览图像。
目标元素像素大小获取模块52,设置为获取所述预览图像中目标元素的像素大小。
放大倍数计算模块53,设置为根据所述目标元素的像素大小获取所述预览图像的放大倍数。
显示模块54,设置为按照所述预览图像的放大倍数对所述预览图像进行放大显示。
可选地,所述放大倍数计算模块根据所述目标元素的像素大小获取所述 预览图像的放大倍数包括:
计算预先设置的像素大小与所述目标元素的像素大小的比值,将计算出的所述比值作为所述预览图像的放大倍数。
可选地,所述预先设置的像素大小为系统默认字体的像素大小或者与预览图像分辨率相关联的像素大小。
可选地,如图6所示,图像预览装置50还包括:接收模块55和响应模块56。
接收模块55,设置为接收拍照命令。
响应模块56,设置为响应所述拍照命令,存储放大后的预览图像。
可选地,如图7所示,图像预览装置50还包括:边缘坐标获取模块57、第一参考放大倍数获取模块58和第一预览图像放大倍数获取模块59。
边缘坐标获取模块57,设置为在所述显示模块按照所述预览图像的放大倍数对所述预览图像进行放大之前,获取所述目标元素所关联区域的边缘坐标和所述预览图像的边缘坐标,其中,所述目标元素所关联区域为所述预览图像中预先划分的多个区域的一个区域。
第一参考放大倍数获取模块58,设置为将所述预览图像的边缘坐标与所述目标元素所关联的区域的边缘坐标的比值的最小值作为所述预览图像的参考放大倍数。
第一预览图像放大倍数获取模块59,设置为判断所述预览图像的放大倍数与所述参考放大倍数的大小,如果所述预览图像的放大倍数大于或者等于所述参考放大倍数时,则预览图像的放大倍数设置为所述参考放大倍数。
可选地,如图8所示,预览装置50还包括:分辨率获取模块510、第二参考放大倍数获取模块511和第二预览图像放大倍数获取模块512。
分辨率获取模块510,设置为在所述显示模块按照所述预览图像的放大倍数对所述预览图像进行放大之前,获取移动装置屏幕的水平分辨率和所述预览图像的分辨率。
第二参考放大倍数获取模块511,设置为将所述预览图像的分辨率与所述移动装置屏幕的水平分辨率的比值作为所述预览图像的参考放大倍数。
第二预览图像放大倍数获取模块512,设置为判断所述预览图像的放大倍数与所述参考放大倍数的大小,如果所述预览图像的放大倍数大于或者等于所述参考放大倍数时,则预览图像的放大倍数设置为所述参考放大倍数。
可选地,如图9所示,图像预览装置50还包括:第三预览图像放大倍数获取模块513。
第三预览图像放大倍数获取模块513,设置为在所述显示模块按照所述预览图像的放大倍数对所述预览图像进行放大之前,判断所述预览图像的放大倍数与移动装置允许的最大放大倍数M的大小,如果所述预览图像的放大倍数大于或者等于M时,则将所述预览图像的放大倍数设置为M倍。
图像预览装置50能够实现图1至图4的方法实施例中实现的每个过程,为避免重复,这里不再赘述。图像预览装置50可以达到根据图像中的目标元素的像素大小对预览图像放大的技术效果。
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现所述的图像预览方法。
本领域普通技术人员可以理解实现上述实施例方法的全部或者部分步骤是可以通过程序指令相关的硬件来完成,所述的程序可以存储于一计算机可读取介质中,该程序在执行时,可以包括以下步骤:
控制摄像头采集预览图像。
获取所述预览图像中目标元素的像素大小。
根据所述目标元素的像素大小获取所述预览图像的放大倍数。
按照所述预览图像的放大倍数对所述预览图像进行放大显示。
可选地,所述方法还包括:
接收拍照命令。
响应所述拍照命令,存储放大后的预览图像。
可选地,所述根据所述目标元素的像素大小获取所述预览图像的放大倍数包括:
计算预先设置的像素大小与所述目标元素的像素大小的比值,将计算出 的所述比值作为所述预览图像的放大倍数。
可选地,所述预先设置的像素大小为系统默认字体的像素大小或者与预览图像分辨率相关联的像素大小。
可选地,所述方法还包括:在按照所述预览图像的放大倍数对所述预览图像进行放大之前,获取所述目标元素所关联区域的边缘坐标和所述预览图像的边缘坐标,其中,所述目标元素所关联区域为所述预览图像中预先划分的多个区域的一个区域。
将所述预览图像的边缘坐标与所述目标元素所关联的区域的边缘坐标的比值的最小值作为所述预览图像的参考放大倍数。
判断所述预览图像的放大倍数与所述参考放大倍数的大小,如果所述预览图像的放大倍数大于或者等于所述参考放大倍数时,则预览图像的放大倍数设置为所述参考放大倍数。
可选地,所述方法还包括:在按照所述预览图像的放大倍数对所述预览图像进行放大之前,获取移动装置屏幕的水平分辨率和所述预览图像的分辨率。
将所述预览图像的分辨率与所述移动装置屏幕的水平分辨率的比值作为所述预览图像的参考放大倍数。
判断所述预览图像的放大倍数与所述参考放大倍数的大小,如果所述预览图像的放大倍数大于或者等于所述参考放大倍数时,则预览图像的放大倍数设置为所述参考放大倍数。
可选地,所述方法还包括:在按照所述预览图像的放大倍数对所述预览图像进行放大之前,判断所述预览图像的放大倍数与移动装置允许的最大放大倍数M的大小,如果所述预览图像的放大倍数大于或者等于M时,则将所述预览图像的放大倍数设置为M倍。
所述的存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一个计算机可读存储介质 中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。
上述实施例中的装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
工业实用性
通过控制摄像头采集预览图像,获取所述预览图像中目标元素的像素大小,根据所述目标元素的像素大小获取所述预览图像的放大倍数,按照所述预览图像的放大倍数对所述预览图像进行放大显示,在图像预览时可以根据图像中的目标元素的像素大小对预览图像进行放大。

Claims (15)

  1. 一种图像预览方法,包括:
    控制摄像头采集预览图像;
    获取所述预览图像中目标元素的像素大小;
    根据所述目标元素的像素大小获取所述预览图像的放大倍数;
    按照所述预览图像的放大倍数对所述预览图像进行放大显示。
  2. 根据权利要求1所述的图像预览方法,所述方法还包括:
    接收拍照命令;
    响应所述拍照命令,存储放大后的预览图像。
  3. 根据权利要求1所述的图像预览方法,其中,所述根据所述目标元素的像素大小获取所述预览图像的放大倍数包括:
    计算预先设置的像素大小与所述目标元素的像素大小的比值,将计算出的所述比值作为所述预览图像的放大倍数。
  4. 根据权利要求3所述的图像预览方法,其中,所述预先设置的像素大小为系统默认字体的像素大小或者与预览图像分辨率相关联的像素大小。
  5. 根据权利要求1至3任意一项所述的图像预览方法,所述方法还包括:
    在按照所述预览图像的放大倍数对所述预览图像进行放大之前,获取所述目标元素所关联区域的边缘坐标和所述预览图像的边缘坐标,其中,所述目标元素所关联区域为所述预览图像中预先划分的多个区域的一个区域;
    将所述预览图像的边缘坐标与所述目标元素所关联的区域的边缘坐标的比值的最小值作为所述预览图像的参考放大倍数;
    判断所述预览图像的放大倍数与所述参考放大倍数的大小,如果所述预览图像的放大倍数大于或者等于所述参考放大倍数时,则预览图像的放大倍数设置为所述参考放大倍数。
  6. 根据权利要求1至3任意一项所述的图像预览方法,所述方法还包括:在按照所述预览图像的放大倍数对所述预览图像进行放大之前,获取移动装置屏幕的水平分辨率和所述预览图像的分辨率;
    将所述预览图像的分辨率与所述移动装置屏幕的水平分辨率的比值作为所述预览图像的参考放大倍数;
    判断所述预览图像的放大倍数与所述参考放大倍数的大小,如果所述预览图像的放大倍数大于或者等于所述参考放大倍数时,则预览图像的放大倍数设置为所述参考放大倍数。
  7. 根据权利要求1至3任意一项所述的图像预览方法,所述方法还包括:在按照所述预览图像的放大倍数对所述预览图像进行放大之前,判断所述预览图像的放大倍数与移动装置允许的最大放大倍数M的大小,如果所述预览图像的放大倍数大于或者等于M,则将所述预览图像的放大倍数设置为M倍。
  8. 一种图像预览装置,其特征在于,包括:采集模块、目标元素像素大小获取模块、放大倍数计算模块和显示模块;
    所述采集模块,设置为控制摄像头采集预览图像;
    所述目标元素像素大小获取模块,设置为获取所述预览图像中目标元素的像素大小;
    所述放大倍数计算模块,设置为根据所述目标元素的像素大小获取所述预览图像的放大倍数;
    所述显示模块,设置为按照所述预览图像的放大倍数对所述预览图像进行放大显示。
  9. 根据权利要求8所述的图像预览装置,所述装置还包括:接收模块和响应模块;
    所述接收模块,设置为接收拍照命令;
    所述响应模块,设置为响应所述拍照命令,存储放大后的预览图像。
  10. 根据权利要求8所述的图像预览装置,其中,所述放大倍数计算模块根据所述目标元素的像素大小获取所述预览图像的放大倍数包括:
    计算预先设置的像素大小与所述目标元素的像素大小的比值,将计算出的所述比值作为所述预览图像的放大倍数。
  11. 根据权利要求10所述的图像预览装置,其中,所述预先设置的像素 大小为系统默认字体的像素大小或者与预览图像分辨率相关联的像素大小。
  12. 根据权利要求8至10任意一项所述的图像预览装置,所述装置还包括:边缘坐标获取模块、第一参考放大倍数获取模块和第一预览图像放大倍数获取模块;
    所述边缘坐标获取模块,设置为在所述显示模块按照所述预览图像的放大倍数对所述预览图像进行放大之前,获取所述目标元素所关联区域的边缘坐标和所述预览图像的边缘坐标,其中,所述目标元素所关联区域为所述预览图像中预先划分的多个区域的一个区域;
    所述第一参考放大倍数获取模块,设置为将所述预览图像的边缘坐标与所述目标元素所关联的区域的边缘坐标的比值的最小值作为所述预览图像的参考放大倍数;
    所述第一预览图像放大倍数获取模块,设置为判断所述预览图像的放大倍数与所述参考放大倍数的大小,如果所述预览图像的放大倍数大于或者等于所述参考放大倍数时,则预览图像的放大倍数设置为所述参考放大倍数。
  13. 根据权利要求8至10任意一项所述的图像预览装置,所述装置还包括:分辨率获取模块、第二参考放大倍数获取模块和第二预览图像放大倍数获取模块;
    所述分辨率获取模块,设置为在所述显示模块按照所述预览图像的放大倍数对所述预览图像进行放大之前,获取移动装置屏幕的水平分辨率和所述预览图像的分辨率;
    所述第二参考放大倍数获取模块,设置为将所述预览图像的分辨率与所述移动装置屏幕的水平分辨率的比值作为所述预览图像的参考放大倍数;
    所述第二预览图像放大倍数获取模块,设置为判断所述预览图像的放大倍数与所述参考放大倍数的大小,如果所述预览图像的放大倍数大于或者等于所述参考放大倍数时,则预览图像的放大倍数设置为所述参考放大倍数。
  14. 根据权利要求8至10任意一项所述的图像预览装置,所述装置还包括:第三预览图像放大倍数获取模块;
    所述第三预览图像放大倍数获取模块,设置为在所述显示模块按照所述 预览图像的放大倍数对所述预览图像进行放大之前,判断所述预览图像的放大倍数与移动装置允许的最大放大倍数M的大小,如果所述预览图像的放大倍数大于或者等于M时,则将所述预览图像的放大倍数设置为M倍。
  15. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现权利要求1至7任意一项所述的图像预览方法。
PCT/CN2016/092084 2016-06-24 2016-07-28 一种图像预览方法和装置 WO2017219442A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610473852.1 2016-06-24
CN201610473852.1A CN107547727B (zh) 2016-06-24 2016-06-24 一种图像预览方法和装置

Publications (1)

Publication Number Publication Date
WO2017219442A1 true WO2017219442A1 (zh) 2017-12-28

Family

ID=60783867

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/092084 WO2017219442A1 (zh) 2016-06-24 2016-07-28 一种图像预览方法和装置

Country Status (2)

Country Link
CN (1) CN107547727B (zh)
WO (1) WO2017219442A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112085782A (zh) * 2020-09-08 2020-12-15 广州医软智能科技有限公司 放大倍率检测方法及检测装置

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108513067B (zh) * 2018-03-29 2021-01-08 维沃移动通信有限公司 一种拍摄控制方法及移动终端
CN110365898A (zh) * 2019-07-11 2019-10-22 维沃移动通信有限公司 一种拍摄方法及终端设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102106145A (zh) * 2008-07-30 2011-06-22 三星电子株式会社 用于显示再现图像的放大的目标区域的装置和方法
US20130069946A1 (en) * 2011-09-20 2013-03-21 General Electric Company Systems and methods for accurate measurement with a mobile device
CN103197882A (zh) * 2013-02-22 2013-07-10 北京小米科技有限责任公司 一种显示图像的方法及其移动终端
CN103546716A (zh) * 2012-07-17 2014-01-29 三星电子株式会社 提供图像的系统及方法
CN104463776A (zh) * 2014-10-30 2015-03-25 深圳市金立通信设备有限公司 一种图像显示方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050033949A (ko) * 2003-10-07 2005-04-14 삼성전자주식회사 휴대용 단말기의 오토줌임 제어방법
CN101634795B (zh) * 2009-08-20 2011-06-08 上海合合信息科技发展有限公司 相机自动聚焦方法及系统
CN103019537B (zh) * 2012-11-19 2016-04-13 广东欧珀移动通信有限公司 一种图像预览方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102106145A (zh) * 2008-07-30 2011-06-22 三星电子株式会社 用于显示再现图像的放大的目标区域的装置和方法
US20130069946A1 (en) * 2011-09-20 2013-03-21 General Electric Company Systems and methods for accurate measurement with a mobile device
CN103546716A (zh) * 2012-07-17 2014-01-29 三星电子株式会社 提供图像的系统及方法
CN103197882A (zh) * 2013-02-22 2013-07-10 北京小米科技有限责任公司 一种显示图像的方法及其移动终端
CN104463776A (zh) * 2014-10-30 2015-03-25 深圳市金立通信设备有限公司 一种图像显示方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112085782A (zh) * 2020-09-08 2020-12-15 广州医软智能科技有限公司 放大倍率检测方法及检测装置

Also Published As

Publication number Publication date
CN107547727B (zh) 2020-12-29
CN107547727A (zh) 2018-01-05

Similar Documents

Publication Publication Date Title
US9338311B2 (en) Image-related handling support system, information processing apparatus, and image-related handling support method
EP2283642B1 (en) Method, apparatus, and computer program product for presenting burst images
RU2629436C2 (ru) Способ и устройство управления масштабированием и устройство цифровой фотосъемки
WO2016123893A1 (zh) 拍照的方法和装置以及终端
CN106973228B (zh) 一种拍摄方法及电子设备
JP5347279B2 (ja) 画像表示装置
JP6534655B2 (ja) プレビューイメージの表示方法および装置
US10832460B2 (en) Method and apparatus for generating image by using multi-sticker
EP2822267A2 (en) Method and apparatus for previewing a dual-shot image
WO2014154003A1 (zh) 一种自拍图像的展现方法及装置
US10282862B2 (en) Digital image generation and capture hint data
WO2017219442A1 (zh) 一种图像预览方法和装置
US10908795B2 (en) Information processing apparatus, information processing method
EP2200275B1 (en) Method and apparatus of displaying portrait on a display
US11595584B2 (en) Imaging apparatus, method of controlling imaging apparatus and computer-readable medium
CN113905170A (zh) 变焦控制方法、装置、存储介质及电子装置
US11743573B2 (en) Imaging apparatus for adjusting photographing conditions according to photographed images and method for controlling imaging apparatus
JP6115815B2 (ja) 合成画像生成装置及び合成画像生成方法
TWI475883B (zh) 攝像裝置及其分隔式攝像方法
JP2013174719A (ja) 画像表示装置、カメラ、および画像表示プログラム
JP2021090170A (ja) 情報処理装置、情報処理方法、プログラム及び記憶媒体
EP3866455A1 (en) Device and method for capturing images or video
JP6705477B2 (ja) 画像処理システム、画像処理方法およびプログラム
JP6652911B2 (ja) 画像処理装置、画像処理方法、プログラム、及び画像処理システム
JP2017092733A (ja) カメラ配置支援装置、カメラ配置支援方法、およびプログラム

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: 16905982

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: 16905982

Country of ref document: EP

Kind code of ref document: A1