Python Forum
Correct the algorithm of image filter code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Correct the algorithm of image filter code
#7
(May-08-2022, 04:29 PM)deanhystad Wrote: You should display the grayscale image you produce and the greyscale image that is produced by cv2. That might help you figure out why the thresholding isn't producing the result you want. I don't think using mean is correct. Red and Blue are perceived to be dark colors, and Green a bright color, but in your equation all contribute equally to the brightness of the pixel.

I don't think that the problem is in grayscale filter. For comparison,
this is a result of mean grayscale filter
[Image: Screenshot-2022-05-08-at-20-00-33.png]

And this is a result of cv2 build-in grayscale filter (cv2.COLOR_BGR2GRAY)
[Image: Screenshot-2022-05-08-at-20-00-53.png]

As you see, no so much difference
Reply


Messages In This Thread
RE: Correct the algorithm of image filter code - by saoko - May-08-2022, 05:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Algorithm for extracting comments from Python source code Pavel1982 6 627 Feb-28-2024, 09:52 PM
Last Post: Pavel1982
  New2Python: Help with Importing/Mapping Image Src to Image Code in File CluelessITguy 0 743 Nov-17-2022, 04:46 PM
Last Post: CluelessITguy
  code decode, string, image ... teckow 2 2,089 Aug-20-2021, 07:02 PM
Last Post: teckow
  [split] Kera Getting errors when following code example Image classification from scratch hobbyist 3 4,676 Apr-13-2021, 01:26 PM
Last Post: amirian
  I need a code line to spam a keyboard key | Image detection bot Aizou 2 3,167 Dec-06-2020, 10:10 PM
Last Post: Aizou
  my first code, please correct robboc91 4 2,738 Nov-16-2020, 06:32 PM
Last Post: DougBTX
  Help me get this image converter code working? NeTgHoSt 0 2,110 Jul-14-2020, 10:36 PM
Last Post: NeTgHoSt
  Getting the error like function not defined .. suggest correct code raghava 1 2,092 Feb-04-2020, 11:20 PM
Last Post: micseydel
  upload image with generated code from Postman does not work magic7598 0 1,716 Nov-30-2019, 10:32 AM
Last Post: magic7598
  The code seems correct but my files aren't getting deleted taffylim69 1 2,120 Feb-03-2019, 11:00 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020