Questions tagged [pset4filter]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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
26 views

pset4 filter Invalid or Unsupported Image Format

I have an issue with the pset4 filter, I've applied grayscale filter and sepia filter and they are working already, but when I started to write a code for reflect filter and try to compile then ...
0
votes
1answer
35 views

Pset4 Im having issues with the blur filter

Im extremely close to solve this problem, this is the result of check50 :) helpers.c exists :) filter compiles :) grayscale correctly filters single pixel with whole number average :) grayscale ...
0
votes
1answer
17 views

Blur - I'm so close, but yet not 100%

Apologises for the long post: I wanted to be as explicit in my logic as possible The code I've written uses the following logic to box blur: Use nested for loop to access each pixel in image Check ...
0
votes
1answer
27 views

pset4 filter (more) edge not passing check50

this is my code for Edge, and it's not passing check50. below are the errors I got. any help is appreciated. :( edges correctly filters middle pixel expected "210 150 60\n", not "28 202 ...
0
votes
1answer
41 views

Pset4 Filter sepia error from check50

below is my code for Pset4 filter(less). the code compiles fine, but I was getting these errors from check50. really appreciate if anyone can help. thanks :( sepia correctly filters single pixel ...
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

cs50 pset4 grayfilter

Could someone explain me why there is a difference when you use float in front of image[i][j] compare to not using it. Because if I'm not mistaken, image[i][j].rgbtRed or the 2 others are already ...
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
1answer
22 views

Why is reflect filter not working Pset4?

Here is my code. I have overcomplicated it. for (int i=0;i<height -1; i++) { for (int j=0;j<width- 1;j++) { int value[3]; value[0]=image[i][j].rgbtBlue; value[1]=image[i][j]....
0
votes
2answers
26 views

edges completely fails check50

So I finished my edges function and it's failing everything for check50 and I can't understand what I did wrong. Any help would be greatly appreciated. Functions related to edges: // Sets new RGB ...
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 ...
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 ...
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
1answer
28 views

Pset4 Blur filter, loop for searching surrounding pixels

I'm trying to write the part of the code where the surrounding pixels around the main pixel are searched in order to make the average and later replace the main value for the average value. I am ...
2
votes
1answer
61 views

pset4 - filter program,can't figure out what exactly is the problem with blur!

Can't figure out what the problem with this code is. It seems to be working correctly for corners, but for nothing else. Please help! void blur(int height, int width, RGBTRIPLE image[height][width]) { ...
0
votes
1answer
30 views

CS50 Problem Set 4 Filter (less comfortable) help

So I have been struggling to correct my code to fix the blur function of pset4 and feel that my code is correct (even if it isn't optimally efficient). Here's how I went about it: First I looped ...
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
1answer
37 views

Cs50 Sepia properly coded

I did the sepia filter for the cs50 week 4 problem "filter) and although it works, I've been wondering, is there is not a more "proper" way to write the code, that is with out repeating ...
0
votes
1answer
49 views

Runtime error in pset4

I'm currently working on filter.c, and I'm struggling with the blur segment of it. I tried to write a code (I'm aware it's a mess of hard-code, but it's an attempt!), but I keep getting this error: ...
0
votes
1answer
52 views

CS50 Pset4 Filter (More comfortable) Edges Function

I am trying to code CS50's Pset4 Filter (More comfortable)'s edges function, but I keep on getting a different value. This is the link to the video explaining what I am trying to do in this function, ...
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
2answers
53 views

Help with pset4 filter edge detection function

I have some problems with the edges function. The code compiles fine and all but the result looks like this: https://imgur.com/a/S2MQLom The edges of the image and one third of it don't look as ...
0
votes
1answer
91 views

pset4 filter - blur function only filters image corners

This is my second attempt at this problem, and a full rewrite; I tried once before to be as eloquent as I could, and it was just totally wrong and bizarre. So I just tried to make this one as readable ...
0
votes
1answer
99 views

Pset 4 Filter - Blur

My blur filter produces a decent looking blurred image and passes the Check50 corner pixel case. I define the cases for the edges and the middle pixels and then manually calculate the average RGB ...
0
votes
1answer
46 views

PSET4 Reflection Filter

I'm having trouble getting my head around the pointers needed for the reflection filter. I have got to here and can't get the syntax right. Any tips would be much appreciated. Thanks. void reflect(int ...
0
votes
1answer
57 views

PSET 4 BLUR and 2 of REFLECT

All of reflect works except reflected a 1 x 2 and a 4 x 4 (3x3 works fine) None of blur works except for when a point is in the corner, which makes little sense. I've sluthed around other answers and ...
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
22 views

Pset4 less comfortable compile error

When I try to compile my helpers.c file the compiler shows me clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow helpers.c -...
1
vote
1answer
57 views

pset4 - Green and Blue off in filter (less)

My code is here. void sepia(int height, int width, RGBTRIPLE image[height][width]) { for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { ...
0
votes
1answer
27 views

At my wits end on pset4 filter blur

I am stumped on this problem, more specifically, on the blur filter. I can't see anything wrong with the program, but it still errors out on check50. It seems that the middle function is correct, but ...
0
votes
1answer
68 views

Need help with CS50's Filter (less) Blur

I'm doing CS50 and trying really hard to keep sane while I try to finish the last part of the Filter (less) exercise. I'm stuck on "Blur". I've tried to resist looking for help online ...
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 ...
0
votes
1answer
43 views

Is there an operator for raising in a power in C?

In PSET4 Edges Filter problem you are supposed to calculate Gx ^ 2. But the operator ^ in C does not seem to mean raising in a power. For Gx = -9 it returns Gx ^ 2 = -11 and so on. Turned out ^ is XOR ...
0
votes
1answer
38 views

Pset4 Reflect not working on 4x4 image

I get the eror only for the 4x4 image, the others are correct. Seems like the values are swapped between each other, but I cant find a way to fix it. Something in the inner loop (I think) is swapping ...
0
votes
1answer
161 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
1answer
207 views

PSET 4 - Filter: Anyone able to help me on Edges?

I'm having a lot of trouble figuring out how my code for edges is failing so badly every time. Any help on this would be greatly appreciated! Here is what I'm getting back from check50: :( edges ...
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
75 views

PSET 4 blur function only passing one test case

void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE copy[height][width]; int counter = 0; int red = 0; int blue = 0; int green = 0; for(int i=0; i<height; i++) { ...
0
votes
1answer
41 views

CS50 Filter blur

When I tried running this code under Check50, the value returned was completely off for some reason but I can't seem to figure out why. I then reduced the code to only calculating the rgbtBlue value ...
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
98 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 ...