fbpx
Cameras’ biggest recent advancements have come from AI, not sensors and lenses. Over the past couple of years, technology has enabled...
import cv2
from wordcloud import WordCloud 
import matplotlib.pyplot as plt#White text Black Background
image = cv2.imread("D:/Photography/Typography/mask1.jpg", 1)
wordcloud = WordCloud(background_color='black', mask=image,                    mode="RGB", color_func=lambda *args, **kwargs: "white", 
width=1000 , max_words=100, height=1000, random_state=1).generate(text)fig = plt.figure(figsize=(25,25))
plt.imshow(wordcloud, interpolation='bilinear')
plt.tight_layout(pad=0)
plt.axis("off")
plt.show()
#Colored text white Background
image = cv2.imread("D:/Photography/Typography/mask2.jpg", 1)
wordcloud = WordCloud(background_color='white', mask=image, mode="RGB", max_words=1200, width=1000 , height=1000, random_state=2).generate(text)fig = plt.figure(figsize=(25,25))
plt.imshow(wordcloud, interpolation='bilinear')
plt.tight_layout(pad=0)
plt.axis("off")
plt.show()
Wah Taj!
World’s smallest car 😜
📸🧕🕌 The right perspective makes the impossible possible ✨
Longest lens ever! A good photograph is knowing where to stand -Ansel Adams

Originally posted here.

About the author, Apratim Sahu:

Growth Hacker, B.Tech M.Tech IIT Kharagpur, Photographer

Passionate about Computer Vision and AI

LinkedIn: linkedin.com/in/apratim24

ODSC Community

The Open Data Science community is passionate and diverse, and we always welcome contributions from data science professionals! All of the articles under this profile are from our community, with individual authors mentioned in the text itself.

1