A system for determining whether image data is within a predetermined range that image analysis software is configured to analyze, the system comprising: a camera; and an electronic processor, the electronic processor configured to: receive the image data from the camera; use the image analysis software, generate a prediction regarding the image data and a confidence value associated with the prediction regarding the image data; calculate perturbation values by determining a sign of a gradient of a cost function (∇ x L(θ, x, y)) of the image analysis software used to generate the prediction with respect to the image; multiply a weight ( ε) by the sign, wherein x is the input image data, y is possible classifications for the image data, and θ are parameters of the image analysis software used to generate the prediction; perturb the image data using the perturbation values; use the image analysis software, generate a prediction regarding the perturbed image data and a confidence value associated with the prediction regarding the perturbed image data; compare the confidence value associated with the prediction regarding the perturbed image data to the confidence value associated with the prediction regarding the image data; and when a difference between the confidence value associated with the prediction regarding the perturbed image data and the confidence value associated with the prediction regarding the image data is bigger than or equal to a predetermined threshold value, determine that the image data received from the camera lies inside the predetermined range, wherein the image analysis software comprises a machine learning software trained to analyze the image data and the machine learning software comprises a convolutional neural network. a camera; and an electronic processor, the electronic processor configured to: receive the image data from the camera; use the image analysis software, generate a prediction regarding the image data and a confidence value associated with the prediction regarding the image data; calculate perturbation values by determining a sign of a gradient of a cost function (∇ x L(θ, x, y)) of the image analysis software used to generate the prediction with respect to the image; multiply a weight ( ε) by the sign, wherein x is the input image data, y is possible classifications for the image data, and θ are parameters of the image analysis software used to generate the prediction; perturb the image data using the perturbation values; use the image analysis software, generate a prediction regarding the perturbed image data and a confidence value associated with the prediction regarding the perturbed image data; compare the confidence value associated with the prediction regarding the perturbed image data to the confidence value associated with the prediction regarding the image data; and when a difference between the confidence value associated with the prediction regarding the perturbed image data and the confidence value associated with the prediction regarding the image data is bigger than or equal to a predetermined threshold value, determine that the image data received from the camera lies inside the predetermined range, wherein the image analysis software comprises a machine learning software trained to analyze the image data and the machine learning software comprises a convolutional neural network. receive the image data from the camera; use the image analysis software, generate a prediction regarding the image data and a confidence value associated with the prediction regarding the image data; calculate perturbation values by determining a sign of a gradient of a cost function (∇ x L(θ, x, y)) of the image analysis software used to generate the prediction with respect to the image; multiply a weight ( ε) by the sign, wherein x is the input image data, y is possible classifications for the image data, and θ are parameters of the image analysis software used to generate the prediction; perturb the image data using the perturbation values; use the image analysis software, generate a prediction regarding the perturbed image data and a confidence value associated with the prediction regarding the perturbed image data; compare the confidence value associated with the prediction regarding the perturbed image data to the confidence value associated with the prediction regarding the image data; and when a difference between the confidence value associated with the prediction regarding the perturbed image data and the confidence value associated with the prediction regarding the image data is bigger than or equal to a predetermined threshold value, determine that the image data received from the camera lies inside the predetermined range, wherein the image analysis software comprises a machine learning software trained to analyze the image data and the machine learning software comprises a convolutional neural network.