How can I display a yuv image? I have installed Image Magick, but when I try it, it said I must specify image size:
$ display ~/Downloads/tulips_yuv422_inter_planar_qcif.yuv
display: must specify image size `~/Downloads/tulips_yuv422_inter_planar_qcif.yuv' @ error/yuv.c/ReadYUVImage/145.
But I don't know the image size, can some program detect that for me?
No, the program cannot detect the size of an image with no header.
You have just the pixel data; the information as to whether 200 pixels are a 10x20 image or a 20x10 image is just not in the file.
What you can do is find out how many pixels the image has, and try formats that make sense, trying the ones first that are common or are expected with your use case.
What you know about the size is
pixelcount = width x height
You could also just try a series of formats that are possible in terms of pixels = width x height, and look at them whether they make sense as an image of the kind you expect. That does not work in the general case, but should work in practice.