'**SUMMARY**
Rectify the blob image and the contour such that the major
axis is aligned to either horizontal=0 or vertical=1. This is to say, we take the blob,
find the longest axis, and rotate the blob such that the axis is either vertical or horizontal.
**PARAMETERS**
* *axis* - if axis is zero we rotate the blobs to fit along the vertical axis, otherwise we use the horizontal axis.
**RETURNS**
This method works in place, i.e. it rotates the blob\'s internal data structures. This method is experimetnal.
Use at your own risk.
**EXAMPLE**
>>> img = Image("lenna")
>>> blobs = img.findBlobs()
>>> blobs[-2].mImg.show()
>>> blobs[-2].rectifyToMajorAxis(1)
>>> blobs[-2].mImg.show()'

def rectifyMajorAxis(self, axis=0):

    finalRotation = self.angle()
    w = self.minRectWidth()
    h = self.minRectHeight()
    if (w > h):
        finalRotation = finalRotation
    if (axis > 0):
        finalRotation = (finalRotation - 90)
    self.rotate(finalRotation)
    return None
