For question 1, Nx.slice can only slice a rectangular area for you. To get the puzzle, you can use Evision.warpPerspective. There is an example of this function, evision/examples/warp_perspective.livemd at main · cocoa-xu/evision · GitHub.
For question 2, there could be 2 possible reasons,
- perhaps you forgot to change the second parameter of
Evision.findContours/3toEvision.cv_RETR_EXTERNAL() - you will need to find the contour that has shape
{4, 1, 2}. And based on the sample image, I guess you were following a blog post and if so, I think you missed some intermediate steps.






















