Questions tagged [pset4filter]

The tag has no usage guidance.

32 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
2answers
38 views

Blur only working with middle pixel

I've been stuck in this problem for a while, and the code only works when its inputted a middle pixel. Does anyone have a clue? I've searched everywhere for this particular issue, but I have only ...
1
vote
1answer
45 views

pset4 filter - only blurs the corners correctly

i can`t get the picture blurred at all (it comes out a complete mash up of colours blended together ...) ...i' ve been trying to figure this out for months now :(( HELP! void blur(int height, int ...
1
vote
1answer
314 views

pset 4 filter edge not working

I am having issues with my implementation of edges. I decided to make a 'border' around the edges of the image made up of zeros (did this in a copyImage array). I get correct outputs for some of the ...
0
votes
2answers
20 views

Pset4 Blur (filter less) not passing check50

As title says, I am not passing check50 for blur. I am aware that my method is probably extremely tedious and not the best method, but I came up with it myself and would like to find out why it isn't ...
0
votes
1answer
18 views

PSET4 Filter (Less) Sepia

:( sepia correctly filters simple 3x3 image expected "100 89 69\n100...", not "100 89 69\n100..." :( sepia correctly filters more complex 3x3 image expected "25 22 17\...
0
votes
1answer
21 views

PSet 4 Filter(less) Sepia - Why is my output image slightly red tinted?

At first, I forgot to cap the RGB values at 255 for sepia, and it resulted in white pixels being blue. But other areas were fine(proper sepia). So additionally, I added the ternary operators to check ...
0
votes
1answer
12 views

result black or white filter edges

int superior( float value); // Detect edges void edges(int height, int width, RGBTRIPLE image[height][width]) { float red_x, green_x, blue_x, red_y ,green_y ,blue_y ; red_x = green_x = blue_x =...
0
votes
0answers
13 views

Only the first test passed for Edges (Filter, more comfortable)

I have been staring at Edges for a whole day, still can't find out what's wrong with it. The test says the middle pixel is correctly calculated. but edges, corners, 3X3....no go. Anybody can offer a ...
0
votes
0answers
6 views

Edge detection Program Gives Undesired Output

I have been struggling with the edge detection program. It produces weird output!!! The code is as given below: void edges(int height, int width, RGBTRIPLE image[height][width]) { float avgRedGx, ...
0
votes
0answers
26 views

Pset4 - filter Blur

I wrote following code for blur filter . But I can't get the positive result . I want to know what the mistake is . void blur(int height, int width, RGBTRIPLE image[height][width]) { ...
0
votes
0answers
5 views

PSET4 Blur Filter condition to skip Indexes not the Array

I will appreciate it if someone can bail me out here. I am stuck on the Blur. The logic of my code is using a nested loop for the 2D array while adding or subtracting one from the current array ...
0
votes
0answers
23 views

pset4 (less) filter - blur please help

I've been stuck on this project for a while... I looked at other people's questions but still cannot find our where I did wrong. Can someone help me see where the bug is... void blur(int height, int ...
0
votes
0answers
11 views

Doubts in pset4/filter/less

My code seemed to work pretty well untill I ran check50. I then tried to rewrite it making a copy of the image used as input (something like RGTRIPLE TMP[height][width]; TMP[x][y] = image[x][y]) and ...
0
votes
0answers
15 views

Pset4 filter (more) - Edge Help

I stuck on pset4 for days. Only the corners passed check50. Any help, please? void edges(int height, int width, RGBTRIPLE image[height][width]) { int cap (int c); //get a copy of all the ...
0
votes
0answers
14 views

Why does the code output incorrect amounts?

The code is here: https://pastebin.com/gKnVmPFf I've checked that it's not because of neighboring cells, because I am translating them onto a different array. I can't seem to figure out want is wrong. ...
0
votes
1answer
160 views

Help with Blur filter! The output image is not blurred, but is returned as a darker image of the input

I have been stuck on this problem for days and have tried so many ways to write this code, but I continuously get errors. Nothing works. The output file is just returned as a darker image of the input ...
0
votes
1answer
45 views

What is wrong with my filter blur?

Been stuck on the blurring part for ages... I've ran out of ideas and motivation to debug at this point after spending an eternity cutting down my spaghetti codes to pappardelle. Any help/hint/...
0
votes
0answers
33 views

PSET4 - Filter (Less) Blur - Keep getting :( blur correctly filters middle pixel expected “127 140 149\n”, not “118 131 140\n”

void blur(int height, int width, RGBTRIPLE image[height][width]) { //A box blur //take the average of the surrounding pixels (1 row and 1 column away) //Store all the surrounding and find ...
0
votes
1answer
53 views

CS50 PSET4 Edge calculates correct values on all tests unless the correct value is 255

I am having problems with CS50 PSet 4 - Edge. The method passes the middle pixel test (which has no value of 255 on any channel) but on any other test all the values in each channel are correct ...
0
votes
1answer
32 views

What is the explaination of the declaration of image array in filter

I was looking through the filter.c file in the pset4-filter-less and I want to understand the theory behind the declaration of array as shown below: RGBTRIPLE(*image)[width] = calloc(height, width * ...
0
votes
1answer
97 views

Pset4 Grayscale Not doing anything to image - Nothing happens to the images spit out of this am I doing something wrong?

void grayscale(int height, int width, RGBTRIPLE image[height][width]) { //Image[0] is the first row of the image and Image[height - 1] is the last row of the image //Image[0][0] is the first ...
0
votes
1answer
60 views

Getting partial output in Blur (pset4 filter) , trying to debug edge and middle pixel

My program when run through check50 says the corner pixels work but nothing else seems to work. I have been stuck on this problem for days and after not getting any considerable reply on the cs50 ...
0
votes
1answer
51 views

PSET 4 Filter / Blur : I couldn't pass a struct as an function argument what is the reasson?

in order to blur the pixels I created 3 functions. BLUR -Create a new image so old date won't corrupt - iterate over the new image -blur_color - To taking the averages of the color values -...
0
votes
1answer
84 views

FIlters (more) - Unable to crack Edge

Below is my code for Edges. Please help me by highlighting the errors. Thanks in advance. Errors I am getting are: :( edges correctly filters middle pixel expected "210 150 60\n", not &...
0
votes
1answer
190 views

PSET 4 Filter (less) - Simplification of code for blur

My programme works, it compiles well and it passes the check50 checks. However, I don't like how it looks - I feel it's very cumbersome, too full of logical conditions. I was wondering how I might ...
0
votes
1answer
80 views

I don't understand what's wrong with my Edge filter. Pset4

There are lots of runtime errors and overflowed integers with my code, and I have no idea why that is the case. Please could you check it out? void edges(int height, int width, RGBTRIPLE image[height]...
0
votes
0answers
89 views

Pset4 , Filter (Reflect)

I am getting the following error in the reflect part of my filter and I am not sure what it means and how should i avoid it helpers.c:71:23: error: subscript of pointer to function type 'void (int, ...
0
votes
1answer
162 views

Week 4 GrayScale - Calling a function called Average within Grayscale

So I understand that the grayscale part of the assignment is supposed to be pretty basic, however, I am running into some unusual issues here. The following is my code for the grayscale filter. //...
0
votes
1answer
422 views

To those who struggle with pset4’s filter-more’s edge detection filter

I’m sure it is obvious for some people, but it wasn’t for me) If your code isn’t working the way it should, you can create new .c file and put there your logic from edge detection function. You can ...
0
votes
1answer
274 views

Pset4 filter reverse issue

I am banging my head for the past hour on why this does not work. Basically, testing on the provided pictures, my reverse function does what it says on the tin. However, when I test it vs check50, ...
0
votes
1answer
180 views

Why does it say that my index it -1?

I am working on blur in filter and it says my index is our if bound -1 // Create count starts and end count int sh = -1; int eh = 1; int sw = -1; int ew = 1; ...
0
votes
1answer
98 views

PSET4 Filter (more) Edge

I got some weird issue with my code! It compiles without any problems. All other filters work perfectly, and check50 shows no problems (no problem in edge according to check50). But, when i try edge ...