Open VadivelChinnasamy opened 7 years ago
I used your lib to detect face which is detected but image is completely blurred
Have you got any solution
I noticed that too. Better to use the same face detection-size, as the imageView itself. (to prevent blurring) You also might want to leave out .fit and .centerInside Leaving this here, so it helps someone.
Place this code somewhere in an activity, for example: onCreate()
val size = 500 val face = ImageView(this) val params = LinearLayout.LayoutParams(size, size) face.layoutParams = params view.addView(face)
Picasso.get()
.load("https://static.wikia.nocookie.net/ladygaga/images/9/9a/Blackpink.jpg/revision/latest?cb=20200422160824")
// .fit() // recommended for pure efficiency (but can make image look blurry/un-sharp/with artifacts)
// .centerInside() // ditto
.transform(FaceCenterCrop(size, size))
.into(face)
I used your lib to detect face which is detected but image is completely blurred