Skip to content

Conversation

@breznak
Copy link
Member

@breznak breznak commented Oct 22, 2019

WIP PR, I made some cleanups,improvements to the PR, but broke scaling/logpolar.

What I'd like to do is use Retina's useLogSampling, but imho that unfortunately

  • does not do logpolar transformation (only log scaling?)
  • does not allow to set center&diameter of fovea

Our current approach is neither ideal,

  • we have to crop to ROI

  • I'd like to re-center the image to given center (& fov. diameter)

    • then apply log polar to all of the image
    • then apply log-scale reduction as is in Retina (so parts further from fovea become blurred, encoded with lesser precision)
  • What is the difference for self.scale and self.scale_fovea ?

    • is scaling working properly, incl plots?

Follow up to #691

instead of doing it manually
replace self.output_diameter with self.retina.getOutputSize()
replace self.retina_diameter with self.retina.getInputSize()
require same dims for all images
make new_image_() a static method, used internally by compute()
TODO avoid that, work with rectangles?
This reverts commit 40dd4b30781c96f8b5bae9545f258c73e75592ce.
Copy link
Member Author

@breznak breznak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @ctrl-z-9000-times please have a look at these, and esp the issues in this PR's description, thank you.

self.resolution_factor = 3
self.retina_diameter = int(self.resolution_factor * output_diameter)
# Argument fovea_scale ... represents "zoom" aka distance from the object/image.
self.fovea_scale = 0.177
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fovea_scale vs self.scale?

self.scale = 1.0


def new_image_(image):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now static, rename to read_image?

center = self.retina.getInputSize()[0] / 2
M = self.retina.getInputSize()[0] * self.scale
if self.parvo_enc is not None:
parvo = cv2.logPolar(parvo,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we apply the logPolar only in the Channel encoder? Bcs that one expects its data in that form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants