Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cropping of image using ROI not working #102

Closed
navrkr opened this issue Oct 10, 2022 · 9 comments
Closed

cropping of image using ROI not working #102

navrkr opened this issue Oct 10, 2022 · 9 comments

Comments

@navrkr
Copy link

navrkr commented Oct 10, 2022

Please refer to the below images to understand about the issue.
This is a function used to get image:
Screenshot from 2022-10-10 10-50-12
This is the error window:
Screenshot from 2022-10-10 10-52-21
Its working in python for reference:
Screenshot from 2022-10-10 10-52-55

@cocoa-xu
Copy link
Owner

Hi @navrkr, sorry I haven't implemented that feature yet. I'd really like to implement it, but I don't have enough time.

At the moment, there are two different workarounds that I can think of:

  • The first way is to convert the image to a Nx.Tensor by Evision.Nx.to_nx!(img, Nx.BinaryBackend) (or perhaps you can use :torchx, Evision.Nx.to_nx!(img, Torchx.BinaryBackend)). Then you can use the corresponding function in :nx to achieve the same goal.
  • The other way is to use libraries like Image (kipcole9/image), which provides a convenient Image.crop/5 function, and Image support zero-copy between it and Evision.Mat.

I'll leave this issue open until the requested feature is implemented.

@navrkr
Copy link
Author

navrkr commented Oct 10, 2022 via email

@Jagan3534
Copy link

i haven doubt in Nx.slice we are working on it we converted image to 2d array by using your instructions could you please help us @navrkr @cocoa-xu
ans

how can slice function work on it

2

we are trying to give all but its not work please help us sir

@navrkr
Copy link
Author

navrkr commented Oct 12, 2022 via email

@Jagan3534
Copy link

Jagan3534 commented Oct 12, 2022

Have you completed implementation of Slicing? Can we expect it to work in
next version of Evision?

On Wed, 12 Oct, 2022, 2:19 am Cocoa, @.***> wrote:

Closed #102 #102 as completed.


Reply to this email directly, view it on GitHub
#102 (comment), or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AQKLPGDW2BSKQR53NHRGJKTWCXHHNANCNFSM6AAAAAARBAOTX4
.
You are receiving this because you were mentioned.Message ID:
@.***>

Yes, we completed and the image is cropped
But in that i have small doubt as per ur image again we need to divide each square into separate box
At present we are working on detecting the number using tesseract ocr

@cocoa-xu
Copy link
Owner

Have you completed implementation of Slicing? Can we expect it to work in next version of Evision?

Please see Evision.Mat.roi in the newly released version.

@navrkr
Copy link
Author

navrkr commented Oct 13, 2022 via email

@kipcole9
Copy link

Thanks alot bro and update on my project: It's completed implementation.
I think it would be appropriate that you take a little time to understand who Cocoa is and be more considered in the way you address her.

@navrkr
Copy link
Author

navrkr commented Oct 13, 2022

Thanks alot bro and update on my project: It's completed implementation.
I think it would be appropriate that you take a little time to understand who Cocoa is and be more considered in the way you address her.

Sorry for the inconvenience caused. You are such a beautiful soul.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants