Photographing method and device
Technical Field
The embodiment of the invention belongs to the field of information processing, and particularly relates to a photographing method and device.
Background
With the popularization of mobile terminals and the increasing of pixels of cameras of the mobile terminals, taking pictures by using the mobile terminals has become a popular and convenient and fast picture taking mode.
If the current user is inconvenient to take pictures by oneself, for example, play in a tourist attraction, hope that others help to take pictures, but many times, others do not know the habit of taking pictures of oneself, and the angle of taking pictures also has various deviations, leads to the photo of shooing not to conform to user's intention.
Disclosure of Invention
The embodiment of the invention provides a photographing method and device, and aims to solve the problem that a photo meeting requirements is difficult to photograph by using the conventional method.
The embodiment of the invention is realized in such a way that the photographing method comprises the following steps:
the method comprises the steps that a mobile terminal obtains image data obtained by setting a view angle by a user and stores the image data according to a first attribute parameter;
the mobile terminal collects current image data;
the mobile terminal traverses the current image data and judges whether the current image data is matched with the stored first attribute parameters;
and when the current image data is matched with the stored first attribute parameters, the mobile terminal sends a photographing prompt so that a user can take a picture meeting the requirements.
Another object of an embodiment of the present invention is to provide a photographing apparatus, including:
the storage unit is used for acquiring image data obtained by setting a viewing angle by a user and storing the image data by a first attribute parameter;
the data acquisition unit is used for acquiring current image data;
the judging unit is used for traversing the current image data by a user and judging whether the current image data is matched with the stored first attribute parameters;
and the photographing prompting unit is used for sending out a photographing prompt when the current image data is matched with the stored first attribute parameters so that a user can take a picture meeting the requirements.
In the embodiment of the invention, when the current image data is matched with the first attribute parameter, the currently selected view angle is shown to be in accordance with the view angle which is preset by the user and is considered to be satisfactory, so that through the photographing method, the photo in accordance with the view angle required by the user can be photographed when the user asks the other person to help to photograph, and the problem that the photo in accordance with the photographing habit of the user cannot be obtained when the other person helps to photograph is solved.
Drawings
Fig. 1 is a flowchart of a photographing method according to a first embodiment of the present invention;
fig. 2 is a structural diagram of a photographing apparatus according to a second embodiment of the present invention;
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the embodiment of the invention, the mobile terminal acquires the image data obtained by setting the view angle by the user, stores the image data by the first attribute parameter, acquires the current image data, traverses the current image data, judges whether the current image data is matched with the stored first attribute parameter, and sends out a photographing prompt if the current image data is matched with the stored first attribute parameter so that the user can photograph pictures meeting the requirements.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
The first embodiment is as follows:
fig. 1 shows a flowchart of a photographing method according to a first embodiment of the present invention, which is detailed as follows:
step S11, the mobile terminal obtains the image data obtained by setting the view angle by the user, and stores the image data by the first attribute parameter;
in this step, the user needs to set the angle of view, for example, set parameters such as the distance and size of a specific object in a desired photo, where the specific object may be a character avatar or some landmark buildings, for example, the position of some landmark buildings in some scenic spots in the photo or the position and size of the user avatar in the photo, and after the user finishes the setting action, the mobile terminal records and stores these image data in the first attribute parameters. Since the first attribute parameters stored by the mobile terminal are set by the user, such parameters are parameters that the user considers satisfactory.
Step S12, the mobile terminal collects the current image data;
in this step, when the user asks others to help to take a picture, the camera device of the mobile terminal collects current image data.
Step S13, the mobile terminal traverses the current image data and judges whether the current image data is matched with the stored first attribute parameters;
in this step, the current image data acquired through the camera of the mobile terminal is traversed, and then the current image data is respectively matched with the first attribute parameters which are generated by the viewing angle preset by the user in step S11 and stored in the mobile terminal, so as to judge whether the viewing angle selected by the current other person is matched with the viewing angle preset by the user and considered to be satisfactory.
Step S14, when the current image data is matched with the stored first attribute parameters, the mobile terminal sends out a photographing prompt for the user to take a picture meeting the requirements;
in this step, when the current image data can be matched with the first attribute parameter, it indicates that the currently selected view angle is in accordance with a view angle that is preset by the user and considered to be satisfactory, at this time, the mobile terminal sends a photographing prompt, where the prompting mode includes, but is not limited to, voice or image flashing and the like, at this time, the mobile terminal user clicks a photographing key to send a photographing instruction, and the mobile terminal executes a photographing action according to the received photographing instruction. Because the currently selected view angle meets the view angle which is preset by the user and is considered to be satisfactory, the photo meeting the requirements of the user can be shot.
Optionally, when the current image data is not matched with the stored first attribute parameter, it indicates that the currently selected view angle does not conform to a view angle that is preset by the user and is considered to be satisfactory, and if the user of the mobile terminal clicks a photographing key to send a photographing instruction at this time, the mobile terminal sends an alarm prompt and does not respond to the received photographing instruction.
In this step, in order to improve the user experience, a parameter matching range is further set, and when the current image data and the first attribute parameter are subjected to matching action, if a matching result falls within the parameter matching range, it indicates that the current viewing angle meets the viewing angle which is preset by the user and considered to be satisfactory, at this time, a photographing response may also be performed.
Optionally, the obtaining, by the mobile terminal, image data obtained by setting a viewing angle by a user, and storing the image data with a first attribute parameter specifically includes:
a110, acquiring the position of a user clicking a specific object on a screen of the mobile terminal, and analyzing the parameter of the position into the first attribute parameter.
And A120, storing the analyzed first attribute parameter.
In the above a110 and a120, the specific object may be a character avatar or some landmark buildings, such as the position of some landmark buildings in the picture in some scenic spots or the position and size of the user avatar in the picture. Analyzing the position of a specific object clicked by a user on a screen of the mobile terminal, analyzing the click position to obtain an analysis result comprising an abscissa, an ordinate and the like of the click position on the screen of the mobile terminal, and storing a first attribute parameter corresponding to the analysis result in the mobile terminal. Optionally, in order to improve the matching speed, the area image of the user click position is subjected to binarization processing, and the first attribute parameter obtained by the binarization processing is stored.
Optionally, in order to better improve the user experience, a specific function-on switch for turning on and off the photographing function may be provided in the mobile terminal in advance. The user can select to turn on the photographing function through the specific function starting switch only when the user needs to ask other people to be busy, when the user uses the mobile terminal to photograph, the photographing function can be turned off through the function starting switch, and the mobile terminal enters a common photographing mode at the moment.
Optionally, the traversing the current image data by the mobile terminal, and determining whether the current image data matches the stored first attribute parameter specifically includes: carrying out binarization processing on the current image data; and traversing the image data subjected to the binarization processing, and judging whether the image data subjected to the binarization processing is matched with the stored first attribute parameter. When the image data subjected to the binarization processing matches the stored first attribute parameter, the stored first attribute parameter is also the binarized image data. Of course, if the image data in color matches the stored first attribute parameter, the stored first attribute parameter is also the image data in color, and this is not limited here.
Optionally, the first attribute parameter specifically includes: the method comprises the steps of obtaining an area image of a specific object on a mobile terminal screen and position area coordinates of the area image on the mobile terminal screen. Wherein the position area coordinates include an abscissa and an ordinate of the screen. The specific object may be a character avatar or some landmark buildings, for example, the position of some landmark buildings in the picture in some scenic spots or the position and size of the user avatar in the picture.
In the first embodiment of the invention, the mobile terminal acquires image data obtained by setting a viewing angle by a user, stores the image data by using a first attribute parameter, acquires current image data, traverses the current image data, judges whether the current image data is matched with the stored first attribute parameter, and sends a photographing prompt if the current image data is matched with the stored first attribute parameter so that the user can photograph a picture meeting the requirements. When the current image data is matched with the first attribute parameter, the currently selected view angle is shown to be in accordance with the view angle which is preset by the user and is considered to be satisfactory, so that the photo with the view angle in accordance with the requirement of the user can be shot when the user asks the other person to help to shoot, the problem that the photo with the view angle in accordance with the shooting habit of the user cannot be obtained when the other person helps to shoot is solved, and meanwhile, the use degree of the user for shooting by using the mobile terminal can be further improved by adopting the shooting method.
It should be understood that, in the embodiment of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiment of the present invention.
Example two:
fig. 2 shows a block diagram of a photographing apparatus according to a second embodiment of the present invention, which is mainly applicable to a mobile terminal device, where the mobile terminal device may include a user equipment communicating with one or more core networks via a radio access network RAN, the user equipment may be a mobile phone (or referred to as "cellular" phone), a computer with mobile equipment, etc., and the user equipment may also be a portable, pocket, hand-held, computer-included or vehicle-mounted mobile apparatus, which exchanges voice and/or data with the radio access network. Also for example, the mobile device may include a smartphone, a tablet computer, a Personal Digital Assistant (PDA), a point-of-sale (POS) or a vehicle-mounted computer, etc. For convenience of explanation, only portions related to the embodiments of the present invention are shown.
The photographing device comprises a storage unit 21, a data acquisition unit 22, a judgment unit 23 and a photographing prompting unit 24. Wherein,
the storage unit 21 is configured to acquire image data obtained by setting a viewing angle by a user, and store the image data with a first attribute parameter.
Specifically, the user needs to set the angle of view, for example, set parameters such as the distance and size of a specific object in a desired picture, where the specific object may be a character avatar or some landmark buildings, for example, the position of some landmark buildings in some scenic spots in the picture or the position and size of the user avatar in the picture, and after the user finishes the setting action, the storage unit 21 records and stores the image data according to the first attribute parameter. Since the stored first attribute parameters are set by the user, such parameters are parameters that the user considers satisfactory.
And a data acquisition unit 22 for acquiring current image data. The data acquisition unit 22 may be a mobile terminal camera device. When the user asks others to help to take a picture, the data acquisition equipment acquires the current image data.
The judging unit 23 traverses the current image data, and judges whether the current image data matches the stored first attribute parameter.
The determination unit 23 traverses the current image data acquired by the data acquisition unit 22, and then matches the current image data with the first attribute parameters generated by the viewing angle preset by the user and stored in the mobile terminal storage unit 21.
And the photographing prompting unit 24 is configured to send a photographing prompt when the current image data matches the stored first attribute parameter, so that a user can take a picture meeting requirements.
When the current image data can be matched with the first attribute parameter, it indicates that the currently selected viewing angle matches a viewing angle that is considered to be satisfactory and preset by the user, at this time, the photographing prompting unit 24 issues a photographing prompt, where the prompting manner includes, but is not limited to, voice or image flashing.
Optionally, the storage unit 21 further includes:
the data analysis module is used for acquiring the position of a user clicking a specific object on a screen of the mobile terminal and analyzing the parameter of the position into the first attribute parameter; the specific object may be a character avatar or some landmark buildings, such as the position of some landmark buildings in the picture in some scenic spots or the position and size of the user avatar in the picture.
And the analysis result storage module is used for storing the first attribute parameters obtained by analysis. Optionally, in order to improve the matching speed, the area image of the user click position is subjected to binarization processing, and the first attribute parameter obtained by the binarization processing is stored.
Optionally, in order to better improve user experience, a function start setting unit may be set in the mobile terminal in advance, and the function start setting unit is used for setting a function start switch. The function starting switch is used for turning on and off the photographing function. The user can select to turn on the photographing function through the specific function starting switch only when the user needs to ask other people to be busy, when the user uses the mobile terminal to photograph, the photographing function can be turned off through the function starting switch, and the mobile terminal enters a common photographing mode at the moment.
Optionally, the determining unit 23 includes:
the data processing module is used for carrying out binarization processing on the current image data;
and the binarization processing result matching module is used for traversing the image data subjected to binarization processing and judging whether the image data subjected to binarization processing is matched with the stored first attribute parameters.
When the image data subjected to the binarization processing matches the stored first attribute parameter, the stored first attribute parameter is also the binarized image data. Of course, if the image data in color matches the stored first attribute parameter, the stored first attribute parameter is also the image data in color, and this is not limited here.
Optionally, the first attribute parameter in the photographing apparatus specifically includes: the method comprises the steps of obtaining an area image of a specific object on a mobile terminal screen and position area coordinates of the area image on the mobile terminal screen. Wherein the position area coordinates include an abscissa and an ordinate of the screen. The specific object may be a character avatar or some landmark buildings, for example, the position of some landmark buildings in the picture in some scenic spots or the position and size of the user avatar in the picture.
In the second embodiment of the present invention, the determining unit 23 traverses the acquiring unit 22 to acquire the current image data, and determines whether the current image data matches with the first attribute parameter stored in the storage unit 21, and when the current image data matches with the first attribute parameter, the photographing prompting unit 24 issues a photographing prompt for a user to photograph a picture meeting the requirement. When the current image data is matched with the first attribute parameter, the currently selected view angle is shown to be in accordance with the view angle which is preset by the user and is considered to be satisfactory, so that the photo with the view angle in accordance with the requirement of the user can be shot when the user asks the other person to help to shoot, the problem that the photo with the view angle in accordance with the shooting habit of the user cannot be obtained when the other person helps to shoot is solved, and meanwhile, the use degree of the user for shooting by using the mobile terminal can be further improved by adopting the shooting method.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.