Use the '''Crop''' tab to indicate the areas of the input images that [[hugin]] should

+

''Image cropping'' shouldn't be confused with a camera's [[Crop factor]], which is something else entirely. Use the '''Crop''' tab to indicate the areas of the input images that [[hugin]] should exclude from the stitching output. There are three situations where you might want to use crop parameters:

−

exclude from the stitching output. Note that unlike [[PTGui]], setting [[crop parameters]] in

+

−

hugin doesn't change the [[Field of View]] or optical centre of your images, it simply

+

−

indicates areas of the image to be masked out.

+

−

+

−

(In detail, [[hugin]] uses the '''S''' 'selection' parameter in the '''i''' and '''o'''

+

−

script lines instead of the '''C''' 'crop' parameter)

+

−

+

−

Note that this image cropping shouldn't be confused with a camera's [[Crop factor]], which is

+

−

something else entirely.

+

−

+

−

There are three situations where you might want to use crop parameters in hugin:

+

−

+

* With a scanned input image, there are usually black edges or marks along the sides of the image.

* With a scanned input image, there are usually black edges or marks along the sides of the image.

* With a circular [[Fisheye Projection]] image there are black unexposed areas outside the image circle.

* With a circular [[Fisheye Projection]] image there are black unexposed areas outside the image circle.

* Some lenses have a lot of flaring around the edges which you don't want to keep.

* Some lenses have a lot of flaring around the edges which you don't want to keep.

+

+

Select the image to be cropped in the list to the left, you can adjust the position of the crop area by dragging the perimeter in the image preview on the right. Multiple images can be selected by holding down the ''Shift'' or ''Ctrl'' keys while clicking in the image list.

+

+

Note that unlike [[PTGui]], setting [[crop parameters]] in hugin doesn't change the [[Field of View]] or optical centre of your images, it simply indicates areas of the image to be masked out, so you can change the cropping for photos in your project at any stage of the stitching process.

+

In detail, [[hugin]] uses the '''S''' 'selection' parameter in the '''i''' and '''o''' script lines instead of the '''C''' 'crop' parameter.

Depending on the input image type, cropping has two different behaviours:

Depending on the input image type, cropping has two different behaviours:

−

* For circular fisheye photos the crop area is a circle.

* For circular fisheye photos the crop area is a circle.

* For any other input image, the crop area is a rectangle.

* For any other input image, the crop area is a rectangle.

+

Change the input image type in the [[Hugin Camera and Lens tab]].

+

+

The '''Crop''' tab features four text boxes for '''Left''', '''Top''', '''Right''' and '''Bottom''' where you can manually enter the positions of the four edges. The origin is top-left and numbers indicate the distance in pixels from this origin.

−

(Change the input image type in the [[Hugin Camera and Lens tab]])

+

Note that numbers can be negative and can extend beyond the width and height of the photo, this is primarily useful for partial fisheye images where the full circle is not visible, in this case the crop circle extends beyond the picture frame.

−

The '''Crop''' tab features four text boxes for '''Left''', '''Top''', '''Right''' and '''Bottom'''

+

The default '''Always center Crop on d,e''' assumes that all cropping is symmetrical around the optical centre of the lens. This is normal unless you are using the crop feature to remove lens flare, in which case the crop may need to be asymmetrical.

−

where you can manually enter the positions of the four edges. The origin is top left and numbers

+

−

indicate the distance in pixels from this origin.

+

−

Note that numbers can be negative and can extend beyond the width and height of the photo, this is

+

The '''d''' and '''e''' lens parameters setting the position of the optical centre are used by the [[Lens correction model]] and are set in the [[Hugin Camera and Lens tab]].

−

primarily useful for partial fisheye images where the full circle is not visible, in this case the crop circle

+

−

extends beyond the picture frame.

+

−

The default '''Always center crop on d,e''' assumes that all cropping is symmetrical around the

+

== Save and apply crop values ==

−

optical centre of the lens. This is normal unless you are using the crop feature to

+

Usually crop values don't vary too much for each lens/camera combination. So instead of always creating an almost same crop for new projects these values can be saved using the 'Save lens...' button in the [[Hugin Camera and Lens tab]] tab.

−

remove lens flare, in which case the crop may need to be asymmetrical.

+

−

The '''d''' and '''e''' lens parameters setting the position of the optical centre are used by the

+

To load crop values just select one image in the 'Camera and Lens' tab and load the previously saved lens description file. That also sets the crop for all images in the project that have the same lens number.

−

[[Lens correction model]] and are set in the [[Hugin Camera and Lens tab]].

+

−

Select the image to be cropped in the list to the left, you can adjust the position of the crop area

+

The lens description file is a plain text file with a .ini extension.

−

by dragging the perimeter in the image preview on the right.

+

[[Category:Software:Hugin]]

[[Category:Software:Hugin]]

Revision as of 18:45, 30 October 2009

Image cropping shouldn't be confused with a camera's Crop factor, which is something else entirely. Use the Crop tab to indicate the areas of the input images that hugin should exclude from the stitching output. There are three situations where you might want to use crop parameters:

With a scanned input image, there are usually black edges or marks along the sides of the image.

With a circular Fisheye Projection image there are black unexposed areas outside the image circle.

Some lenses have a lot of flaring around the edges which you don't want to keep.

Select the image to be cropped in the list to the left, you can adjust the position of the crop area by dragging the perimeter in the image preview on the right. Multiple images can be selected by holding down the Shift or Ctrl keys while clicking in the image list.

Note that unlike PTGui, setting crop parameters in hugin doesn't change the Field of View or optical centre of your images, it simply indicates areas of the image to be masked out, so you can change the cropping for photos in your project at any stage of the stitching process.
In detail, hugin uses the S 'selection' parameter in the i and o script lines instead of the C 'crop' parameter.

Depending on the input image type, cropping has two different behaviours:

The Crop tab features four text boxes for Left, Top, Right and Bottom where you can manually enter the positions of the four edges. The origin is top-left and numbers indicate the distance in pixels from this origin.

Note that numbers can be negative and can extend beyond the width and height of the photo, this is primarily useful for partial fisheye images where the full circle is not visible, in this case the crop circle extends beyond the picture frame.

The default Always center Crop on d,e assumes that all cropping is symmetrical around the optical centre of the lens. This is normal unless you are using the crop feature to remove lens flare, in which case the crop may need to be asymmetrical.

Save and apply crop values

Usually crop values don't vary too much for each lens/camera combination. So instead of always creating an almost same crop for new projects these values can be saved using the 'Save lens...' button in the Hugin Camera and Lens tab tab.

To load crop values just select one image in the 'Camera and Lens' tab and load the previously saved lens description file. That also sets the crop for all images in the project that have the same lens number.