Watershed

In this post we continue exploring and experimenting with topics from the PluralSight course Building Image Processing Applications Using scikit-image by Janani Ravi. The topic for this post is Watershed.

In image processing, a watershed (image processing) is a transformation defined on a grayscale image. The name refers metaphorically to a geological watershed, or drainage divide, which separates adjacent drainage basins. The watershed transformation treats the image it operates upon like a topographic map, with the brightness of each point representing its height, and finds the lines that run along the tops of ridges. These lines are then used to segment the image into regions. Continue reading “Watershed”

Histogram of Oriented Gradients

This morning on LinkedIn, NEWSLETTER, Big Technology, A newsletter about Big Tech and society, by Alex Kantrowitz I listened to the podcast Let’s Talk About Temu and Shein, The Fast-Rising, China-Based Retailers Threatening U.S. Mainstays. 

On Big Technology Podcast, Ranjan Roy and Alex Kantrowitz spoke with New York Magazine contributing editor John Herrman about Temu and Shein, the fast-rising, China-based retailers that are threatening the U.S. mainstays including H&M and Amazon.

Continue reading “Histogram of Oriented Gradients”

Daisy Descriptors

In this post I will experiment with the DAISY descriptors. Please note that one of the simplest approaches is to alter parameters in the different functions and observe the results. In addition you should look up the functions in the scikit-image to get a better understanding of the function and arguments e.g., skimage.feature.daisy.

The motivation for this post is the PluralSight course by Janani Ravi. She uses the Jupyter notebook in the course. We will use the VSCode IDE with GitHub Copilot. This helps experiment with the code. At this point I would like to disclose that I am a Microsoft employee and use the VSCode IDE with GitHub Copilot extension. Have been using VSCode for a few years. In the past few months I started using GitHub Copilot. Continue reading “Daisy Descriptors”

Convex Hull

In this post we will learn a few things about a convex hull.

Before we get into the main subject I would like to chat for a few on a different subject. Currently I continue to read Natural Language Processing by Ekaterina Kockmar. Earlier this morning I was reading the section 3.2.2 Matching forms of the same word: Morphological processing. In the current chapter we are trying to develop an information retrieval system. In a nutshell we have a set of documents of interest and a set of queries. The idea is that given a query we want to return relevant documents in descending order. Sounds very much like what Google search does. Of course the objectives are not to write something to compete with searches on web browsers, but to give us an idea of the general steps needed to perform such a task.

In particular I was reading about Stemming. The idea is that when you have words in a query and wish to map them to words on a document, the forms of a word may be different. A simple word match would not work (e.g., continue and continuation) because for a computer the words are different. If we implement an algorithm using stemming we will be able to match the words.

