Это видео недоступно.
Сожалеем об этом.
25 - Reading Images, Splitting Channels, Resizing using openCV in Python
HTML-код
- Опубликовано: 14 авг 2024
- openCV is a library of programming functions mainly aimed at computer vision but also very helpful for processing microscope images. This tutorial explains a few basic operations in openCV to read & resize images and to split & merge channels.
The code from this video is available at: github.com/bns...
Thank you so much for taking the hardships of bringing all the information together. Only one of a kind channel. Precious information explained o detail. I will refer it to all my friends as well. Thanks again.
Thank you very much for your kind words Suwarna. Knowing that someone benefits from my work definitely motivates me to put in more effort. Please do spread the word and help others add a new skill to their portfolio.
Thank you very much for explaining all these important image processing tools in a very straightforward manner!
Hi Dr. Bhattiprolu, thanks for the videos. I am trying to do a batch process to merge images with same partial name from different folders using scikit image. I have written this the following code which ran smoothly the first time, however when I repeat the same on a different folder, I get an error merge_imgs is not defined. I was wondering what library to merge images in scikit
# import libraries
%matplotlib inline
import os
import matplotlib.pyplot as plt
from skimage import io
import numpy as np
import glob
pathname1 = 'data/H3K9me3/dapi'
pathname2 = 'data/H3K9me3/foci'
# loop
for f1 in os.listdir(pathname1):
# create name d2
f2 = f1[:-6] + 'd2.TIF'
# create file paths
img_blue = os.path.join(pathname1,f1)
img_red = os.path.join(pathname2,f2)
# read files
img_blue_file = io.imread(img_blue)
img_red_file = io.imread(img_red)
# merge files
merged = merge_imgs([img_blue_file, img_red_file])
# create output file name
output_name = 'data/H3K9me3/merged/' + f1[:-6] + '.TIF'
# save merged files
io.imsave(output_name, merged)
Thank you for your videos, you are doing a great job. So far I've only seen a couple of your videos on opencv, which made my work easier and saved lot of my time on searching. Currently I'm working on an application which uses opencv and pyqt5 to process and display some 16 bit grayscale and rgb images and it's information. Since I'm new to python gui I'm really facing a hard time displaying the opencv processed images in QLABEL after formating it using QImage 's format options. What I came through from Google search is that QImage won't support 16 bit images. So please give me some tips on this issue also please let me know if there is any other options available to display these images.
I never tried viewing non 8 bit images using libraries in python. I convert them to 8 bit for quick visualization and then export for external visualization. Do you have to view them using python? If not, there are many options outside.
@@DigitalSreeni If it is in python, I think I don't have to spend my time on learning new language or libraries. Considering other options is not up to me, gotta check with my client. If you don't mind, could you please tell me the most appropriate options I have.
Your videos are good for me, I watched all of them twice, my question here what meaning of 6, 11, 22, 80
('Top left', 6)
('Top right', 11)
('Bottom Left', 22)
('Bottom right', 80)
when changing 1(color) to 0 (gray)
Pixel values.
Hi Dr. Bhattiprolu, thanks for the videos, I get this error when I want to use cv2.imshow for merged and resized image: 'numpy.ndarray' object is not callable, not sure how to solve it
That error usually means you are trying to call a function instead of array. Please make sure your variable is not a function of other variables. Also, make sure the variable you are using to assign your image is not a built in python function.
I am interested in ai-medical image analysis.
Is it right for me to take this lecture?
Thank you this is was helpful, how we can apply this for the whole folder
This may help: ruclips.net/video/QxzxLVzNfbI/видео.html
Sir how to set bit depth of an image??
Have you any video about how to classify multiple textures for one image using OpenCV?
Please check my video about image segmentation using traditional machine learning. With machine learning you can segment various textures easily. But, it wasn't opencv.
Awsome
Also for reading it's showing syntaxerror : (Unicode error)'unicodeescape' codec can't decide bytes in position 2-3 truncated \UXXXXXXXX escaep
Can you please tell me what's the problem
Probably related to your other issue of not reading an image.
How to check image is grascale or RGB using python code
Just load the image using opencv or scikit image. Look at the numpy array it generates, if it has 3 channels then you know it is an RGB image.
how does the cv2.merge work?
Whatever code you r typing isn't working in my Spyder
It's showing attribute error : 'NoneType' object has no attribute 'shape'
To display the size of the image
That means there is no image, please check the path. In fact, always look at the variable explorer to see if everything is working after you type each line.
@@DigitalSreeni I tried different images from different paths but it isn't working and no variable is displayed in variable explorer...
@@sushilkotwal8915 Well, the issue is obviously with reading images. Try placing the image in your current working directory so you don't have to give the entire path to image. Also, what type of image are you trying to read, JPG, PNG?
@@DigitalSreeni I can't find out where is the directory?
Actually, I am working on a my college project and I am learning image processing from basics and I need to learn from the bottom I am using the Spyder platform first time...
Sir ,dont make your presentation for microscopist .It is beneficial for all im just saying this because this will bring more students to your channel and more will be benefitted...