Total Variation Inpainting using Split Bregman
Macros | Functions
applymask.c File Reference

Apply an inpainting mask. More...

#include <stdio.h>
#include <string.h>
#include "imageio.h"

Go to the source code of this file.

Macros

#define JPEGQUALITY   95
 Quality for writing JPEG images.
 

Functions

void PrintHelpMessage ()
 
void ApplyMask (unsigned char *Image, int Width, int Height, int NumChannels, const unsigned char *Mask, int MaskWidth, int MaskHeight)
 Apply a mask to the image. More...
 
int IsGrayscale (const unsigned char *Image, int Width, int Height)
 Test whether image is grayscale.
 
int main (int argc, char **argv)
 

Detailed Description

Apply an inpainting mask.

Author
Pascal Getreuer getre.nosp@m.uer@.nosp@m.gmail.nosp@m..com

Copyright (c) 2012, Pascal Getreuer All rights reserved.

This program is free software: you can use, modify and/or redistribute it under the terms of the simplified BSD License. You should have received a copy of this license along this program. If not, see http://www.opensource.org/licenses/bsd-license.html.

Definition in file applymask.c.

Function Documentation

void ApplyMask ( unsigned char *  Image,
int  Width,
int  Height,
int  NumChannels,
const unsigned char *  Mask,
int  MaskWidth,
int  MaskHeight 
)

Apply a mask to the image.

Parameters
Imagethe destination image
Width,Height,NumChannelsthe image dimensions
Maskthe mask
MaskWidth,MaskHeightthe mask dimensions

This routine sets Image pixels to gray where the mask has value >= 128.

Definition at line 95 of file applymask.c.