As I was reading the section an old Spanish saying (https://en.wikipedia.org/wiki/Saying) “The devil knows more through being old than through being a  devil.” If you stop for a few and think about the Spanish saying you should reach the conclusion that it is wrong. In general if you do not reflect on what happened, the good and bad decisions you made, you will not learn and therefore you will not become wiser. For the Spanish saying to be true one must assume that the devil reflects on past events. Since the devil is a personification of evil and not a being like us, the saying is just a saying. Continue reading “Convex Hull”

Contours

In this post we will experiment with drawing contours on shapes. This post is based on the PluralSight course by Janani Ravi.

We will use The Marching Squares algorithm to draw contours. The algorithm is easy-to-implement, is an embarrassingly parallel algorithm that generates contours for a two-dimensional (rectangular) array. Continue reading “Contours”

Block Views and Pooling Operations

In this post we will continue reading and experimenting with the contents of the PluralSight course “Building Image Processing Applications Using scikit-image” by Janani Ravi.

Please note that the course uses the Jupyter notebook to hold the code and results. In this post we will write modified code using the VSCode IDE and a Python script using GitHub Copilot. I would like to disclose that I am a Microsoft employee and have been using VSCode and Python for several years. Continue reading “Block Views and Pooling Operations”

Spam Filter

In this post we will implement a spam filter. My motivation is dual. On one hand I am reading and experimenting with the book Natural Language Processing by Ekaterina Kockmar published by Manning. On the other hand, I am experimenting with VSCode IDE using GitHub Copilot. If interested I would suggest following the book. I purchased a copy via Amazon Prime.

I have to disclose that at this time I am a Microsoft employee and have been using Visual Studio and VSCode for many years. Continue reading “Spam Filter”

Data Oriented Programming – DOP

A couple weeks ago I attended the one-hour webinar “Reduce System Complexity with Data-Oriented Programming” from the ACM. I have been a member of the ACM for a long time and enjoy their webinars, magazine, and access to on-line courses. At this time they offer access to PluralSight which happens to also be offered at work.

The following comes from the invitation to the ACM webinar:

Description

Complexity is one of the main difficulties in the development of successful software systems. Modern programming languages and frameworks make it easy to develop and deploy our code quickly, but as the code base grows, complexity makes it challenging to add new features. Continue reading “Data Oriented Programming – DOP”

Best Time to Buy and Sell Stock with Transaction Fee

Good morning! Hope you had a great weekend. The weekend was not too exiting for my wife and me. We did replenish our freezers for the next few months. I believe we have enough supplies to last us through a good part of spring 2022.

We decided to cook some ribs in the oven. We have done this several times, but due to the fact that my wife is not too fond of such delicacy we have not cooked them in about three years. I pulled the ribs from one of the freezers and put it in a refrigerator for three days. On Friday evening I took them out of the fridge and they were still partly frozen.

On Saturday morning after breakfast I rubbed some salt and pepper on the ribs. Like I mentioned, she is not too fond of ribs or BBQ sauce. I wanted to add some that we got at Trader Joe’s a couple weeks ago. I ended using the sauce on my dish. My wife used an Asian sauce which went very well with ribs. We also bought that sauce at Trader Joe’s.

I was going to set the oven at no more than 300F, but my wife suggested 325F to get them done faster. The ribs went in around 07:00 AM. After showering and getting dressed, I went down to my office for a 2-hour block.

Later that morning my wife and I sat down for a cup of triple espresso. We chatted and decided to get a couple items at a specialty grocery store in St. Paul. We turned off the oven and headed out. In retrospect, we should have removed the ribs from the oven. We had lunch around 01:00 PM and the ribs got a little dry for my taste. We had them with brown rice and black beans. We both enjoyed them, but once a year is enough. The taste is very unique like turkey. We have turkey on Thanksgiving Day and perhaps Christmas. I guess most people do the same in this part of the country.

On a separate note, I ran into the article Was Our Universe Created in a Laboratory? by Avi Loeb published on Scientific American on October 15, 2021. The article starts with the word “Opinion” which puts it into perspective.

I am not going to get into the implications of the ideas in the article. My parents taught me never to discuss religion, money or sex. Such subjects are very opinionated and it is hard to get a general consensus. That said; here we are talking about the article. The reason for me to bring it up is due to the fact that for the past three decades or more, when my wife and I talk in private, I have described to her the idea of multiple universes generated by beings more advanced than us. In such universes there are some actual beings and many artifacts. The idea behind is to study scenarios that in general fall outside our comprehension and interests.

I have to tell you that as soon as I read the article, I ran to my wife to tell her about it. We both thought it was very interesting.

In my thoughts and opinion, the article does not exclude a superior being that is above all levels. It just puts such being above the more advanced civilization(s) that at this point are able to generate universes.

I will try to contact the author of the article and let him know that I really enjoyed reading it. After an hour or so of sending my message to the author, I received a reply. Thanks. Continue reading “Best Time to Buy and Sell Stock with Transaction Fee”

Database Sharding

Good day software developers and engineers. Today is Wednesday and it seems it is going to be a sunny day in the Twin Cities of Minneapolis and St. Paul. Hope the weather cooperates in your neck of the woods.

I continue to read and experiment with the contents presented in the on-line course Introduction to Python Fundamentals: Lesson 02 by Paul Deitel published by Pearson Education, Inc. As a matter of fact, tomorrow I will start with lesson 03. So far I am pleased to be reviewing and learning new things during the process. Continue reading “Database Sharding”