CarpeTools [Input]> Deperspective...
This tool is used to process the perspective image of the carpet. If you have an image which is laid out or not perfectly aligned, then you can select four points representing the four corners of the design/carpet, then Galaincha will automatically align that image within that area. You can move the points to align exactly to make it straight and click Process to view the design and click export to send it to new file.

Original image (left) and the final output (right)
Watch video tutorial on Deperspective