---
name: "im_project"
section: "3"
platform: "linux"
package: "libvips-dev"
version: "7.20.7-1+b3"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/im_project"
---

# im\_project(3)

find horizontal and vertical projections

## NAME

im\_project - find horizontal and vertical projections

## SYNOPSIS

\#include \<vips/vips.h\>

int im\_project(IMAGE \*in, IMAGE \*hout, IMAGE \*vout)

## DESCRIPTION

**[im\_project(3)](/im_project/3.md)** finds the horizontal and vertical projections of an image, that is, the sum of each row and the sum of each column.

The  **hout** result image is 1 x in-\>Ysize pixels, where each pixel is the sum of all the pixels in that row of the input image. The  **vout** result image is in-\>Xsize x 1 pixels, where each pixel is the sum of all the pixels in that column of the input image.

The output images are of the largest appropriate type for the input image: so  unsigned integer images produce UINT output, and so on. The output images have the same number of bands as the input.

The operation does not work for complex images, or for coded images.

## RETURNED VALUE

The function returns 0 on success and -1 on error.

## SEE ALSO

[im\_histplot(3)](/im_histplot/3.md), [im\_histnorm(3)](/im_histnorm/3.md), [im\_extract(3)](/im_extract/3.md).

## COPYRIGHT

Imperial College, 2006
