Giter VIP home page Giter VIP logo

strawberries's Introduction

alexlouden.com

Written using HTML5, sass, bourbon and coffeescript, built using cactus. Uses Python 3.

Development

pipenv install
pipenv shell
yarn install --dev
cactus serve

Deploy

cactus deploy
aws cloudfront create-invalidation --distribution-id E3DCULJZDC9TNR --profile alexlouden --path "/*"

strawberries's People

Contributors

alexlouden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

strawberries's Issues

plot rgb_hist error

Plot rgb_hist

def show_rgb_hist(image):
    colours = ('r','g','b')
    for i, c in enumerate(colours):
        plt.figure(figsize=(20, 4))
        histr = cv2.calcHist([image], [i], None, [256], [0, 256])
#         plt.plot(histr, color=c, lw=2)
#         print(histr.ravel())
        
        if c == 'r': 
            colours = [((i/256, 0, 0)) for i in range(0, 256)]

        if c == 'g': 
            colours = [((0, i/256, 0)) for i in range(0, 256)]

        if c == 'b': 
            colours = [((0, 0, i/256)) for i in range(0, 256)]

        
        plt.bar(range(0, 256), histr, color=colours, edgecolor=colours, width=1)
#         plt.xlim([0, 256])

        plt.show()
    
show_rgb_hist(image)

Error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-47-eb26539e3a3c> in <module>()
     22         plt.show()
     23 
---> 24 show_rgb_hist(image)

<ipython-input-47-eb26539e3a3c> in show_rgb_hist(image)
     17 
     18 
---> 19         plt.bar(range(0, 256), histr, color=colours, edgecolor=colours, width=1)
     20 #         plt.xlim([0, 256])
     21 

~/anaconda3/lib/python3.6/site-packages/matplotlib/pyplot.py in bar(*args, **kwargs)
   2646                       mplDeprecation)
   2647     try:
-> 2648         ret = ax.bar(*args, **kwargs)
   2649     finally:
   2650         ax._hold = washold

~/anaconda3/lib/python3.6/site-packages/matplotlib/__init__.py in inner(ax, *args, **kwargs)
   1715                     warnings.warn(msg % (label_namer, func.__name__),
   1716                                   RuntimeWarning, stacklevel=2)
-> 1717             return func(ax, *args, **kwargs)
   1718         pre_doc = inner.__doc__
   1719         if pre_doc is None:

~/anaconda3/lib/python3.6/site-packages/matplotlib/axes/_axes.py in bar(self, *args, **kwargs)
   2083                 edgecolor=e,
   2084                 linewidth=lw,
-> 2085                 label='_nolegend_',
   2086                 )
   2087             r.update(kwargs)

~/anaconda3/lib/python3.6/site-packages/matplotlib/patches.py in __init__(self, xy, width, height, angle, **kwargs)
    657         """
    658 
--> 659         Patch.__init__(self, **kwargs)
    660 
    661         self._x = xy[0]

~/anaconda3/lib/python3.6/site-packages/matplotlib/patches.py in __init__(self, edgecolor, facecolor, color, linewidth, linestyle, antialiased, hatch, fill, capstyle, joinstyle, **kwargs)
    101         self.set_fill(fill)
    102         self.set_linestyle(linestyle)
--> 103         self.set_linewidth(linewidth)
    104         self.set_antialiased(antialiased)
    105         self.set_hatch(hatch)

~/anaconda3/lib/python3.6/site-packages/matplotlib/patches.py in set_linewidth(self, w)
    349                 w = mpl.rcParams['axes.linewidth']
    350 
--> 351         self._linewidth = float(w)
    352         # scale the dash pattern by the linewidth
    353         offset, ls = self._us_dashes

TypeError: only size-1 arrays can be converted to Python scalars
cv2.__version__
'3.4.1'

How can I solve this issue?

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.