how should I do if I want to scan multiple target images at once and display 1 output . the situation is I want to scan some foods in trolley which is in the trolley may have healthy and unhealthy foods. so I plan to classify them using tag. Then display only one output. for example if all the food in trolley is healthy will display healthy person but if there have one unhealthy food it will display sick people,
public Image[] trolley;
int healthy=0;
int unhealthy = 0;
private void Start()
{
for(int i=0;i<trolley.Length;i++)
{
if(trolley_.tag == "healthy") // can also use if(trolley*.CompareTag("healthy"))*_
{
healthy += 1;
}
else if(trolley*.tag == “unhealthy”)*
{
unhealthy += 1;
}
}
if(healthy == trolley.Length)
{
//Display Healthy Person
Debug.Log(“Healthy”);
}
else if(unhealthy>=1)
{
//Display sick Person
Debug.Log(“Unhealthy”);
}
}