Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Image Preprocessing for Bottle Shape Recognition

Hello,

I recently started working with opencv and image processing in general. My goal is to build a tool that is able to classify different bottle types in images. (At the start I will try to classify between wine and beer bottles. One image can contain multiple bottles, where all bottles are aligned in a line. One important thing is, that the classification can not be done based on an label of the bottle.

So my idea was to use the following steps:

  • Use Edge detection on the image
  • Filter out only the outbound edges of all bottles
  • Split every bottle into a separate image
  • Split every image of a bottle into an array of tiles
  • Calculate the vector of every tile (I think it is called eigenvectors using PCACompute)

Afterwards feed the 2d array of vectors into a neural network. I think it would be optimal to only filter out the bottleneck but i dont know how i could achieve this.

Of course this processing does not work on any image. My filtering (Second step) is done by looking for groups of connected pixels (Problem here if images have higher or lower resolution). Maybe this could be improved by looking for the first pixel from every side? I also have no idea if i am on the right way to achieve my goal, as i have no experience in this area.

Does anyone have some tips to make my preprocessing more robust to different kind of images. (For example bad resoultion, different kind of brightnesses, ...)

Sorry for my concerns and questions but I am new in this field and it is so exciting and I want to improve so I appreciate any kind of help.


Here is the progress i have so far:

image description image description image description image description image description image description image description

Image Preprocessing for Bottle Shape Recognition

Hello,

I recently started working with opencv and image processing in general. My goal is to build a tool that is able to classify different bottle types in images. (At the start I will try to classify between wine and beer bottles. One image can contain multiple bottles, where all bottles are aligned in a line. One important thing is, that the classification can not be done based on an label of the bottle.

So my idea was to use the following steps:

  • Use Edge detection on the image
  • Filter out only the outbound edges of all bottles
  • Split every bottle into a separate image
  • Split every image of a bottle into an array of tiles
  • Calculate the vector of every tile (I think it is called eigenvectors using PCACompute)

Afterwards feed the 2d array of vectors into a neural network. I think it would be optimal to only filter out the bottleneck but i dont know how i could achieve this.

Of course this processing does not work on any image. My filtering (Second step) is done by looking for groups of connected pixels (Problem here if images have higher or lower resolution). Maybe this could be improved by looking for the first pixel from every side? I also have no idea if i am on the right way to achieve my goal, as i have no experience in this area.

Does anyone have some tips to make my preprocessing more robust to different kind of images. (For example bad resoultion, different kind of brightnesses, ...)

Sorry for my concerns and questions but I am new in this field and it is so exciting and I want to improve so I appreciate any kind of help.


Here is the progress i have so far:

image description image description image description image description image description image description image description