#include <stdio.h>
bool IsCornner()
//bool IsCornner(const unsigned char pixels[16], unsigned char thresh)
{
const unsigned char flag[16] = {1,1,1,0,2,2,2,0,0,0,0,0,0,0,1,1};
/*for (int j = 0; j < 16; j++)
{
flag[j] = (pixels[j] < -thresh ? 0 : 1);
}*/
int maxnum = 1;
for (int j = 0; j < 16; j++)
{
int samenum = 1;
if (flag[j]!=0)
{
for (size_t i = 0; i < 16;)
{
if (flag[j] == flag[j + 1 + i>15 ? j + 1 + i - 16 : j + 1 + i])
{
samenum++;
i++;
}
else
{
break;
}
}
}
maxnum = maxnum < samenum ? samenum : maxnum;
bool IsCornner()
//bool IsCornner(const unsigned char pixels[16], unsigned char thresh)
{
const unsigned char flag[16] = {1,1,1,0,2,2,2,0,0,0,0,0,0,0,1,1};
/*for (int j = 0; j < 16; j++)
{
flag[j] = (pixels[j] < -thresh ? 0 : 1);
}*/
int maxnum = 1;
for (int j = 0; j < 16; j++)
{
int samenum = 1;
if (flag[j]!=0)
{
for (size_t i = 0; i < 16;)
{
if (flag[j] == flag[j + 1 + i>15 ? j + 1 + i - 16 : j + 1 + i])
{
samenum++;
i++;
}
else
{
break;
}
}
}
maxnum = maxnum < samenum ? samenum : maxnum;
}
printf("output =");
printf("%d", maxnum);
return true;
}
void main()
{
IsCornner();
}
printf("output =");
printf("%d", maxnum);
return true;
}
void main()
{
IsCornner();
}