Disclosure of Invention
An object of the present invention is to provide a driving shooting method and a vehicle based on an image recognition technology, which can solve the above technical problems, and can automatically perform landscape recognition according to a shooting instruction of a user to shoot an image conforming to a preset image scene in a driving process of the vehicle, so that user experience is good.
In order to solve the technical problem, the application provides a driving shooting method based on an image recognition technology, which comprises the following steps:
when a shooting instruction is received during running of a vehicle, acquiring a preview image of a vehicle-mounted camera;
performing image recognition on the obtained preview image to judge whether the preview image is matched with a preset image scene;
and if the preview image is matched with a preset image scene, controlling the vehicle-mounted camera to shoot.
Wherein, control the on-vehicle camera shoots, include:
controlling the vehicle-mounted camera to shoot at intervals of preset time and/or preset distance;
after continuously shooting a preset number of images, acquiring preview images of the vehicle-mounted camera and entering the step of carrying out image recognition on the acquired preview images to judge whether the preview images are matched with a preset image scene.
Wherein the method further comprises:
and performing voice prompt when the vehicle-mounted camera is controlled to shoot.
When a shooting instruction is received during vehicle running, before a preview image of the vehicle-mounted camera is acquired, the method further comprises the following steps:
receiving an image input about a driving scenery, wherein the image input comprises at least one of an image shot by a vehicle-mounted camera and an external input image;
and performing deep learning on the input image to generate a preset image scene.
After the vehicle-mounted camera is controlled to shoot, the method further comprises the following steps:
acquiring current shooting environment parameters, wherein the shooting environment parameters comprise at least one of shooting places, shooting time and shooting weather;
and generating watermark information on the shot image according to the shooting environment parameters.
After the vehicle-mounted camera is controlled to shoot, the method further comprises the following steps:
and sending the shot image and the corresponding shooting place to a cloud server to serve as information of a navigation destination.
The vehicle-mounted camera is a travelling camera and/or a rearview mirror camera.
The present application also provides a vehicle comprising a processor for executing program instructions to implement steps comprising:
when a shooting instruction is received during running of a vehicle, acquiring a preview image of a vehicle-mounted camera;
performing image recognition on the obtained preview image to judge whether the preview image is matched with a preset image scene;
and if the preview image is matched with a preset image scene, controlling the vehicle-mounted camera to shoot.
The step of controlling the vehicle-mounted camera to shoot is executed by the processor, and the step of controlling the vehicle-mounted camera to shoot comprises the following steps:
controlling the vehicle-mounted camera to shoot at intervals of preset time and/or preset distance;
after continuously shooting a preset number of images, acquiring preview images of the vehicle-mounted camera and entering the step of carrying out image recognition on the acquired preview images to judge whether the preview images are matched with a preset image scene.
Wherein the steps for implementing the program instructions are executed by the processor, further comprising:
and performing voice prompt when the vehicle-mounted camera is controlled to shoot.
According to the driving shooting method and the vehicle based on the image recognition technology, when a shooting instruction is received during driving of the vehicle, a preview image of a vehicle-mounted camera is obtained; performing image recognition on the obtained preview image to judge whether the preview image is matched with a preset image scene or not; and if the preview image is matched with the preset image scene, controlling the vehicle-mounted camera to shoot. In this way, the scenery recognition method and device can automatically recognize sceneries according to the shooting instructions of the user in the running process of the vehicle so as to shoot images conforming to the preset image scenes, and the user experience is good.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification, so that the foregoing and other objects, features and advantages of the present application can be more clearly understood, and the following detailed description of the preferred embodiments will be given with reference to the accompanying drawings.
Detailed Description
In order to further describe the technical means and effects adopted by the application to achieve the preset application purpose, the following detailed description refers to specific implementation modes, methods, steps, structures, features and effects of the driving shooting method and the vehicle based on the image recognition technology according to the application by combining the accompanying drawings and the preferred embodiment.
The foregoing and other technical aspects, features and advantages of the present application will become more apparent from the following detailed description of the preferred embodiments with reference to the accompanying drawings. While the present application may be susceptible to further details of embodiments and their technical means and effects for attaining the intended purpose, the drawings are merely to provide a further understanding of the invention and are not to be construed as limiting the invention.
Fig. 1 is a flowchart illustrating a driving photographing method based on an image recognition technology according to an exemplary embodiment. Referring to fig. 1, the driving photographing method based on the image recognition technology of the present embodiment includes, but is not limited to, the following steps:
step 110, when a shooting instruction is received during running of the vehicle, a preview image of the vehicle-mounted camera is acquired.
When a user feels good surrounding sceneries in the driving process and wants to take a picture, a shooting instruction is triggered by speaking a voice or pressing a button on a steering wheel, and when the shooting instruction is received, a processor of the vehicle automatically acquires a preview image of a vehicle-mounted camera, wherein the preview image reflects a scene in the current shooting range of the vehicle-mounted camera, and in one embodiment, the vehicle-mounted camera is a driving camera and/or a rearview mirror camera, so that sceneries in front of, behind of or in front of and behind of the vehicle can be shot.
Step 120, performing image recognition on the obtained preview image to determine whether the preview image matches with the preset image scene.
After a shooting command is triggered by a user, a processor of the vehicle starts to perform scene recognition, and the obtained preview image is subjected to image recognition to match the preview image with a preset image scene, so that whether the current scene is a scene meeting the requirement of the user is judged.
In an embodiment, before acquiring the preview image of the vehicle-mounted camera when the shooting instruction is received during running of the vehicle, the method further includes:
receiving an image input about a driving scenery, wherein the image input comprises at least one of an image shot by a vehicle-mounted camera and an external input image;
and performing deep learning on the input image to generate a preset image scene.
Where deep learning is a method of machine learning based on characterization learning of data, observations (e.g., an image) can be represented in a variety of ways, such as a vector of intensity values for each pixel, or more abstract as a series of edges, a region of a particular shape, etc., while using some particular representation method it is easier to learn tasks from instances, deep learning can replace manually acquired features with unsupervised or supervised feature learning and hierarchical feature extraction efficient algorithms. In this embodiment, the preset image scene is obtained by deep learning, and the image used for deep learning may be an image captured by a user manually and an image input through network searching and an external storage device, where the image includes image features such as sky blue, high contrast, multiple greening, and having references such as trees, forests, sunset, and bridges, and the image model meeting the user requirements may be built as the preset image scene by deep learning the input image.
And 130, if the preview image is matched with the preset image scene, controlling the vehicle-mounted camera to shoot.
When the preview image is matched with the preset image scene, the scenery in the current shooting range of the vehicle-mounted camera is considered to meet the requirement of the user, the vehicle-mounted camera is controlled to shoot at the moment, and the shot image can meet the requirement of the user without the need of the user to shoot manually.
In an embodiment, the process of controlling the vehicle-mounted camera to take a photograph may specifically include:
controlling the vehicle-mounted camera to shoot at intervals of preset time and/or preset distance;
after continuously shooting the preset number of images, acquiring preview images of the vehicle-mounted camera and entering a step of carrying out image recognition on the acquired preview images to judge whether the preview images are matched with preset image scenes.
In order to avoid over-frequency shooting and image repetition, the vehicle-mounted camera is controlled to shoot at intervals of preset time and/or preset distance, for example, shooting an image at intervals of 1 minute or 200 meters, after continuously shooting a preset number of images, for example, continuously shooting 5 images, identifying sceneries in the current shooting range of the vehicle-mounted camera again so as to avoid shooting images which do not meet requirements, at the moment, a processor of the vehicle acquires a preview image of the vehicle-mounted camera and enters a step of carrying out image identification on the acquired preview image to judge whether the preview image is matched with a preset image scene, and identifying sceneries again. After the scene recognition is performed again, if the preview image is matched with the preset image scene, the step 130 is continuously executed to control the vehicle-mounted camera to shoot, otherwise, if the preview image is not matched with the preset image scene, shooting is stopped and the user is prompted. In one embodiment, the user may manually end the shooting by a set button.
In an embodiment, the driving shooting method based on the image recognition technology of the present application further includes:
and performing voice prompt when controlling the vehicle-mounted camera to shoot.
The sound prompt is, for example, a shutter sound or a simple prompt sound, voice, so as to prompt the user that shooting is currently performed.
In an embodiment, after the step 130 of controlling the vehicle-mounted camera to take the image, the driving shooting method based on the image recognition technology of the present application further includes:
acquiring current shooting environment parameters, wherein the shooting environment parameters comprise at least one of shooting places, shooting time and shooting weather;
watermark information is generated on the photographed image according to the photographing environment parameters.
The shooting location is, for example, a highway, a city, a administrative district, a scenic spot, the shooting time is a certain day of a certain month of a certain year, or the shooting time can be specific to time, minutes and seconds, the shooting weather comprises sunny days, cloudy days, rainy days, temperature, wind power and the like, and the user can conveniently search and manage pictures by setting shooting environment parameters on the shot images in a watermark mode.
In an embodiment, after the vehicle-mounted camera is controlled to shoot, the method further comprises:
and sending the shot image and the corresponding shooting place to a cloud server to serve as information of a navigation destination.
After the vehicle shoots the image, the shot image and the corresponding shooting place are sent to the cloud server for storage, so that the vehicle can be used as information of a navigation destination, and when other users need to navigate, the navigation destination can be selected by referring to the target image, and navigation information is enriched.
According to the driving shooting method based on the image recognition technology, when a shooting instruction is received during driving of a vehicle, a preview image of the vehicle-mounted camera is obtained, the obtained preview image is subjected to image recognition to judge whether the preview image is matched with a preset image scene, and if the preview image is matched with the preset image scene, the vehicle-mounted camera is controlled to shoot. In this way, the scenery recognition method and device can automatically recognize sceneries according to the shooting instructions of the user in the running process of the vehicle so as to shoot images conforming to the preset image scenes, and the user experience is good.
Fig. 2 is a schematic structural view of a vehicle according to an exemplary embodiment. Referring to fig. 2, the vehicle of the present embodiment includes a memory 210 and a processor 220, the memory 210 stores at least one program instruction, and the processor 220 loads and executes the at least one program instruction to implement the steps including:
when a shooting instruction is received during running of a vehicle, acquiring a preview image of a vehicle-mounted camera;
performing image recognition on the obtained preview image to judge whether the preview image is matched with a preset image scene or not;
and if the preview image is matched with the preset image scene, controlling the vehicle-mounted camera to shoot.
When a user feels good surrounding sceneries in the driving process and wants to take a picture, a shooting instruction is triggered by speaking a voice or pressing a button on a steering wheel, and when the shooting instruction is received, a processor of the vehicle automatically acquires a preview image of a vehicle-mounted camera, wherein the preview image reflects a scene in the current shooting range of the vehicle-mounted camera, and in one embodiment, the vehicle-mounted camera is a driving camera and/or a rearview mirror camera, so that sceneries in front of, behind of or in front of and behind of the vehicle can be shot.
After a shooting instruction is triggered by a user, a processor of the vehicle starts to perform scenery recognition, and matches an obtained preview image with a preset image scene by performing image recognition on the obtained preview image, so as to judge whether the current scenery is a scenery meeting the requirements of the user, in this embodiment, the preview image is processed by adopting image segmentation, and a threshold segmentation method, an edge detection method, a region extraction method and a segmentation method combined with a specific theoretical tool can be adopted in the image segmentation method, such as image segmentation based on mathematical morphology, segmentation based on wavelet transformation, segmentation based on a genetic algorithm and the like, the processed image is matched with the preset image scene, the preset image scene is a preset image model, and image features such as sky blue, high contrast, multiple greening, trees, forests, sunset, bridges and other references are included.
When the preview image is matched with the preset image scene, the scenery in the current shooting range of the vehicle-mounted camera is considered to meet the requirement of the user, the vehicle-mounted camera is controlled to shoot at the moment, and the shot image can meet the requirement of the user without the need of the user to shoot manually.
In one embodiment, the processor 220 performs the steps of controlling the in-vehicle camera to take a photograph, including:
controlling the vehicle-mounted camera to shoot at intervals of preset time and/or preset distance;
after continuously shooting the preset number of images, acquiring preview images of the vehicle-mounted camera and entering a step of carrying out image recognition on the acquired preview images to judge whether the preview images are matched with preset image scenes.
In order to avoid over-frequency shooting and image repetition, the vehicle-mounted camera is controlled to shoot at intervals of preset time and/or preset distance, for example, shooting an image at intervals of 1 minute or 200 meters, after continuously shooting a preset number of images, for example, continuously shooting 5 images, identifying sceneries in the current shooting range of the vehicle-mounted camera again so as to avoid shooting images which do not meet requirements, at the moment, a processor of the vehicle acquires a preview image of the vehicle-mounted camera and enters a step of carrying out image identification on the acquired preview image to judge whether the preview image is matched with a preset image scene, and identifying sceneries again. After the scene recognition is performed again, if the preview image is matched with the preset image scene, the step 130 is continuously executed to control the vehicle-mounted camera to shoot, otherwise, if the preview image is not matched with the preset image scene, shooting is stopped and the user is prompted. In one embodiment, the user may manually end the shooting by a set button.
In one embodiment, the steps that processor 220 executes program instructions to implement further include:
and performing voice prompt when controlling the vehicle-mounted camera to shoot.
The sound prompt is, for example, a shutter sound or a simple prompt sound, voice, so as to prompt the user that shooting is currently performed.
In an embodiment, before the processor 220 performs the step of acquiring the preview image of the vehicle-mounted camera when the photographing instruction is received during the running of the vehicle, the following steps are further performed:
receiving an image input about a driving scenery, wherein the image input comprises at least one of an image shot by a vehicle-mounted camera and an external input image;
and performing deep learning on the input image to generate a preset image scene.
Where deep learning is a method of machine learning based on characterization learning of data, observations (e.g., an image) can be represented in a variety of ways, such as a vector of intensity values for each pixel, or more abstract as a series of edges, a region of a particular shape, etc., while using some particular representation method it is easier to learn tasks from instances, deep learning can replace manually acquired features with unsupervised or supervised feature learning and hierarchical feature extraction efficient algorithms. In this embodiment, the preset image scene is obtained by deep learning, and the image used for deep learning may be an image captured by a user manually and an image input through network searching and an external storage device, where the image includes image features such as sky blue, high contrast, multiple greening, and having references such as trees, forests, sunset, and bridges, and the image model meeting the user requirements may be built as the preset image scene by deep learning the input image.
In one embodiment, after the processor 220 performs the step of controlling the vehicle-mounted camera to take a photograph, the following steps are further performed:
acquiring current shooting environment parameters, wherein the shooting environment parameters comprise at least one of shooting places, shooting time and shooting weather;
watermark information is generated on the photographed image according to the photographing environment parameters.
The shooting location is, for example, a highway, a city, a administrative district, a scenic spot, the shooting time is a certain day of a certain month of a certain year, or the shooting time can be specific to time, minutes and seconds, the shooting weather comprises sunny days, cloudy days, rainy days, temperature, wind power and the like, and the user can conveniently search and manage pictures by setting shooting environment parameters on the shot images in a watermark mode.
In one embodiment, after the processor 220 performs the step of controlling the vehicle-mounted camera to take a photograph, the following steps are further performed:
and sending the shot image and the corresponding shooting place to a cloud server to serve as information of a navigation destination.
After the vehicle shoots the image, the shot image and the corresponding shooting place are sent to the cloud server for storage, so that the vehicle can be used as information of a navigation destination, and when other users need to navigate, the navigation destination can be selected by referring to the target image, and navigation information is enriched.
When the vehicle receives a shooting instruction in running of the vehicle, a preview image of the vehicle-mounted camera is acquired, the acquired preview image is subjected to image recognition to judge whether the preview image is matched with a preset image scene, and if the preview image is matched with the preset image scene, the vehicle-mounted camera is controlled to shoot. In this way, the scenery recognition method and device can automatically recognize sceneries according to the shooting instructions of the user in the running process of the vehicle so as to shoot images conforming to the preset image scenes, and the user experience is good.
The foregoing description is only a preferred embodiment of the present application, and is not intended to limit the invention to the particular embodiment disclosed, but is not intended to limit the invention to the particular embodiment disclosed, as any and all modifications, equivalent to the above-described embodiment, may be made by those skilled in the art without departing from the scope of the invention.