Edge is a portion of data that represents the layout of objects within the image,that can be used to identify the size of the objects in the image or identifying objects within the image,which change of levels of grey intensity low to high intensity level of gray and the adjacent pixels have very different values to extract the Brown planthopper from the background. After that, continue to fill the inner edges of the image will have the shape of Brown planthopper. After that, continue to fill the space inside the edges of the image will have the shape of Brown planthopper.