GithubHelp home page GithubHelp logo

Boundary conditions about imageproc HOT 3 OPEN

image-rs avatar image-rs commented on July 19, 2024
Boundary conditions

from imageproc.

Comments (3)

bvssvni avatar bvssvni commented on July 19, 2024

I found something similar for OpenGL https://www.opengl.org/wiki/Common_Mistakes#Texture_edge_color_problem. It might be worth taking a look at how other APIs do it.

from imageproc.

theotherphil avatar theotherphil commented on July 19, 2024

Thanks, I'll take a look. I know VLFeat allows zero or continuity padding. I've never looked into how this sort of thing is done in graphics libraries before.

from imageproc.

csheaff avatar csheaff commented on July 19, 2024

This has come up in working on #217. Regarding implementations for a custom border condition, I thought I'd mention two approaches that I've come across so far:

skimage._shared.interpolation.get_pixel3d - This is a function for retrieving a single pixel which takes into account the preferred boundary type. So in a given op, the border type is made use of when indexing the image, as indices exceeding the image size bounds can be passed to the function.

cv::copyMakeBorder - OpenCV's approach appears to be a padding of the image given the preferred border type prior to indexing the image.

I wonder if the skimage approach is cleaner, given that padding the image before ops requires efforts to avoid the added border when iterating across the image indices, which adds extra code and complication to every function needing a boundary condition. Although there might be speed considerations that I'm not aware of.

from imageproc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.