Semen ziziphi spinosae are the seeds of sour dates. They can be used as both food and medicine, with large and full kernels producing particularly good medicinal herbs. However, the kernels of semen ziziphi spinosae are wrapped in a shell, so it is difficult to analyze the fullness of the kernel without damaging the seeds themselves. In this study, shortwave near-infrared (SW-NIR) and longwave near-infrared (LW-NIR) hyperspectral imaging techniques are used to determine the recognition ability of kernels from shell regions in different wavelength ranges using a two-band ratio algorithm. LW-NIR is found to be more suitable for the non-destructive detection of the inner kernel of semen ziziphi spinosae. Three practical wavelength selection algorithms and two classification algorithms are used to build pixel-level kernel detection models that achieve classification accuracies of greater than 97%. A novel improved Otsu algorithm is developed and applied to multispectral images. The watershed algorithm, threshold segmentation, and improved Otsu algorithm are used to build image-level kernel detection models. The detection results indicate that the improved Otsu algorithm is superior to other algorithms, achieving accuracy levels of 100%, 97.5%, 95%, and 100% for four different types of plumpness, respectively. These results indicate that the proposed method has the potential for the online detection of suitable semen ziziphi spinosae kernels. Moreover, LW-NIR hyperspectral transmission imaging combined with the improved Otsu algorithm is shown to provide a useful non-destructive method for detecting kernel fullness for medicinal materials.