In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you the use of Matlab image processing example analysis, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
Friends may encounter such a situation, when filling in certain information, there are requirements not only for the size of the picture, but also for pixels, such as 640-1280 images. Even some packaged programs need to enter data of a specified pixel size.
If the image requirements are not very strict, Xiaobai will generally use screenshots to put into the word, and then stretch, roughly meet the requirements before uploading. This method is only suitable for situations where the requirements are relatively loose, and when the pixel size is strictly required, it still needs to be processed at the pixel level.
According to the previous lecture, the image is first read in, and then the imresize () function can be used to convert any image size. Here Xiaobai wants to say that when you want to know how to use a function, you can check other people's routines through Baidu, or you can use the help command to check the routines provided by Matlab. For example:
Help imresize
Using the above command, you can see how the imresize () function is used. (friendship note: Oh, this command is to be entered in the command window.) here we can use the most basic way of this function to achieve the function we want.
Image = imread ('xiaobai.jpg')
Image_resize = imresize (image, [200200])
Imshow (image_resize)
The first argument to the imresize () function is the original image we want to stretch, and the second argument is the pixel size of the stretched image. Let's take a look at the results of the operation.
Look, Xiaobai is getting smaller again. But the image alone doesn't mean it's getting smaller, so let's take a look at the data space.
It has indeed become a 20000200 picture, and then the image conversion is completed by using the save function mentioned above to save the picture. Of course, this function can not only be reduced, but also can be enlarged, and the ratio of length, width and height can also be changed.
Image = imread ('xiaobai.jpg')
Image_resize = imresize (image, [200200])
Image_change = imresize (image, [200100])
Image_biger = imresize (image, [1280 1280])
Imshow (image_change)
The above program turns Xiaobai into "Gao Bai" and "Da Bai" respectively. Let's see how it works.
Whether our rookie has really grown taller or not, and the proportion is also very coordinated.
Next, let's turn Xiaobai around. The rotated jump of rookies can be realized by using the imrotate () function.
The 20 after image=imrotate (image,20);% is the degree of rotation.
Let's take a look at what Xiaobai looks like after spinning.
Next, let's let Xiaobai stand on his head.
Finally, we let Xiaobai "look in the mirror".
I don't know if you have found a small detail, that is, I put the icon on my chest to the left. Yes, the whole picture is symmetrically symmetrical. The following functions are used:
The coefficient after image=flipdim (image,2)% is changed to 1, which means upper and lower symmetry.
The above is all the contents of the article "sample Analysis of Image processing using Matlab". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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: 253
*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.