Thanks for your help.Įdit: made a few mistakes when changing the code, updated to what it currently is now and display the 3 images If anybody could direct me to get the same results as my matlab implementation, that would be greatly appreciated. My thought process is after thresholding to remove pixels less than 100 in size, then smoothen the image with blur and fill up the black holes surrounded by white - that is what i did in matlab. ![]() why is this and how do i clean the image up? Ideally i would like to isolate only the image of the cabbage. However, the image does not seem to have changed from "green" to "cleaned" despite using the remove_small_objects function. #green = cv2.GaussianBlur(green, (3, 3), 0)Ĭleaned = morphology.remove_small_objects(green, min_size=64, connectivity=2) Green = cv2.inRange(image, greenLower, greenUpper) # Load the image, convert it to grayscale, and blur it slightly # Construct the argument parser and parse the argumentsĪp.add_argument("-i", "-image", required = True, I am trying to remove noise in an image less and am currently running this code import numpy as np
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |