Intelligent light switching method and system, and related device
AssigneeHuawei Technologies Co., Ltd.
InventorWenyao Su
Life of this patent
Estimating the term…
Abstract
This application provides an intelligent light switching method and system, and a related device. One example method includes: The intelligent light switching system obtains an image, where the image comprises lamp source information; calculates an ambient light brightness value corresponding to the image; classifies, based on the lamp source information, a lamp source included in the image to obtain a classification result; and switches to a high beam or a low beam based on the ambient light brightness value corresponding to the image and the classification result.
Claims18
An intelligent light switching method, wherein the method comprises:
- obtaining an image, wherein the image comprises lamp source information;
- calculating an ambient light brightness value corresponding to the image;
- classifying, based on the lamp source information, a lamp source comprised in the image to obtain a classification result, wherein the classification result is obtained by determining a vanishing point horizontal line (VP) line in the image, wherein the classifying the lamp source comprised in the image to obtain the classification result comprises:
- inputting the image into a lamp source detection model;
- and
- obtaining a lamp source category in the image based on the lamp source detection model, wherein the obtaining the lamp source category in the image based on the lamp source detection model comprises:
- selecting, from the image, a bright spot whose brightness value is greater than a preset threshold, and setting a lamp box for the bright spot;
- performing pairing on the lamp box to obtain a plurality of lamp box pairs;
- determining the VP line based on the plurality of lamp box pairs, wherein the VP line is used to distinguish between a first region and a second region of the image;
- and
- classifying the bright spot based on a position relationship between the bright spot and the VP line and a color feature of the bright spot, to obtain different lamp source categories;
- and
- performing light switching based on the ambient light brightness value corresponding to the image and the classification result.
An apparatus, comprising:
- at least one processor;
- and
- one or more memories coupled to the at least one processor and storing programming instructions for execution by the at least one processor to:
- obtain an image, wherein the image comprises lamp source information;
- calculate an ambient light brightness value corresponding to the image;
- classify based on the lamp source information a lamp source comprised in the image to obtain a classification result, wherein the classification result is obtained by determining a vanishing point horizontal line (VP) line in the image, wherein the classify the lamp source comprised in the image to obtain the classification result comprises:
- input the image into a lamp source detection model;
- and
- obtain a lamp source category in the image based on the lamp source detection model, wherein the obtain the lamp source category in the image based on the lamp source detection model comprises:
- select, from the image, a bright spot whose brightness value is greater than a preset threshold, and setting a lamp box for the bright spot;
- perform pairing on the lamp box to obtain a plurality of lamp box pairs;
- determine the VP line based on the plurality of lamp box pairs, wherein the VP line is used to distinguish between a first region and a second region of the image;
- and
- classify the bright spot based on a position relationship between the bright spot and the VP line and a color feature of the bright spot, to obtain different lamp source categories;
- and
- perform light switching based on the ambient light brightness value corresponding to the image and the classification result.
A non-transitory computer-readable medium storing computer instructions, that when executed by one or more processors, cause the one or more processors to perform operations comprising:
- obtaining an image, wherein the image comprises lamp source information;
- calculating an ambient light brightness value corresponding to the image;
- classifying, based on the lamp source information, a lamp source comprised in the image to obtain a classification result, wherein the classification result is obtained by determining a vanishing point horizontal line (VP) line in the image, wherein the classifying the lamp source comprised in the image to obtain the classification result comprises:
- inputting the image into a lamp source detection model;
- and
- obtaining a lamp source category in the image based on the lamp source detection model, wherein the obtaining the lamp source category in the image based on the lamp source detection model comprises:
- selecting, from the image, a bright spot whose brightness value is greater than a preset threshold, and setting a lamp box for the bright spot;
- performing pairing on the lamp box to obtain a plurality of lamp box pairs;
- determining the VP line based on the plurality of lamp box pairs, wherein the VP line is used to distinguish between a first region and a second region of the image;
- and
- classifying the bright spot based on a position relationship between the bright spot and the VP line and a color feature of the bright spot, to obtain different lamp source categories;
- and
- performing light switching based on the ambient light brightness value corresponding to the image and the classification result.
Dependencies are inferred from the claim text.