In Image Processing, projection profile refers to projection of sum of hits/positives along an axis from bi-dimensional image. Projection profile method is majorly used for segmentation of text objects present inside text documents.
Note: Projection profile is calculated for a thresholded image or binarized image where a thresholded image is a grayscale image with pixel values as 0 or 255. Image pixels are replaced by 1 and 0 for pixel values 0 and 255 respectively.
Projection profile is calculated separately for different axis. Projection profile along vertical axis is called Vertical Projection profile. Vertical projection profile is calculated for every column as sum of all row pixel values inside the column. Horizontal Projection profile is the projection profile of a image along horizontal axis. Horizontal Projection profile is calculated for every row as sum of all column pixel values inside the row.
Code Implementation for Horizontal Projection Profile:
3 1 3 1 3
Code Implementation for Vertical Projection Profile:
5 3 3
Time Complexity: O(rows*columns)
Space Complexity: O(rows*columns)
- class method vs static method in Python
- Python | set() method
- Python | next() method
- Python | os.dup() method
- Python PIL | Image.new() method
- Python | Tensorflow log() method
- Python | Tensorflow abs() method
- Python PIL | UnsahrpMask() method
- Python | Tensorflow exp() method
- Python | os.fchdir() method
- Python Dictionary | pop() method
- Python | os.unlink() method
- Python | PyTorch cos() method
- Python | PyTorch tan() method
- Python | os.fstat() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.