image-processing

Medial Axis Transform/Skeletonization on morphological for calculating numbers of component

Medial Axis Transform/Skeletonization on morphological for calculating numbers of component Question: I’m trying to calculate the number components on opencv library "connectedComponentsWithStats" in python, but my skeletonization result seems not do well, cause the number of component return incorrect result. Here my original image to convert to skeleton. input And here’s my code as below, …

Total answers: 1

How to insert text to image by cv2.warpPerspective in python opencv?

How to insert text to image by cv2.warpPerspective in python opencv? Question: Like this in python opencv: i = 0 for line in wrapped_text: cv2.putText(img, line, (x, y), font, font_size, (255,255,255), font_thickness, lineType = cv2.LINE_AA) i +=1 cv2.imshow("Result Image", img) cv2.waitKey(0) cv2.destroyAllWindows()` Asked By: Marina Parshina || Source Answers: Good question! I think this way …

Total answers: 1

np.concatenate dimension problem of 1 & 3 channel image input

np.concatenate dimension problem of 1 & 3 channel image input Question: I’m trying to train a future 7days broccoli Unet model I try to concatenate images, because my input have 8 channel(51channel 13channel[index 5]) appear this error message img_batch = np.concatenate(images, axis=3)________line172 mask_batch = np.concatenate(masks, axis=2)________line173 y_int = np.argmax(mask_batch, axis=2) y_binary = to_categorical(y_int) yield (img_batch, …

Total answers: 1

How to accurately measure the contact ear orientation on a flat battery using diplib

How to accurately measure the contact ear orientation on a flat battery using diplib Question: Our production line want to automate the fabrication of flat battery, I want to accurately measure the contact ear orientation of the flat battery and send the center of the battery coordinate plus the ear orientation degrees to linuxCNC motion …

Total answers: 1

train pytorch CNN to specific image style

train pytorch CNN to specific image style Question: I’m trying to train pytorch CNN model to transform my images into specific style. I found tutorial for this at https://pytorch.org/tutorials/advanced/neural_style_tutorial.html, but this will transform the image in multiple iterations and I need to have a model that do the same thing to use it in C++ …

Total answers: 1

Displaying a RGB image in float64

Displaying a RGB image in float64 Question: I have an image with data type uint8. I want to convert it to the data type float64 and display it. I expected to see the image as I displayed it with data type uint8. But the result is this: My original image is like this: Why is …

Total answers: 1

Low Accuracy in Detecting Circles using Hough Circle open cv python

Low Accuracy in Detecting Circles using Hough Circle open cv python Question: I’m new to the Computer Vision field so this question may be fairly easy; yet I’m clueless on how to increase the Precision. I’m Trying to detect all circles in this picture. Here is the approach i took Gray Scaled the image gray …

Total answers: 1

remove stripes / vertical streaks in remote sensing images

remove stripes / vertical streaks in remote sensing images Question: I have a remote sensing photo that has bright non continuous vertical streaks or stripes as in the pic below, my question is there a way to remove them using python and opencv or any other ip library? , Asked By: gin || Source Answers: …

Total answers: 6

How to save image with same name with python?

How to save image with same name with python? Question: I have image folder as below : |——dir–| | |—- input–|– 1.jpg | | |– 2.jpg .. … … … where I want to do random rotation for input folder and save the results in output folder I tryied the fillowing script : import torch …

Total answers: 1

Convert image header information to ASCII code

Convert image header information to ASCII code Question: I got a string with image header information like pixel number for each dimension. Here the header: "1 10 10 1 4 LE". In addition to that the other image data is saved in the following base64 code: "+igSKdAm9CVoJhYnzidqKLsmnyX2JwQo9CYhJgMmaCb5Jo0nMSevJmAnwibIJuEmnyZRJpomNicxJ9gmfSeoJkcmySZAJ/Am2CZZJ78nOSeUJ7km+CWVJpMnyCebJ6UnoiclJ7UmPyY3JgsnwyfGJ7cniSdlJ3oneSajJi8n3ye5Jz4nvCeMJ1onYSdAJ3QnsScLKHsnTCfuJ6MnGCdaJ2onECfUJmcnhicEKAko9yZPJjYn0SY7JmkmKid3J1goDyhOJrIldic=". I tried to combine these two strings to …

Total answers: 1