Weather and a part of day recognition in the photos using a KNN methodology

Tomasz Krzywicki


This article presents a proposal for recognizing the weather and part of a day in digital photos encoded in the bitmap format, based on auctorial edge detection algorithm of horizon to demarcate the sky and k-nearest neighbours algorithm, to classify the daytime in the picture as “day” or “night” and to classify the weather as “sunny” or “cloudy”. To verify the effectiveness of the classification the Internal Bagging-5 model was applied. The data for surveys in the form of pictures was prepared on self-provision. To test the method in a different location, data from the Internet was used.


image analysis, machine learning, classification

KAEHLER A., BRADSKI G.: OpenCV 3. Komputerowe rozpoznawanie obrazu w C++ przy użyciu biblioteki OpenCV, Helion Publishing House, 2017
ARTIEMJEW P., Wybrane paradygmaty sztucznej inteligencji, PJATK Publishing House, 2016
MACHOVÁ K., BARČÁK F., BEDNÁR P.: A Bagging Method using Decision Trees in the Role of Base Classifiers,
LEMMENS A., CROUX C.: Bagging and Boosting Classification Trees to Predict Churn,
ESPOSITO R., SAITTA L.: Monte Carlo Theory as an Explanation of Bagging and Boosting,
MOLINARO, A.M., SIMON, R., PFEIFFER, R.M.: Prediction error estimation. a comparison of resampling methods, in. Bioinformatics, vol. 21, issue 15, Oxford University Press, Oxford, UK, pp. 3301-3307, 2005


Cited by

Krzywicki, T. (2018). Weather and a part of day recognition in the photos using a KNN methodology. Technical Sciences, 21(4), 291–302.

Tomasz Krzywicki