Skip to main content
. 2025 Aug 28;11:e3149. doi: 10.7717/peerj-cs.3149

Algorithm 1. Left-flipping algorithm.

 Data: img=inputImage
 Result: leftImg
vertSum[];
i0;
isLeftSideFalse;
 for colimg do
   vertSum[i]=(col);
   i=i+1
 end
 if i=0len(vertSum/2)(vertSum[i])i=len(vertSum/2)len(vertSum)(vertSum[i]) then
   isLeftSide=True
 end
 if not isLeftSide then
   img=verticalFlip(img)
 end
leftImgimg