Today, we are going to talk about color detection in opencv using python. As you know RGB format is a very regular color format these days. But there are other image color spaces that each one has their own advantages and disadvantages. In this situation , HSV color space would be very useful because of showing the colors. For more information check wikipedia. Now, we are talking about the code. First of all we have
Crop image using Opencv in python In this post we will discuss how to crop an image in python. Opencv convert images to numpy array. That is the trick. You just have to select the locaions you want like below. img = cv2.imread(file_path) crop_img = img[0:400, 0:300] If you read your image from file path and save it to img variable. Then you can save the 400*300 pixels of img into crop_image. 0:400 means from
Resizing and fliping codes Resizing and Flipping images would be very useful when you are working on creating new database for training a CNN, RNN or deep learning algorithms. For example I was working with many images that my Prof captured from wheat plants. We were going to apply CNN algorithm to that images. But the number of the images was too low so I put them in an Folder and ran the below code.
This error will happen whenever your python OpenCV is not installed. So you just need to install it using “pip” or make CV2 library using cmake and copy that to your python library folders. Pip is a really good tool to install python packages and you can find a very good tutorial here. To install OpenCV libarary just run the below in cmd or terminal according to your OS. >> pip install python_opencv OR >>python
Pip helps you to install Python libraries. Newest version of python install Pip it’s self but if you lost it try to get the installation file and install Pip. Commands Open terminal on Ubuntu or CMD in windows. and write this command: >> pip install <desired package name> Or >>python -m pip install <desired package name> >>python3 -m pip install <desired package name> The result will be like this if its successful. Also you can
This error may occurs when the gpu setting is wrong. In my experience I have chosen wrong “Generate PTX code” and “Generate GPU code” version. If you are directly running the code on your local device you can check the right version on “properties -> build -> Settings -> cuda” when you see the below pic it means that you have chosen the right version.** remember clean the project and rebuild it to see the
General-purpose computing on a graphics processing unit, known as GPU programming, is use of a GPU with CPU to accelerate computation. Today application of GPU programming is image processing, Signal processing, medical imaging and so on. This article show you how to install Cuda platform on your system. Verify You Have a Supported Version of Linux First of all you have to determine which distribution and release number you’re running. Type the following at command
Matlab logo
A simple optimization problem that has been solved many years ago is the biggest field area with constant surrounding. Also imagine that a carpenter need to build a wooden window like below. He need to know with constant timber length, how should he build the vastest window. To determine this problem using Matlab you just need the below code: clear all; clc; %window problem syms r h area(h,r); area = h*r*2 + pi*r*r/2;%first eq length
امروز درباره دنیای ربات‌های پرنده صحبت می‌کنیم. دنیای امروز ما در حال تغییره. هر روزه ربات های زیادی با اهداف مختلف وارد بازار می‌شوند. در صنعت کشاورزی ،صنعت ساختمان ربات های پرنده میخوان خودشون رو جا کنند. برای همینه که ما سعی داریم در اینجا به اونها بپردازیم. در کشور ما،ایران، ربات های پرنده در زمینه فیلم برداری هوایی و امداد و نجات و حتی کشاورزی داره استفاده میشه. استفاده از ربات های سمپاش و
DJI Drones
امروز درباره دنیای ربات‌های پرنده صحبت می‌کنیم. دنیای امروز ما در حال تغییره. هر روزه ربات های زیادی با اهداف مختلف وارد بازار می‌شوند. در صنعت کشاورزی ،صنعت ساختمان ربات های پرنده میخوان خودشون رو جا کنند. برای همینه که ما سعی داریم در اینجا به اونها بپردازیم. در کشور ما،ایران، ربات های پرنده در زمینه فیلم برداری هوایی و امداد و نجات و حتی کشاورزی داره استفاده میشه. استفاده از ربات های سمپاش و