Disclosure of Invention
The embodiment of the invention provides a picture acquisition method, a picture acquisition system and terminal equipment, which can take shooting and watching simultaneously and obtain a high-definition fidelity picture on the premise of not interfering user practice.
In a first aspect, an embodiment of the present invention provides a picture collecting method, which is applied to a mobile terminal, where the mobile terminal includes a camera and a screen, and the method includes:
acquiring image data obtained by shooting a virtual image of a region to be shot at a second angle through the camera; a first angle is formed between the virtual image and the area to be shot;
and correcting the image data according to the first angle and the second angle to obtain corrected image data so as to display the corrected image data through the screen.
In a possible design, before acquiring image data obtained by shooting a virtual image of an area to be shot at a second angle by the camera, the method further includes:
acquiring the screen size of the screen;
determining the imaging size of the camera according to the screen size;
the acquiring of image data obtained by shooting a virtual image of an area to be shot at a second angle by the camera includes:
and acquiring image data obtained by shooting the virtual image of the region to be shot at a second angle through the camera according to the imaging size.
In a possible design, after the rectifying the image data according to the first angle and the second angle to obtain rectified image data for displaying through the screen, the method further includes:
intercepting the corrected image data according to the size of a viewing frame to obtain an intercepted image; the size of the viewing frame is determined based on size information input by a user.
In one possible design, before the rectifying the image data according to the first angle and the second angle, the rectifying further includes:
preprocessing the image data to obtain preprocessed image data;
the rectifying the image data according to the first angle and the second angle includes:
and correcting the preprocessed image data according to the first angle and the second angle.
In one possible design, the preprocessing the image data to obtain the preprocessed image data includes:
denoising the image data to obtain denoised image data;
and carrying out binarization processing on the denoised image data to obtain the preprocessed image data.
In one possible design, the image data is video data or a still picture.
In a second aspect, an embodiment of the present invention provides a mobile terminal, including:
a camera, a screen and a processor;
the camera is used for shooting a virtual image of the area to be shot at a second angle to obtain image data; a first angle is formed between the virtual image and the area to be shot;
the processor is configured to execute the picture acquisition method in the first aspect and various possible designs of the first aspect, and obtain the corrected image data;
the screen is used for displaying the corrected image data.
In one possible design, the camera is a front-facing camera.
In a third aspect, an embodiment of the present invention provides a picture collecting system, including: a viewing assembly and a support;
the view finding assembly is arranged on the terminal equipment in a first posture and used for acquiring a virtual image of an area to be shot; the first angle is related to the setting posture of the viewfinder assembly;
the support is used for fixing the mobile terminal in a second posture in the second aspect and various possible designs of the second aspect; the second angle is related to the second pose.
In one possible design, the viewing assembly is a mirror;
the reflective mirror is arranged above the terminal equipment and used for obtaining the virtual image of the area to be shot through reflection of light.
In one possible design, the central vertical line of the mirror surface of the reflective mirror and the optical axis of the lens of the terminal device are both located in the vertical plane of the area to be shot, and the vertical line of the mirror surface and the optical axis of the lens form a preset angle.
In one possible design, the bracket includes a horizontal support component and a groove disposed on the horizontal support component; the groove is used for placing the terminal equipment so as to fix the terminal equipment into the second posture.
The method comprises the steps of obtaining image data obtained by shooting a virtual image of a region to be shot at a second angle through the camera; the virtual image and the area to be shot form a first angle, and the image data are corrected according to the first angle and the second angle to obtain corrected image data so as to be displayed through the screen. This embodiment is through setting up first angle with the virtual image in shooting region is treated to the second angle is shot, can realize under the prerequisite that does not influence the normal painting and calligraphy exercise of user to suitable angle shows the picture to the user, and through correcting the image, can present the picture of no deformation high definition fidelity for the user.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic structural diagram of a picture acquisition system according to an embodiment of the present invention. As shown in fig. 1, the picture capturing system includes an adjusting frame 11 and a mobile terminal 12, the adjusting frame 11 is used for fixing the mobile terminal 12, alternatively, the adjusting frame 11 may include a bendable supporting rod, and a first clamping member 111 and a second clamping member 112 disposed at two ends of the supporting rod, the first clamping member 111 may be used for clamping on a fixed platform 14 (e.g., a table body) to fix the adjusting frame 11 on the fixed platform 14, and the second clamping member 112 is used for clamping the mobile terminal 12. The mobile terminal 12 includes a camera 121 and a display 122, the camera 121 is configured to capture an image of a region to be captured 13 (a region for calligraphy or painting practice) to obtain image data, and the display 122 is configured to display the image data. Alternatively, camera 121 may be a front-facing camera (disposed on the same side of mobile terminal 12 as display 122) or a rear-facing camera (disposed on the opposite side of mobile terminal 12 as display 122). The mobile terminal 12 is a terminal device having both shooting and displaying functions, such as a mobile phone, a tablet computer, and the like, and optionally, the mobile terminal 12 (mobile phone or tablet computer) may adopt an android system or an apple system.
In a specific implementation process, the adjusting frame 11 may be fixed on the fixed platform 14 by the first clamping member 111, the mobile terminal 12 may be fixed by the second clamping member 112, and the mobile terminal 12 may shoot a picture of the area to be shot 13 on the fixed platform 14 at a proper shooting angle by adjusting the supporting rod between the first clamping member 111 and the second clamping member 112. After the mobile terminal 12 is adjusted, the user can perform writing or drawing exercises in the area 13 to be photographed of the fixed platform 14, and at this time, the mobile terminal 12 can perform video recording on the exercise process. If a deviation in the area of the frame presented by the display 122 is found, the adjustment can be made. If the user needs to view the learning materials (e.g., teaching videos, copybooks, etc.) through the mobile terminal 12, the adjusting frame 11 can be adjusted to make the screen face the user for the user to view the learning materials. If the written characters need to be photographed and uploaded to be checked and verified to obtain corresponding instructions, the adjusting frame 11 is adjusted to enable the camera 121 to be aligned to the area to be photographed 13 to be photographed to photograph and obtain pictures to be uploaded.
Therefore, in the process, both shooting and watching cannot be achieved, or learning materials cannot be watched in the correct shooting area, or the correct shooting area cannot be shot in the watching process, so that the user needs to adjust for many times. In addition, the shooting angle can be adjusted only within a certain range so as not to affect the sight of the user. The shot picture is deformed due to the limitation of the shooting angle, and the practice result cannot be truly reflected. Based on this, the embodiment of the invention provides a picture acquisition method, so that on the premise of not interfering with user practice, both shooting and watching can be taken into consideration, and a high-definition fidelity picture can be obtained.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 2 is a schematic flow chart of a picture acquisition method according to another embodiment of the present invention. As shown in fig. 2, the method is applied to a mobile terminal including a camera and a screen, and may include:
201. acquiring image data obtained by shooting a virtual image of a region to be shot at a second angle through the camera; the virtual image and the area to be shot form a first angle.
The execution subject of the present embodiment may be the mobile terminal 12 shown in fig. 1. The method of the present embodiment may be performed by the mobile terminal 12 loading application software.
In this embodiment, the area to be photographed refers to an area where a user performs calligraphy or painting practice, and a virtual image of the area to be photographed is obtained by imaging the area to be photographed through a viewing component such as a mirror. The first angle between the virtual image and the area to be shot is the angle of the included angle between the mirror surface of a viewing component such as a light-emitting mirror and the plane of the area to be shot. The second angle is the angle of the included angle between the optical axis of the lens of the camera and the mirror surface of the reflector.
Optionally, the image data is video data or a still picture. Specifically, when a user needs to record the whole process of painting and calligraphy practice, video data can be acquired as the image data. When a user needs to photograph a written copybook or drawn picture, the obtained still picture can be used as the image data.
In this embodiment, the image data is obtained by shooting the area to be shot through the camera, and optionally, the camera of the mobile terminal may be opened in software after the application software is loaded and opened. Specifically, firstly, a calling camera page is created, secondly, the application authority is obtained, and a camera starting program in a system program of the mobile terminal is called to start the camera, so that the image data is obtained. Illustratively, the relevant code for this step is as follows:
in order to facilitate the user to view learning materials such as teaching videos or copybooks through the screen of the mobile terminal, the mobile terminal may be disposed on the opposite side of the region to be photographed with respect to the side on which the user stands, and a viewfinder assembly may be disposed above the mobile terminal, and the acquisition of image data will be exemplified below with reference to fig. 3 and 4. Fig. 3 is a schematic structural diagram of a picture acquisition system according to another embodiment of the present invention, and fig. 4 is a side view of the picture acquisition system according to another embodiment of the present invention. As shown in fig. 3 and 4, the acquisition system includes a mobile terminal 32 and a stand 31 for placing the mobile terminal 32, and a finder assembly 33 placed above the mobile terminal 32. In the specific implementation process, the mobile terminal 32 is placed on the support 31, the viewfinder assembly 33 is placed at the top end of the mobile terminal 32, the camera 321 is opened, and the distance between the support 31 and the area to be shot 13 is adjusted, so that the picture displayed by the display 322 is the picture of the area to be shot 13. And the user station performs calligraphy or painting exercises in the region to be shot relative to the other side of the region to be shot of the mobile terminal.
202. And correcting the image data according to the first angle and the second angle to obtain corrected image data so as to display the corrected image data through the screen.
In practical application, because trapezoidal deformation (the situation of large and small distances caused by the angle problem) can occur after a picture passes through the reflector, the framing page of the camera is corrected through the bottom layer language, so that the effect of restoring the training track of a user with high quality is achieved. Specifically, the trapezoidal deformation is related to the imaging angle of the reflector and the shooting angle of the camera, namely, the first angle and the second angle. In this embodiment, since the angle of the mobile terminal 32 fixed by the bracket 31 is fixed, and the angle between the viewfinder assembly mirror and the mobile terminal 32 is also fixed, the first angle and the second angle are fixed after the bracket 11 and the viewfinder assembly 33 are shaped, and based on this, the first angle and the second angle can be pre-stored in the processor of the mobile terminal 32 as fixed correction factors, so as to perform trapezoidal correction on the image shot in real time according to the pre-stored correction factors (related to the first angle and the second angle).
For a specific correction process, the following codes can be referred to:
according to the image acquisition method provided by the embodiment, the virtual image of the region to be shot is shot by setting the first angle and the second angle, so that the image can be displayed to a user at a proper angle on the premise of not influencing the normal calligraphy and painting practice of the user, and the image can be corrected, so that the image without deformation and high-definition fidelity can be presented for the user.
Optionally, in order to improve the rectification effect of the image data, before rectifying the image data according to the first angle and the second angle, the method may further include:
preprocessing the image data to obtain preprocessed image data;
correspondingly, the rectifying the image data according to the first angle and the second angle includes:
and correcting the preprocessed image data according to the first angle and the second angle.
As an implementation manner, the preprocessing the image data to obtain the preprocessed image data may include:
denoising the image data to obtain denoised image data;
and carrying out binarization processing on the denoised image data to obtain the preprocessed image data.
According to the picture acquisition method provided by the embodiment, the efficiency and the accuracy of trapezoidal correction are improved by preprocessing the image data.
Fig. 5 is a schematic flow chart of a picture collecting method according to another embodiment of the present invention. On the basis of the embodiment shown in fig. 2, in the present embodiment, a design of a view finder is added in the image capturing process, so that the user can more accurately capture the picture of the target area, thereby eliminating the interference content. As shown in fig. 5, the method includes:
501. and acquiring the screen size of the screen.
In practical applications, the screen size of the screen of the mobile terminal is generally stored in a built-in memory in advance. The information of the screen size can be acquired by accessing the corresponding memory address.
502. And determining the imaging size of the camera according to the screen size.
In this embodiment, the camera of the mobile terminal may generally have a plurality of imaging sizes. In order to enable the user to set the finder frame in the screen, the imaging size close to the screen size is selected in the present embodiment to acquire image data. The selection can be accomplished by traversing the multiple imaging sizes, and the specific selection mode can refer to the following codes:
503. and acquiring image data obtained by shooting the virtual image of the region to be shot at a second angle through the camera according to the imaging size.
504. And correcting the image data according to the first angle and the second angle to obtain corrected image data so as to display the corrected image data through the screen.
Steps 503 and 504 of this embodiment are similar to steps 201 and 202 of the above embodiment, and are not described again here.
505. Intercepting the corrected image data according to the size of a viewing frame to obtain an intercepted image; the size of the viewing frame is determined based on size information input by a user.
Referring to fig. 6, fig. 6 is a schematic diagram of a view-frame adjusting interface according to another embodiment of the present invention, as shown in fig. 6, in practical applications, after the imaging size is determined to be the size closest to the screen size, a view frame 61 on a page may be customized, and the view frame 61 may be adjusted according to the selection of a user. For example, the user may manually slide on slider bar 62 to select a zoom-in scale to change the size of the viewfinder, or the user may directly input size information to determine the size of the viewfinder. In practical applications, the user usually selects a fixed position as the exercise area, and after one adjustment of the mobile terminal 32, no excessive adjustment is needed, so that the user can concentrate on learning or exercising. Optionally, the mobile terminal 32 may record the current size of the viewfinder after the user manually slides the slider for adjusting the size and adjusts the size to a proper size, and the size of the viewfinder is adjusted directly according to the value adjusted last time by default when the viewfinder is used next time, so that the user can use the viewfinder conveniently, and the user is prevented from adjusting the size each time.
Alternatively, reference may be made to the following code:
in practical application, after a user practices a word, the written word can be photographed and uploaded, so that the server can automatically recognize and evaluate the word and provide corresponding learning suggestions. In order to enable the evaluation result to be undisturbed and more accurate, a single character is generally required to be uploaded, and based on this, a picture containing a plurality of characters and obtained by shooting in the region to be shot needs to be further intercepted, so that the picture containing the single character is uploaded. Of course, the frame can be set by an algorithm of software (for example, a picture can be recognized, and a field-grid region is selected to set the frame), so that the frame can be matched with image data of an arbitrary imaging size. However, the algorithm is complex and has a large calculation amount, which increases the cost of hardware and software. Based on this, this embodiment selects the imaging size of the image data as the size closest to the screen size, so that the selection of the view finder can intercept an accurate area as long as the selection matches with the screen size, thereby omitting the use of a complex algorithm and reducing the cost of software and hardware.
According to the image acquisition method provided by the embodiment, the virtual image of the region to be shot is shot by setting the first angle and the second angle, so that the image can be displayed to a user at a proper angle on the premise of not influencing the normal calligraphy and painting practice of the user, and the image can be corrected, so that the image without deformation and high-definition fidelity can be presented for the user. In addition, the imaging size close to the screen size is selected, so that a view frame selected by a user according to the screen size can be matched with the shot image, the picture required by the user can be accurately captured according to the view frame, and interference items are eliminated.
Fig. 7 is a block diagram of a mobile terminal according to another embodiment of the present invention, and as shown in fig. 7, the mobile terminal includes: a camera 321, a display 322, and at least one processor 323.
The camera 321 is configured to shoot a virtual image of the region to be shot 13 at a second angle, so as to obtain image data; the virtual image and the area to be shot form a first angle.
The processor 323 is configured to execute the image capturing method according to any of the embodiments, so as to obtain the corrected image data.
The display 322 is configured to display the corrected image data.
The mobile terminal 32 that this embodiment provided is through setting up first angle with the virtual image in shooting region is treated to the second angle is shot, can realize under the prerequisite that does not influence the normal calligraphy and painting exercise of user, with suitable angle to user display frame to through correcting the image, can present the picture of no deformation high definition fidelity for the user.
Optionally, the mobile terminal provided in this embodiment further includes: a memory and a communication component. The processor 323, the memory, and the communication unit are connected by a bus.
In a specific implementation, the at least one processor 323 executes the computer-executable instructions stored by the memory, such that the at least one processor 323 performs the image capture method as performed by the image capture device 100 above.
When the correction algorithm of the present embodiment is executed by the server, the communication section may transmit the image data to the server.
For a specific implementation process of the processor 323, reference may be made to the above method embodiments, which implement the principle and the technical effect similarly, and details of this embodiment are not described herein again.
It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise high speed RAM memory and may also include non-volatile storage NVM, such as at least one disk memory.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
Referring to fig. 3 and 4, another embodiment of the present invention further provides a picture capturing system, including: a viewing assembly 33 and a holder 31.
The view finding component 33 is arranged on the terminal equipment in a first posture and used for acquiring a virtual image of an area to be shot; the first angle is related to a setting posture of the viewfinder assembly.
The cradle 31 for fixing the mobile terminal of claim 7 in the second posture; the second angle is related to the second pose.
Optionally, the viewfinder assembly 33 is a mirror.
The reflective mirror is arranged above the terminal equipment and used for obtaining the virtual image of the area to be shot through reflection of light.
Optionally, a mirror surface central vertical line of the reflective mirror and a lens optical axis of the terminal device are both located in a vertical plane of the area to be shot, and the mirror surface vertical line and the lens optical axis form a preset angle.
Optionally, the bracket comprises a horizontal support component and a groove arranged on the horizontal support component; the groove is used for placing the terminal equipment so as to fix the terminal equipment into the second posture.
The image capturing system provided by the embodiment fixes the mobile terminal 32 through the support 31, and sets the relative position of the mobile terminal 32 through the viewfinder assembly 33, so that a virtual image at a first angle with respect to the area to be photographed can be obtained through the viewfinder assembly 33, and the camera 321 of the mobile terminal 32 can photograph the virtual image at a second angle. Through setting up first angle with the virtual image in shooting region is treated to the second angle is shot, can realize under the prerequisite that does not influence the normal painting and calligraphy exercise of user to suitable angle shows the picture to the user, and through correcting the image, can present the picture of no deformation high definition fidelity for the user.
The application also provides a computer-readable storage medium, wherein computer-executable instructions are stored in the computer-readable storage medium, and when a processor executes the computer-executable instructions, the image acquisition method executed by the image acquisition device is realized.
The computer-readable storage medium may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium may also reside as discrete components in the apparatus.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.