In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to realize the image translation of C++". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor to take you to learn "how C++ to achieve image translation" bar!
Translation of image
Moving is to regard the image as a whole, and the display cannot be like scanning. The scanning mode is somewhat like opening a painting. For example, when displaying the upper part, the lower part can be unrealistic, while the movement can be seen as a plank painting. When displaying, it must be carried out in physical order. For example, when translating from top to bottom, you must first display the lower image and then display the upper image, so the translation algorithm is more difficult than scanning.
Panning is a copied method to display the image, and each time it is displayed, the number of copied rows is increased by one line until the display is complete.
/ / Mobile display void Mobile_display () {/ / read picture Mat srcImage, dstImage; srcImage = imread ("2.jpg"); dstImage = Mat (srcImage.size (), CV_8UC3); imshow ("original image", srcImage); / / define variable Mat roiImage; int ImageHeigth = srcImage.rows; int ImageWidth = srcImage.cols; namedWindow ("mobile display"); for (int I = 1; I < ImageWidth) 1 roiImage = srcImage (Rect (ImageWidth-i, 0, I, ImageHeigth)); roiImage.copyTo (dstImage (Rect (0,0, I, ImageHeigth)); imshow (Mobile display, dstImage); waitKey (5);} waitKey (0);}
Moving picture
Intermediate expansion
When we turn on the TV, we all have the feeling that the TV image starts in the middle of the screen and expands up and down, and this effect is the expansion in the middle. In fact, the principle of the middle expansion special effect display is not difficult. During the display, the image is divided into two parts, the middle boundary is displayed in the center of the screen, and the image is quickly scanned upward and downward, and finally the image is fully displayed on the screen. In this way, people will see the effect of middle expansion because of the characteristics of visual physiology.
/ / void Middle_expansion () {/ / read the picture Mat srcImage, dstImage; srcImage = imread ("2.jpg"); dstImage = Mat (srcImage.size (), CV_8UC3); imshow ("original image", srcImage); / / define the variable Mat roiImage; int ImageHeigth = srcImage.rows; int ImageWidth = srcImage.cols; namedWindow ("intermediate extension"); for (int I = 1; I
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: 292
*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.