-
Notifications
You must be signed in to change notification settings - Fork 42
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
WIP: Add DefaultSharpen and DefaultSmooth Ops #557
base: master
Are you sure you want to change the base?
Conversation
789cdb2
to
bf87bdf
Compare
Half of the edge artifacts were fixed by adding the logic present in the plugins that differs output between |
Hi @gselzer Do you think the code could be a bit "DRYer"?? I can get almost the same result with a script that is a couple lines long.
Of course, there is an issue with my script in that the output and calculations are forced to be 32 bit. Potentially we could do the following
What do you think?? |
That is a good point @bnorthan, I had little understanding/awarenesss of the convolve Ops, so I didn't even think to use them. At this point I have
|
bf87bdf
to
dae52ed
Compare
@bnorthan both Ops now pass most of the work on to helper Ops. Using some |
dae52ed
to
fde412a
Compare
Hi @gselzer it looks to me like both smooth and sharpen are almost exactly the same. Also it would be nice to be able to take advantage of the work you have done on slice wise processing and normalization for other kernels. Do you think it would be a good idea to make an op called something like |
@bnorthan yes, I was also thinking about that as well, however I did not do it because I had no idea where we would house such an Op, since it does multiple things. I suppose maybe it could go in Now that I think about it #556 is also similar in computation, however it is slightly different in the calculation of the value that goes into the output. If we were to do this I think we would want to make the Op a |
Hi @gselzer You are right we should make the One other quick question. Do you think it is necessary to convert to double for the intermediate calculation?? Is there a reason for that?? In the original plugin it looks like everything is done in integer math. |
Hi @gselzer A few more thoughts after looking more closely at the IJ1 implementations.
Just some thoughts. Let me know if I've misunderstood anything. |
@bnorthan I think the only thing preventing us from using As far as As far as adding a |
Hi @gselzer
|
Adapted from the implementations created by Barry Dezonia
The dimensionality check seemed to fail the Op when the input had MORE than two dimensions. It should fail the Op when the input has LESS than two dimensions
This PR adds two Ops adapted from the Sharpen and Smooth ImageJ core plugins.
This PR is currently a WIP because:
There are edge artifacts present in the Ops and I have not yet figured out the difference between the Ops and the plugins. As far as I can tell the Ops are summing up the neighborhood pixels the same as the Plugin, does. Further investigation is needed.
The Plugins should either be deprecated or just a wrapping of these Ops.