Ask Your Question

Santhosh1's profile - activity

2020-11-28 07:21:42 -0600 received badge  Popular Question (source)
2020-11-10 15:43:34 -0600 received badge  Popular Question (source)
2020-10-27 00:54:37 -0600 received badge  Famous Question (source)
2020-09-21 09:17:44 -0600 received badge  Popular Question (source)
2020-07-08 02:31:55 -0600 received badge  Popular Question (source)
2020-06-23 04:15:24 -0600 received badge  Notable Question (source)
2020-06-23 04:15:24 -0600 received badge  Popular Question (source)
2020-06-22 23:34:00 -0600 received badge  Popular Question (source)
2020-05-12 06:25:58 -0600 received badge  Popular Question (source)
2020-04-06 00:53:40 -0600 received badge  Famous Question (source)
2020-03-26 00:43:26 -0600 marked best answer Simple raw pixel colour changing

I have check already in OpenCV forum, this is not duplicate question.

I want to change a colour in an image, say with [B,G,R] value [49,51,31]

I used a loop to change pixel with these intensity values to white [255,255,255]

Here's a loop in python

for row in range(r):
    for col in range(c):
        if np.all(cim[row,col] == [49,51,31]):
            cim[row,col] = [255,255,255]

It takes around 30 seconds for my current test image of resolution [1908,1429] to complete this.

I came across this post

changing all the Red values in a colour image < 255 to 255

img[img[:, :, 2] < 255, 2] = 255 using numpy fancy indexing

I tried out same for the above condition of mine

cim1[cim1[:,:]==[49,51,31]] =[255,255,255]

But I'm getting this error

cim1[cim1[:,:]==[49,51,31]] =[255,255,255]
ValueError: NumPy boolean array indexing assignment cannot assign 3 input values to the 51068 output values where the mask is true

Any solution? Anyone?

2020-03-26 00:43:26 -0600 received badge  Self-Learner (source)
2020-03-24 04:18:42 -0600 received badge  Famous Question (source)
2020-02-06 06:27:01 -0600 received badge  Popular Question (source)
2020-01-03 07:24:21 -0600 received badge  Famous Question (source)
2019-11-26 05:31:58 -0600 received badge  Famous Question (source)
2019-11-18 04:26:01 -0600 received badge  Notable Question (source)
2019-11-07 00:56:05 -0600 received badge  Famous Question (source)
2019-10-10 23:11:07 -0600 received badge  Notable Question (source)
2019-08-15 18:50:43 -0600 received badge  Notable Question (source)
2019-07-10 09:50:32 -0600 received badge  Notable Question (source)
2019-06-25 21:10:23 -0600 received badge  Famous Question (source)
2019-06-11 06:57:18 -0600 received badge  Popular Question (source)
2019-05-30 07:24:47 -0600 received badge  Famous Question (source)
2019-05-28 19:24:59 -0600 edited question Detect when the imshow window is closed using X by user

Detect when the imshow window is closed using X by user I would like to know if the user has closed the imshow window us

2019-05-28 19:24:27 -0600 edited question Detect when the imshow window is closed using X by user

Detect when the imshow window is closed using X by user I would like to know if the user has closed the imshow window us

2019-05-28 19:12:24 -0600 edited question Detect when the imshow window is closed using X by user

Detect when the imshow window is closed using X by user I would like to know if the user has closed the imshow window us

2019-05-28 19:03:05 -0600 edited question Detect when the imshow window is closed using X by user

Detect when the imshow window is closed using X by user I would like to know if the user has closed the imshow window us

2019-05-28 19:01:48 -0600 asked a question Detect when the imshow window is closed using X by user

Detect when the imshow window is closed using X by user I would like to know if the user has closed the imshow window us

2019-05-28 19:01:41 -0600 asked a question Detect when the imshow window is closed using X by user

Detect when the imshow window is closed using X by user I would like to know if the user has closed the imshow window us

2019-05-27 03:17:57 -0600 received badge  Popular Question (source)
2019-05-01 06:13:41 -0600 received badge  Famous Question (source)
2019-04-21 11:55:55 -0600 received badge  Popular Question (source)
2019-04-14 08:54:50 -0600 received badge  Famous Question (source)
2019-04-13 14:44:54 -0600 received badge  Popular Question (source)
2019-03-23 13:58:01 -0600 received badge  Notable Question (source)
2019-03-05 22:54:10 -0600 received badge  Notable Question (source)
2019-03-03 12:46:39 -0600 received badge  Famous Question (source)
2019-02-20 19:43:44 -0600 received badge  Notable Question (source)
2018-12-24 18:07:57 -0600 received badge  Popular Question (source)
2018-12-11 02:38:04 -0600 received badge  Notable Question (source)
2018-10-18 21:56:55 -0600 received badge  Notable Question (source)
2018-10-04 06:51:24 -0600 received badge  Notable Question (source)
2018-09-10 06:55:44 -0600 received badge  Popular Question (source)
2018-09-07 04:56:01 -0600 received badge  Notable Question (source)
2018-09-06 05:40:26 -0600 received badge  Popular Question (source)
2018-08-04 05:44:14 -0600 received badge  Popular Question (source)
2018-06-28 03:46:47 -0600 received badge  Popular Question (source)
2018-06-11 01:52:43 -0600 edited question How to make an image more vibrant in colour using OpenCV?

How to make an image more vibrant in colour using OpenCV? I need to enhance few of the images before processing them. I

2018-06-08 07:32:13 -0600 edited question How to make an image more vibrant in colour using OpenCV?

How to make an image more vibrant in colour using OpenCV? I need to enhance few of the images before processing them. I