You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The README does not include code example of how to generate and save the color result with the superpixles overlayed on the fish image. How can this be done?
The text was updated successfully, but these errors were encountered:
Thanks for this superfast library. Its really fast. I have implemented it and I am trying to save this image. Therefore, I have converted image into RGB space using color.label2rgb. However, its very slow. Can you please guide how to save this super pixel image. Thanks in advance!
Kind regards,
Ram
import time
start_time = time.time()
with Image.open("C:\Users\003.bmp") as f:
image = np.array(f)
print("--- %s Time to read image ---" % (time.time() - start_time))
slic = SlicAvx2(num_components=500, compactness=10)
assignment = slic.iterate(image) # Cluster Map
print("--- %s Time to SuperPixel ---" % (time.time() - start_time))
Save Image
sample123 =color.label2rgb(assignment, image, kind='avg',bg_label = -1)
print("--- %s Time to Convert ---" % (time.time() - start_time))
io.imsave('test_16bit.png', sample123)
print("--- %s Time to Save Image ---" % (time.time() - start_time))
0.029166 | Time | to | read image |
0.141835 | Time | to | SuperPixel |
5.759102 | Time | to | Convert |
6.418611 | Time | to | Save Image |
The README does not include code example of how to generate and save the color result with the superpixles overlayed on the fish image. How can this be done?
The text was updated successfully, but these errors were encountered: