Giter Site home page Giter Site logo

Comments (5)

thomaswmorris avatar thomaswmorris commented on July 28, 2024

Done!

from ophyd-basler.

mrakitin avatar mrakitin commented on July 28, 2024

I think we can keep it open for now - I'd like to add an option to display predefined images from a directory (first bullet point).

For the second one, maybe we need to test it more at ATF and see if there are any missing buffers, or force this situation with the emulated cameras.

from ophyd-basler.

mrakitin avatar mrakitin commented on July 28, 2024

Oh, actually, we should port this issue to the https://github.com/BNL-ATF/ophyd-basler repo now. I'll do that.

from ophyd-basler.

mrakitin avatar mrakitin commented on July 28, 2024

For the 1st task, here is a starting point to generate a number of images:

import numpy as np
import matplotlib.pyplot as plt

plt.ion()

# sigma(standard deviation) and muu(mean) are the parameters of gaussian

def gaussian_filter(kernel_size, sigma=0.1, muu=0.0):

    # Initializing value of x,y as grid of kernel size
    # in the range of kernel size

    x, y = np.meshgrid(np.linspace(-1, 1, kernel_size),
        np.linspace(-1, 1, kernel_size))
    dst = np.sqrt((x+0.1)**2+(y-0.5)**2)

    # lower normal part of gaussian
    normal = 1/(2.0 * np.pi * sigma**2)

    # Calculating Gaussian filter
    gauss = np.exp(-((dst-muu)**2 / (2.0 * sigma**2))) * normal
    return gauss

kernel_size=1000
gaussian = gaussian_filter(kernel_size)
print("gaussian filter of {} X {} :".format(kernel_size, kernel_size))
print(gaussian)
plt.imshow(gaussian)
plt.show()

image

from ophyd-basler.

mrakitin avatar mrakitin commented on July 28, 2024

Useful example: basler/pypylon#73.

from ophyd-basler.

Related Issues (6)

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.