The brightness distribution of sky background is usually non-uniform. which creates many problems for traditional cloud detection methods. including the failure of thin cloud detection in total sky images and significantly reducing retrieval accuracy in the circumsolar and near-horizon regions. This paper describes the development of a new cloud detection algorithm. https://www.duospiritalis.com/