Region Segmentation error in my sample image #178
Replies: 3 comments 3 replies
-
|
You'll want to flatten your image (remove the alpha band) before you start processing it. So change: img |> Image.to_colorspace!(:srgb)to img |> Image.to_colorspace!(:srgb) |> Image.flatten()On my system that produces the expected result. Let me know how it looks on your end? |
Beta Was this translation helpful? Give feedback.
-
|
It would certainly be possible to work with an image that has an alpha band but its more complex and for your use case I don't believe it adds any value. |
Beta Was this translation helpful? Give feedback.
-
|
Mm, I'm still getting the same error. But don't worry, the relevant part for me is getting the bounding boxes of artifacts, and that works as expected with my image. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!, I'm trying to test the example region_segmentation with the image at the bottom of this post (when loaded in LiveBook I get this info:
1.png, 697x800 8-bit unsigned integer, 3 bands, sRGB).First I add the "Hola Mundo" text at the top left of the image, to simulate a couple of artifacts:
That results in:
Then, using the resulting image I follow the region_segmentation example, but at the end of it I get:
** (ArgumentError) operation build: linear: vector must have 1 or 4 elementsCould you check it with my image?.
Beta Was this translation helpful? Give feedback.
All reactions