Automatic word assignment to images based on dividing image and vector quantization