1. An ultrasonic diagnostic apparatus comprising: processing circuitry configured to: calculate directions of edges in a local region within one ultrasonic image representing a two-dimensional image, sizes of the edges in the local region, and directional uniformity of the edges in the local region, the directional uniformity of the edges representing variability of the directions of the edges in the local region; calculate a composite coefficient by using a first coefficient representing the sizes of the edges and a second coefficient representing the directional uniformity of the edges, the composite coefficient being a larger coefficient between the first coefficient and the second coefficient or an additional value of the first coefficient and the second coefficient; calculate a filtering coefficient for a region corresponding to the local region based on the composite coefficient; and perform filtering processing for sharpening or smoothing the ultrasonic image with respect to the ultrasonic image by using the filtering coefficient, wherein the processing circuitry is further configured to: acquire a data set with respect to a second-order derivative of the pixel value in the local region or a spatial derivative of a high-frequency component of a pixel value in the local region; calculate a first eigenvalue and a second eigenvalue from a covariance matrix of the acquired the data set; and calculate the directional uniformity based on a contribution ratio of the second eigenvalue.