The wireless Visual sensor network is a highly functional domain of high-potential network generations in unpredictable and dynamic environments that have been deployed from a large number of uniform or non-uniform groups within the desired area, cause the realization of large regulatory applications from the military and industrial domain to hospital and environment. Therefore, security is one of the most important challenges in these networks. In this research, a new method of routing smart cameras with the help of cloud computing technology has been provided. The framework in the cloud computing management layer increases security, routing, inter interaction, and other features required by wireless sensor networks. Systematic attacks are simulated by a series of standard data collected at the CTU University related to the Czech Republic with RapidMiner software. Finally, the accuracy of detection of attacks and error rates with the suggested NN-SVM algorithm, which is a combination of vector machines and neural networks, is provided in the smart cameras based on the visual wireless sensor networks in MATLAB software. The results show that different components of the proposed architecture meet the quality characteristics of visual wireless sensor networks. Detection of attacks in this method is in the range of 99.24% and 99.35% in the worst and best conditions, respectively.