> For the complete documentation index, see [llms.txt](https://help.imotions.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.imotions.com/lab/import-and-post-processing/facebox-for-facial-expression-analysis.md).

# Facebox for Facial Expression Analysis

Define the facebox in Replay to control which face Affdex analyzes in a respondent video, then rerun Affdex post-processing with the new area.

The ‘facebox’ is the area where Affdex Facial Expression Analysis is applied to a Respondent video.

Faces in the facebox area will be detected, analyzed, and provide Affdex FEA data - while faces outside of the facebox area will not be analyzed.

**Adjustments to the default facebox (at the center) would be necessary if:**

* The default facebox area does not contain the intended face - requiring relocation of the facebox (e.g. for a face in the corner).
* The face moves outside of the default facebox area during the video - requiring a larger area.
* Multiple-faces appear within the default facebox area - requiring a more specific area.

Additional Notes:

* The facebox remains constant throughout the video.
* The facebox feature is only available for Affdex.

<figure><img src="https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-61664ec713427e3eeb9e92d71cbc015aeaf21b10%2F73f62dfbd8_image-73RZE5HZ.webp?alt=media" alt=""><figcaption><p>Facebox Definition for Affdex Analysis</p></figcaption></figure>

## How to Adjust the Affdex Facebox

The facebox can be adjusted for any respondent video, once it has been recorded or imported into iMotions.

1. Select a study and respondent from the iMotions main window.
2. Open the Replay that contains the respondent video to adjust.
3. Open the ‘Define facebox’ window, shown when:
   1. Right-clicking on the respondent video.
   2. Clicking on the ‘…’ button in the respondent video.
4. Click-and-drag facebox as needed.
   1. Larger facebox would accommodate movement. The facebox remains constant throughout the video.
5. Apply the facebox
   1. Use for this respondent
   2. Use for all respondents
6. Perform other facebox adjustments (as needed).
7. Re-run Affdex post-processing with the new facebox.

{% embed url="<https://files.imotions.com/hc_articles/videos/define-facebox-1.mp4>" %}

Facebox Definition Window and Adjustments

{% embed url="<https://files.imotions.com/hc_articles/videos/define-facebox-2-1.mp4>" %}

Additional Facebox Definition and Affdex Post-Processing

### Define Facebox Options

**Delete facebox**

If there is a set facebox already, it deletes it.

**Use for all respondents**

If you have a number of videos and the respondent face is on the same position on the video, you can set the position for all videos in that same study.

**Use for this respondent**

If you have one video only or videos with respondent faces in different positions of the video frame, you can set the box for the current respondent.

Once you have set the box you will receive a confirmation message:

As the above message mentions, this only defines the area where the processing will take place. However, you will still have to run the post process.

<figure><img src="https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-bb04c599e19a54a70cd0e262102ad8767c17e87a%2F0161284c3a_image-KXEJBJGI.webp?alt=media" alt=""><figcaption><p>Facebox Definition Options</p></figcaption></figure>

## Analysis with Adjusted Facebox

After Affdex post-processing is complete, new FEA data will be available in each Respondent Replay.

* ‘Affectiva Landmarks’ can be displayed in the Respondent Camera panel, which can be used to confirm where/which face was analyzed.
* Enable/disable ‘Show Affectiva Landmarks’ by right-clicking in the Respondent Camera panel.
* Signal Processing (R Notebook) for [**FEA Thresholding**](https://help.imotions.com/lab/analysis/facial-expression-analysis/r-notebook-fea-facial-expression-analysis-thresholding-and-aggregation.md) and [**iMotions Exports**](https://help.imotions.com/lab/exports/export-sensor-data.md) can be used for further analysis.

<figure><img src="https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-7e096b4a14387a8492a837b0fba163fde53e71a0%2F7b9d8b4405_image-NN330OSU.webp?alt=media" alt=""><figcaption><p>Respondent Replays with FEA Data from Adjusted Facebox</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.imotions.com/lab/import-and-post-processing/facebox-for-facial-expression-analysis.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
