In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to achieve video surveillance screen in Qt. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
I. Preface
Video surveillance system has achieved the program of bad street in the whole field of security. At least hundreds of companies across the country have done similar systems. Of course, the demand in this aspect is also very strong, and the demand for various customization is increasing. Especially in recent years, with the help of the east wind of face recognition, it has developed more rapidly, and the technology and applications related to face recognition have been at the forefront of the wind and waves in recent years, resulting in a lot of application products. All kinds of face recognition products have sprung up everywhere, including facial scanning access control, station and airport facial recognition, facial scanning to get tickets, etc., but in fact, most experts may be desperate, laymen feel like watching science fiction movies, bosses beat chicken blood in all kinds of ways. Hundreds of millions today, hundreds of millions tomorrow.
Throughout the field of application scenarios of Qt, basically in China, it accounts for a large proportion in the fields of security, aerospace ships, education and industrial control. In fact, I love Qt very much and have never seen such a perfect API package, including naming. The most powerful feature is the cross-platform feature. It can be said that the .NET cross-platform, and even that tens of megabytes of embedded linux version can run, which greatly reduces the cost. The richness of the product is improved. Since I used Qt, I don't want to use VC/VB/C# and so on.
Video surveillance screen in any video surveillance system is an indispensable function, basically requires 1 picture, 4 pictures, 6 pictures, 8 pictures, 9 pictures, 16 pictures, etc., the table layout provided by Qt is very competent for this task, the Internet almost did not see qt do the most basic video surveillance picture segmentation demo, today specially take a few minutes to extract, open source release. Welcome everyone to like more! Now also added 25 pictures, 36 pictures, inside the function package is very good, a few lines can directly add 49 pictures and other.
2. Void VideoPanel::change_video (int index, int flag) {int count = 0; int row = 0; int column = 0; for (int I = 0; I)
< videoCount; i++) { if (i >= index) {gridLayout- > addWidget (widgets.at (I), row, column); widgets.at (I)-> setVisible (true); count++; column++; if (column = = flag) {row++; column = 0 }} if (count = = (flag * flag)) {break;}} void VideoPanel::change_video_4 (int index) {hide_video_all (); change_video (index, 2);} void VideoPanel::change_video_6 (int index) {hide_video_all () If (index = = 0) {gridLayout- > addWidget (widgets.at (0), 0,0,2,2); gridLayout- > addWidget (widgets.at (1), 0,2,1,1); gridLayout- > addWidget (widgets.at (2), 1,2,1,1); gridLayout- > addWidget (widgets.at (3), 2,2,1,1); gridLayout- > addWidget (widgets.at (4), 2,1,1,1) GridLayout- > addWidget (widgets.at (5), 2, 0, 1, 1); for (int I = 0; I
< 6; i++) { widgets.at(i)->SetVisible (true);} else if (index = = 5) {gridLayout- > addWidget (widgets.at (5), 0,0,2,2); gridLayout- > addWidget (widgets.at (6), 0,2,1,1); gridLayout- > addWidget (widgets.at (7), 1,2,1,1); gridLayout- > addWidget (widgets.at (8), 2,2,1,1) GridLayout- > addWidget (widgets.at (9), 2,1,1,1); gridLayout- > addWidget (widgets.at (10), 2,0,1,1); for (int I = 5; I)
< 11; i++) { widgets.at(i)->SetVisible (true);} else if (index = = 10) {gridLayout- > addWidget (widgets.at (10), 0,0,2,2); gridLayout- > addWidget (widgets.at (11), 0,2,1,1); gridLayout- > addWidget (widgets.at (12), 1,2,1,1); gridLayout- > addWidget (widgets.at (13), 2,2,1,1) GridLayout- > addWidget (widgets.at (14), 2,1,1,1); gridLayout- > addWidget (widgets.at (15), 2,0,1,1); for (int I = 10; I)
< 16; i++) { widgets.at(i)->SetVisible (true);}} void VideoPanel::change_video_8 (int index) {hide_video_all (); if (index = = 0) {gridLayout- > addWidget (widgets.at (0), 0,0,3,3); gridLayout- > addWidget (widgets.at (1), 0,3,1,1); gridLayout- > addWidget (widgets.at (2), 1,3,1,1) GridLayout- > addWidget (widgets.at (3), 2,3,1,1); gridLayout- > addWidget (widgets.at (4), 3,3,1,1); gridLayout- > addWidget (widgets.at (5), 3,2,1,1); gridLayout- > addWidget (widgets.at (6), 3,1,1,1); gridLayout- > addWidget (widgets.at (7), 3,0,1,1); for (int I = 0; I)
< 8; i++) { widgets.at(i)->SetVisible (true);} else if (index = = 8) {gridLayout- > addWidget (widgets.at (8), 0,0,3,3); gridLayout- > addWidget (widgets.at (9), 0,3,1,1); gridLayout- > addWidget (widgets.at (10), 1,3,1,1); gridLayout- > addWidget (widgets.at (11), 2,3,1,1) GridLayout- > addWidget (widgets.at (12), 3,3,1,1); gridLayout- > addWidget (widgets.at (13), 3,2,1,1); gridLayout- > addWidget (widgets.at (14), 3,1,1,1); gridLayout- > addWidget (widgets.at (15), 3,0,1,1); for (int I = 8; I)
< 16; i++) { widgets.at(i)->SetVisible (true);}} void VideoPanel::change_video_9 (int index) {hide_video_all (); change_video (index, 3);} void VideoPanel::change_video_13 (int index) {hide_video_all (); if (index = = 0) {gridLayout- > addWidget (widgets.at (0), 0,0,1,1); gridLayout- > addWidget (widgets.at (1), 0,1,1,1) GridLayout- > addWidget (widgets.at (2), 0,2,1,1); gridLayout- > addWidget (widgets.at (3), 0,3,1,1); gridLayout- > addWidget (widgets.at (4), 1,0,1,1); gridLayout- > addWidget (widgets.at (5), 2,0,1,1); gridLayout- > addWidget (widgets.at (6), 1,1,2,2) GridLayout- > addWidget (widgets.at (7), 1,3,1,1); gridLayout- > addWidget (widgets.at (8), 2,3,1,1); gridLayout- > addWidget (widgets.at (9), 3,0,1,1); gridLayout- > addWidget (widgets.at (10), 3,1,1,1); gridLayout- > addWidget (widgets.at (11), 3,2,1,1) GridLayout- > addWidget (widgets.at (12), 3,3,1,1); for (int I = 0; I
< 13; i++) { widgets.at(i)->SetVisible (true);} else if (index = = 3) {gridLayout- > addWidget (widgets.at (3), 0,0,1,1); gridLayout- > addWidget (widgets.at (4), 0,1,1,1); gridLayout- > addWidget (widgets.at (5), 0,2,1,1); gridLayout- > addWidget (widgets.at (6), 0,3,1,1) GridLayout- > addWidget (widgets.at (7), 1,0,1,1); gridLayout- > addWidget (widgets.at (8), 2,0,1,1); gridLayout- > addWidget (widgets.at (9), 1,1,2,2); gridLayout- > addWidget (widgets.at (10), 1,3,1,1); gridLayout- > addWidget (widgets.at (11), 2,3,1,1) GridLayout- > addWidget (widgets.at (12), 3,0,1,1); gridLayout- > addWidget (widgets.at (13), 3,1,1,1); gridLayout- > addWidget (widgets.at (14), 3,2,1,1); gridLayout- > addWidget (widgets.at (15), 3,3,1,1); for (int I = 3; I)
< 16; i++) { widgets.at(i)->SetVisible (true);}} void VideoPanel::change_video_16 (int index) {hide_video_all (); change_video (index, 4);} void VideoPanel::change_video_25 (int index) {hide_video_all (); change_video (index, 5);} void VideoPanel::change_video_36 (int index) {hide_video_all (); change_video (index, 6) } void VideoPanel::change_video_64 (int index) {hide_video_all (); change_video (index, 8);} III.
This is the end of the article on "how to achieve Video Surveillance screen in Qt". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.