-
Notifications
You must be signed in to change notification settings - Fork 256
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
Perspective warp #648
Perspective warp #648
Conversation
Codecov Report
@@ Coverage Diff @@
## master #648 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 129 130 +1
Lines 6120 6176 +56
=========================================
+ Hits 6120 6176 +56
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@nfahlgren @HaleySchuhl The tests are failing on colorspaces() function which I didn't touch !?! It looks like it isn't importing the rgb2gray_* functions properly but i have no idea why. |
@dschneiderch I think I got it, it was a tricky one. The |
wow, well thanks. I would not have guessed that import order matters. that means there could be circular dependencies(!) |
@dschneiderch this is great! I just tested it on one of our old use cases, fitting a mask derived from an RGB image onto an image from our NIR cabinet. One little issue I ran into that I need to think about more is that our NIR images are 16-bit and the mask is 8-bit, so when they get overlayed in the debug image it looks like weird noise. I'm not sure that it needs to be fixed, I just converted the NIR image to 8-bit to get around it. In thinking about this function and our existing |
Thanks! |
Yeah, just imagining a case where there's nothing in the background to use as anchor points. With |
You can always use the edges and center of the plant as landmarks and adjust from there, no?
From: Noah Fahlgren <notifications@github.com>
Sent: Friday, December 4, 2020 10:51
To: danforthcenter/plantcv <plantcv@noreply.github.com>
Cc: Schneider, Dominik <dominik.schneider@wsu.edu>; Mention <mention@noreply.github.com>
Subject: Re: [danforthcenter/plantcv] Perspective warp (#648)
Yeah, just imagining a case where there's nothing in the background to use as anchor points. With crop_position_mask you could guess and check until you got the overlap the way you want but I think that would be harder with landmark points. But like I said, not sure that's a likely scenario and I do think warp is not only a more complete computational approach, but also easier if you have easy to identify landmark points (i.e. no guess and check necessary).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/danforthcenter/plantcv/pull/648*issuecomment-738955442__;Iw!!JmPEgBY0HMszNaDT!8Et2JjhyhD6mnmf44BO4y5QTin0XUGBAtVY_h9-zsyfZq66gdv2soSXnxWirN3WAEzlkZA$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ABY5SZN47M73AHZXXTRQF4TSTEVSTANCNFSM4T2RLNXA__;!!JmPEgBY0HMszNaDT!8Et2JjhyhD6mnmf44BO4y5QTin0XUGBAtVY_h9-zsyfZq66gdv2soSXnxWirN3XlzS2S3g$>.
|
True, that makes sense. So maybe we can mark |
That sounds like a good plan to me! |
Adjusted indentation alignment and in-line comment spacing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dschneiderch, this is a nice function to have integrated in!
Describe your changes
Add function to fuse images that have different size/scale/proportions, e.g. from two (different) cameras in different locations . The function accepts 2 images and 4 pairs of points in order to compute a perspective transformation matrix so the images overlay nicely. I found this works much better than simple scale/rotate/translate https://cougphenomics.github.io/camera_overlays.html
Type of update
Is this a:
Associated issues
discussed in various forms here #615 and #634