Two-Phase Model of Resource Allocation in Visual