Techno Blender
Digitally Yours.

Higher Precision Imaging of Espresso Baskets | by Robert McKeon Aloe | Feb, 2023

0 81


Coffee Data Science

To better measure the difference between the top and bottom of each hole

Cameras have greatly advanced over the years allowing people to take high quality images. While this can be useful for computer vision applications, often simple changes in design of experiment can greatly improve the quality of these images for specific applications. Enter coffee!

For a few years, I have been applying my image processing skills to image espresso filter baskets. Two years ago, I looked at trying to image the top and bottom to measure per hole shapes. However, this investigation halted when I had some trouble aligning the images automatically. Recently, I have been at it again, but I used manual alignment to improve the process.

While collecting some data, I realized my imaging setup could also be better, so let’s discuss them here.

Imaging espresso baskets is challenging for a few reasons:

  1. Metal baskets and reflectivity
  2. The holes are tiny
  3. Camera lens have curves

I have worked on adjusting for many of these things through data collection SOP and post-processing.

I use a few standardized tools:

  1. A tablet screen to illuminate the basket holes
  2. A dark room to isolate other light sources
  3. Lower exposure to handle reflections of the tablet screen off of the basket back to the camera.

I have a semi-automated process to make processing easier:

  1. Label basket using a blue circle
  2. Manually threshold images
  3. Automatically remove non-holes
  4. Readjust any ellipse shaped hole to a circle shape.
  5. Adjust illumination across the filter

First, the amount of light for the measurement of the top of the filter should match the measurement from the bottom.

So I made a collar using a paper cup to hold the filter where the top (the inside of the basket) would be at the same height as the bottom of the filter when it is flipped over.

Then I also made an adjustment for lighting. The full screen is needed to calibrate the image (# of pixels per millimeter), but any lighting not underneath the filter reflects off of the camera (my phone camera) back onto the filter.

To eliminate this, I used the full screen brightness for calibration, and I take another image with a white circle in the middle. This eliminates the reflection problem.

But then I need calibration! To make sure the images are aligned given that the phone might shift (even in a stand), I manually align the images in the app Procreate. I thought this would be more difficult, but it is very straight-forward with layers and 50% transparency. I also found fun things like how symmetric VST filter baskets are.

I use the calibration image to align both the top and bottom images so that everything is calibrated to the same scale. This involves linear resizing and object rotation until the holes are best or most aligned. I have to mirror the bottom image to make sure the holes are correctly aligned with the top image.

Then I run these images through my algorithm. Below are the top and bottom images of the Wafo Classic in false color to depict hole size. There is a splotch of blue in the image of the top (on the left), and this is not due to some other issue. It is a persistent feature in multiple captures.

Left: From the top of the filter, Right: From the bottom of the filter (mirrored)

These distributions can be used to better understand a filter basket.


Coffee Data Science

To better measure the difference between the top and bottom of each hole

Cameras have greatly advanced over the years allowing people to take high quality images. While this can be useful for computer vision applications, often simple changes in design of experiment can greatly improve the quality of these images for specific applications. Enter coffee!

For a few years, I have been applying my image processing skills to image espresso filter baskets. Two years ago, I looked at trying to image the top and bottom to measure per hole shapes. However, this investigation halted when I had some trouble aligning the images automatically. Recently, I have been at it again, but I used manual alignment to improve the process.

While collecting some data, I realized my imaging setup could also be better, so let’s discuss them here.

Imaging espresso baskets is challenging for a few reasons:

  1. Metal baskets and reflectivity
  2. The holes are tiny
  3. Camera lens have curves

I have worked on adjusting for many of these things through data collection SOP and post-processing.

I use a few standardized tools:

  1. A tablet screen to illuminate the basket holes
  2. A dark room to isolate other light sources
  3. Lower exposure to handle reflections of the tablet screen off of the basket back to the camera.

I have a semi-automated process to make processing easier:

  1. Label basket using a blue circle
  2. Manually threshold images
  3. Automatically remove non-holes
  4. Readjust any ellipse shaped hole to a circle shape.
  5. Adjust illumination across the filter

First, the amount of light for the measurement of the top of the filter should match the measurement from the bottom.

So I made a collar using a paper cup to hold the filter where the top (the inside of the basket) would be at the same height as the bottom of the filter when it is flipped over.

Then I also made an adjustment for lighting. The full screen is needed to calibrate the image (# of pixels per millimeter), but any lighting not underneath the filter reflects off of the camera (my phone camera) back onto the filter.

To eliminate this, I used the full screen brightness for calibration, and I take another image with a white circle in the middle. This eliminates the reflection problem.

But then I need calibration! To make sure the images are aligned given that the phone might shift (even in a stand), I manually align the images in the app Procreate. I thought this would be more difficult, but it is very straight-forward with layers and 50% transparency. I also found fun things like how symmetric VST filter baskets are.

I use the calibration image to align both the top and bottom images so that everything is calibrated to the same scale. This involves linear resizing and object rotation until the holes are best or most aligned. I have to mirror the bottom image to make sure the holes are correctly aligned with the top image.

Then I run these images through my algorithm. Below are the top and bottom images of the Wafo Classic in false color to depict hole size. There is a splotch of blue in the image of the top (on the left), and this is not due to some other issue. It is a persistent feature in multiple captures.

Left: From the top of the filter, Right: From the bottom of the filter (mirrored)

These distributions can be used to better understand a filter basket.

FOLLOW US ON GOOGLE NEWS

Read original article here

Denial of responsibility! Techno Blender is an automatic aggregator of the all world’s media. In each content, the hyperlink to the primary source is specified. All trademarks belong to their rightful owners, all materials to their authors. If you are the owner of the content and do not want us to publish your materials, please contact us by email – [email protected]. The content will be deleted within 24 hours.

Leave a comment